diff --git a/Make.config b/Make.config index 13431c6844e0..bf9c25db37da 100644 --- a/Make.config +++ b/Make.config @@ -35,7 +35,7 @@ $(TOP)/Make.config.inc: $(TOP)/Make.config $(TOP)/mk/mono.mk include $(TOP)/Make.versions -APIDIFF_REFERENCES=https://bosstoragemirror.blob.core.windows.net/wrench/jenkins/d16-7/64004ee259c7ae9f046436ee82a29db0a45f49fb/76/package/bundle.zip +APIDIFF_REFERENCES=https://bosstoragemirror.blob.core.windows.net/wrench/jenkins/xcode12/5bcf5b877d2101a21f97b93d5c912273d804110d/238/package/bundle.zip PACKAGE_HEAD_REV=$(shell git rev-parse HEAD) @@ -111,9 +111,9 @@ WATCHOS_NUGET_VERSION_NO_METADATA=$(WATCHOS_NUGET_VERSION)-$(NUGET_PRERELEASE_ID WATCHOS_NUGET_VERSION_FULL=$(WATCHOS_NUGET_VERSION_NO_METADATA)+$(NUGET_BUILD_METADATA) # Xcode version should have both a major and a minor version (even if the minor version is 0) -XCODE_VERSION=11.6 -XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_11.6.xip -XCODE_DEVELOPER_ROOT=/Applications/Xcode_11.6.0.app/Contents/Developer +XCODE_VERSION=12.0 +XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_12.xip +XCODE_DEVELOPER_ROOT=/Applications/Xcode_12.0.0.app/Contents/Developer XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist) # Mono version embedded in XI/XM (NEEDED_MONO_VERSION/BRANCH) are specified in mk/mono.mk @@ -139,12 +139,12 @@ MIN_CMAKE_URL=https://cmake.org/files/v3.6/cmake-3.6.2-Darwin-x86_64.dmg MIN_CMAKE_VERSION=2.8.8 # ObjectiveSharpie min/max versions -MIN_SHARPIE_VERSION=3.5.37 +MIN_SHARPIE_VERSION=3.5.38 MAX_SHARPIE_VERSION=3.5.99 -MIN_SHARPIE_URL=https://download.visualstudio.microsoft.com/download/pr/ab6c85e9-be56-4946-9c0d-b0f91c331ceb/0c66b78f532a6a488c98f4219d82be49/objectivesharpie-3.5.37.pkg +MIN_SHARPIE_URL=https://download.visualstudio.microsoft.com/download/pr/83e81fcc-39cd-4c2d-b906-ea635f424aaa/2cd8d79588fbb61fa0f4594c85cccfe6/objectivesharpie-3.5.38.pkg # Minimum OSX versions for building XI/XM -MIN_OSX_BUILD_VERSION=10.15.2 +MIN_OSX_BUILD_VERSION=10.15.4 # Minimum OSX version for executing XI/XM tooling. MIN_OSX_VERSION_FOR_IOS=10.11 MIN_OSX_VERSION_FOR_MAC=10.11 @@ -168,7 +168,7 @@ MIN_IOS_SDK_VERSION=7.0 MIN_OSX_SDK_VERSION=10.9 MIN_WATCHOS_SDK_VERSION=2.0 MIN_WATCHOS64_32_SDK_VERSION=5.1 -MIN_WATCH_OS_VERSION=1.0 +MIN_WATCH_OS_VERSION=2.0 MIN_TVOS_SDK_VERSION=9.0 # The min simulator version available in the Xcode we're using @@ -181,7 +181,7 @@ MIN_TVOS_SIMULATOR_VERSION=10.2 EXTRA_SIMULATORS=com.apple.pkg.iPhoneSimulatorSDK10_3 com.apple.pkg.AppleTVSimulatorSDK10_2 com.apple.pkg.WatchSimulatorSDK3_2 INCLUDE_IOS=1 -INCLUDE_MAC=1 +#INCLUDE_MAC=1 INCLUDE_WATCH=1 INCLUDE_TVOS=1 INCLUDE_DEVICE=1 diff --git a/Make.versions b/Make.versions index da5370d9bca8..282e6385f6e2 100644 --- a/Make.versions +++ b/Make.versions @@ -48,8 +48,8 @@ # line changed in git). # -IOS_PACKAGE_VERSION=13.23.0.$(IOS_COMMIT_DISTANCE) -MAC_PACKAGE_VERSION=6.23.0.$(MAC_COMMIT_DISTANCE) +IOS_PACKAGE_VERSION=14.7.0.$(IOS_COMMIT_DISTANCE) +MAC_PACKAGE_VERSION=6.99.0.$(MAC_COMMIT_DISTANCE) # # ** NuGet package version numbers ** @@ -66,7 +66,7 @@ MAC_PACKAGE_VERSION=6.23.0.$(MAC_COMMIT_DISTANCE) # 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) # When bumping the major macOS version in MACOS_NUGET_VERSION also update the macOS version where we execute on bots in jenkins/Jenkinsfile (in the 'node' element) -IOS_NUGET_VERSION=13.6.100 -TVOS_NUGET_VERSION=13.4.100 -WATCHOS_NUGET_VERSION=6.2.100 +IOS_NUGET_VERSION=14.0.100 +TVOS_NUGET_VERSION=14.0.100 +WATCHOS_NUGET_VERSION=7.0.100 MACOS_NUGET_VERSION=10.15.100 diff --git a/Makefile b/Makefile index a39c0db2115d..e79f30ee18b1 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,8 @@ 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)"; \ @@ -29,6 +31,8 @@ check-system: 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 @echo "Building the packages:" @echo " Xamarin.iOS $(IOS_PACKAGE_VERSION)" diff --git a/Versions-ios.plist.in b/Versions-ios.plist.in index dc7931cfc8ef..4a2835b4e261 100644 --- a/Versions-ios.plist.in +++ b/Versions-ios.plist.in @@ -40,6 +40,7 @@ 13.4 13.5 13.6 + 14.0 tvOS @@ -63,10 +64,10 @@ 13.2 13.3 13.4 + 14.0 watchOS - 1.0 2.0 2.1 2.2 @@ -84,6 +85,7 @@ 6.0 6.1 6.2 + 7.0 RecommendedXcodeVersion diff --git a/Versions-mac.plist.in b/Versions-mac.plist.in index cf9e9348c224..be4d035b855b 100644 --- a/Versions-mac.plist.in +++ b/Versions-mac.plist.in @@ -17,6 +17,8 @@ 10.13 10.14 10.15 + + RecommendedXcodeVersion diff --git a/dotnet/targets/Xamarin.Shared.Sdk.DefaultItems.targets b/dotnet/targets/Xamarin.Shared.Sdk.DefaultItems.targets index e59fc2e3d2b7..a238089ca615 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.DefaultItems.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.DefaultItems.targets @@ -77,6 +77,7 @@ RuntimePackNamePatterns="Microsoft.$(_PlatformName).Runtime.**RID**" RuntimePackRuntimeIdentifiers="$(_RuntimePackRuntimeIdentifiers)" Profile="$(_PlatformName)" + IsTrimmable="true" /> diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index 4df7ca85fa80..aae66bfdc367 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -383,7 +383,7 @@ - + <_MonoLibraryFixed Include="@(_MonoLibrary -> '$(_IntermediateNativeLibraryDir)%(Filename)%(Extension)')" /> diff --git a/external/Xamarin.MacDev b/external/Xamarin.MacDev index 5e08f5f2fdf3..c490a36fe649 160000 --- a/external/Xamarin.MacDev +++ b/external/Xamarin.MacDev @@ -1 +1 @@ -Subproject commit 5e08f5f2fdf36110f563207f75f4685e582cc047 +Subproject commit c490a36fe6490feddd1ed6635857d9616290e65b diff --git a/external/macios-binaries b/external/macios-binaries index 3fbdcdb97459..5b4f91e14dc1 160000 --- a/external/macios-binaries +++ b/external/macios-binaries @@ -1 +1 @@ -Subproject commit 3fbdcdb97459ca2c699d47e33028a106b95a7f1f +Subproject commit 5b4f91e14dc18dc57b9ac7978c696883e289f94f diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 90330f35022e..9250f1e7f284 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -434,8 +434,8 @@ def abortExecutingBuilds () } timestamps { - def mainMacOSVersion = 15 - node ("xamarin-macios && macos-10.${mainMacOSVersion}") { + def mainMacOSVersion = "10.15" + node ("xamarin-macios && macos-${mainMacOSVersion}") { try { timeout (time: 15, unit: 'HOURS') { // Hard-code a workspace, since branch-based and PR-based @@ -884,23 +884,22 @@ timestamps { def lastOS = sh (returnStdout: true, script: "grep ^MACOS_NUGET_VERSION= '${workspace}/xamarin-macios/Make.versions' | sed -e 's/.*=//' -e 's/.[0-9]*\$//'").trim ().split ("\\.")[1].toInteger () def macOSes = [] def excludedOSes = [] - for (os = firstOS; os <= lastOS; os++) - macOSes.add (os) // If any macOS version needs to be excluded manually, it can be done like this (in this case to remove macOS 10.14): // Any macOS versions excluded like this still get a entry in the Jenkins UI, making it explicit that the OS version was skipped. - // excludedOSes.add (14) + // excludedOSes.add ("10.14") + excludedOSes.add ("11.0") // We have a bot labelled as 10.16 (and we're running there) // Have in mind that the value in the list is only the minor part of the macOS version number. for (i = 0; i < macOSes.size (); i++) { def os = macOSes [i]; def macOS = "${os}" // Need to bind the label variable before the closure def excluded = false - def nodeText = "XM tests on 10.${macOS}" + def nodeText = "XM tests on ${macOS}" if (indexOfElement (excludedOSes, os) >= 0) { excluded = true - nodeText = "ℹ️ XM tests not executed on 10.${macOS} ℹ️" + nodeText = "ℹ️ XM tests not executed on ${macOS} ℹ️" } else if (os == mainMacOSVersion) { excluded = true - nodeText = "ℹ️ XM tests not executed on a separate 10.${macOS} bot because they're already executed as a part of the main test run ℹ️" + nodeText = "ℹ️ XM tests not executed on a separate ${macOS} bot because they're already executed as a part of the main test run ℹ️" } builders [nodeText] = { try { @@ -916,8 +915,8 @@ timestamps { } } } catch (err) { - currentStage = "Running XM tests on '10.${macOS}'" - def msg = "Xamarin.Mac tests on 10.${macOS} failed: " + err.getMessage (); + currentStage = "Running XM tests on '${macOS}'" + def msg = "Xamarin.Mac tests on ${macOS} failed: " + err.getMessage (); appendFileComment ("🔥 [${msg}](${env.RUN_DISPLAY_URL}) 🔥\n") failedStages.add (currentStage) throw err diff --git a/jenkins/list-macos-platforms.csharp b/jenkins/list-macos-platforms.csharp new file mode 100755 index 000000000000..dc1b45f2b1de --- /dev/null +++ b/jenkins/list-macos-platforms.csharp @@ -0,0 +1,28 @@ +#!/usr/bin/env /Library/Frameworks/Mono.framework/Commands/csharp + +using System.IO; +using System.Text; +using System.Xml; + +var args = Environment.GetCommandLineArgs (); +var expectedArgumentCount = 1; +if (args.Length != expectedArgumentCount + 2 /* 2 default arguments (executable + script) + 'expectedArgumentCount' arguments we're interested in */) { + // first arg is "/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/4.5/csharp.exe" + // second arg the script itself + // then comes the ones we care about + Console.WriteLine ($"Need {expectedArgumentCount} arguments, got {args.Length - 2}"); + Environment.Exit (1); + return; +} + +var plistPath = args [2]; +var doc = new XmlDocument (); +doc.Load (plistPath); +var nodes = doc.SelectNodes ($"/plist/dict/key[text()='KnownVersions']/following-sibling::dict[1]/key[text()='macOS']/following-sibling::array[1]/string"); + +var sb = new StringBuilder (); +foreach (XmlNode n in nodes) + sb.Append ($"{n.InnerText} "); +Console.WriteLine (sb); + +Environment.Exit (0); diff --git a/mk/xamarin.mk b/mk/xamarin.mk index 45f3ebb48ad5..6db06b0a41dd 100644 --- a/mk/xamarin.mk +++ b/mk/xamarin.mk @@ -7,7 +7,7 @@ MONO_BRANCH := $(shell cd $(MONO_PATH) 2> /dev/null && git symbolic-ref --sho endif ifdef ENABLE_XAMARIN -NEEDED_MACCORE_VERSION := ab4c99c9059656110b8f5cab8c4fb07f7f2f5bb9 +NEEDED_MACCORE_VERSION := d1f2dfa9a9189a77c7b6acc1f00c4a45ada6b2d4 NEEDED_MACCORE_BRANCH := main MACCORE_DIRECTORY := maccore diff --git a/msbuild/Makefile b/msbuild/Makefile index 364647925979..b644e65b63cd 100644 --- a/msbuild/Makefile +++ b/msbuild/Makefile @@ -325,9 +325,12 @@ DOTNET_TARGETS += \ $(foreach target,$(DOTNET_WATCHOS_FILES) ,$(DOTNET_DESTDIR)/$(WATCHOS_NUGET).Sdk/tools/msbuild/watchOS/$(notdir $(target))) \ # macOS +ifdef INCLUDE_MAC DOTNET_TARGETS += \ $(foreach target,$(DOTNET_MACOS_FILES) ,$(DOTNET_DESTDIR)/$(MACOS_NUGET).Sdk/tools/msbuild/macOS/$(notdir $(target))) \ +endif + DOTNET_DIRECTORIES += \ $(DOTNET_DESTDIR)/$(IOS_NUGET).Sdk/tools/msbuild/iOS \ $(DOTNET_DESTDIR)/$(TVOS_NUGET).Sdk/tools/msbuild/iOS \ diff --git a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets index e1893dd51df6..ffda2aade8a4 100644 --- a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets +++ b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets @@ -481,33 +481,6 @@ Copyright (C) 2014 Xamarin. All rights reserved. - - - - - - - - - - diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.targets b/msbuild/Xamarin.Shared/Xamarin.Shared.targets index 40251bfdd963..97815c3672a8 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.targets +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.targets @@ -284,6 +284,64 @@ Copyright (C) 2018 Microsoft. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.WatchApp.Common.targets b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.WatchApp.Common.targets index bc09982ef0b0..ffa39fe4c783 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.WatchApp.Common.targets +++ b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.WatchApp.Common.targets @@ -15,80 +15,7 @@ Copyright (C) 2015-2016 Xamarin. All rights reserved. --> - - - - True - False - - - - - - - - - - - - - - - - - - - - - <_CompileToNativeDependsOn> - $(_CompileToNativeDependsOn); - _ResolveNativeWatchApp - - - - - - - - - - - - - - + + - - - - - - - diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/FrameworkListTest.cs b/msbuild/tests/Xamarin.iOS.Tasks.Tests/FrameworkListTest.cs index 1ae3843410df..df6d52a890a6 100644 --- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/FrameworkListTest.cs +++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/FrameworkListTest.cs @@ -22,6 +22,24 @@ public void CheckFrameworkListFile (string frameworkListFile) { var fameworkListFileParts = frameworkListFile.Split ('-'); string frameworkName = fameworkListFileParts[0]; + switch (frameworkName) { + case "Xamarin.iOS": + if (!Configuration.include_ios) + Assert.Inconclusive ("include_ios is disabled"); + break; + case "Xamarin.TVOS": + if (!Configuration.include_tvos) + Assert.Inconclusive ("include_tvos is disabled"); + break; + case "Xamarin.WatchOS": + if (!Configuration.include_watchos) + Assert.Inconclusive ("include_watchos is disabled"); + break; + case "Xamarin.Mac": + if (!Configuration.include_mac) + Assert.Inconclusive ("include_mac is disabled"); + break; + } var isMac = frameworkName == "Xamarin.Mac"; var isFull = fameworkListFileParts[1] == "Full"; var frameworkListAssemblies = ScanFrameworkListXml (frameworkListFile, isMac); diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/CoreMLCompiler.cs b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/CoreMLCompiler.cs index 842030ae84db..2a2407d56c76 100644 --- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/CoreMLCompiler.cs +++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/CoreMLCompiler.cs @@ -1,9 +1,11 @@ -using System.IO; +using System.IO; using System.Linq; using System.Threading; using System.Diagnostics; using System.Collections.Generic; +using Xamarin.Tests; + using NUnit.Framework; namespace Xamarin.iOS.Tasks @@ -25,10 +27,17 @@ void AssertCompiledModelExists (string modelName) var files = new HashSet (Directory.EnumerateFiles (mlmodelc, "*.*", SearchOption.AllDirectories)); - Assert.AreEqual (expected.Length, files.Count); - foreach (var name in expected) Assert.IsTrue (files.Contains (Path.Combine (mlmodelc, name)), "{0} not found", name); + + var expected_length = expected.Length; + if (Configuration.XcodeVersion.Major >= 12) { + Assert.IsTrue (files.Contains (Path.Combine (mlmodelc, "metadata.json")), " metadata.json not found"); + expected_length++; + Assert.IsTrue (files.Contains (Path.Combine (mlmodelc, "analytics", "coremldata.bin")), "analytics/coremldata.bin not found"); + expected_length++; + } + Assert.AreEqual (expected_length, files.Count, "File count"); } [Test] diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/EmbeddedExtension.cs b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/EmbeddedExtension.cs index 20bf579ac862..6b8334fc6d8d 100644 --- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/EmbeddedExtension.cs +++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/EmbeddedExtension.cs @@ -23,10 +23,10 @@ public void BasicTest () var xcodeProjectFolder = Path.Combine (mtouchPaths.ProjectPath , "..", "..", "native"); string [] xcodeBuildArgs = new [] { "-configuration", "Debug", "-target", "NativeTodayExtension", "-sdk", "iphonesimulator" }; var env = new System.Collections.Generic.Dictionary { { "DEVELOPER_DIR", Configuration.XcodeLocation } }; - Assert.AreEqual (0, ExecutionHelper.Execute ("/usr/bin/xcodebuild", xcodeBuildArgs.Concat (new [] { "clean" }).ToArray (), out var _, workingDirectory: xcodeProjectFolder, environment_variables: env, stdout_callback: Console.WriteLine, stderr_callback: Console.Error.WriteLine)); + Assert.AreEqual (0, ExecutionHelper.Execute ("/usr/bin/xcodebuild", xcodeBuildArgs.Concat (new [] { "clean" }).ToList (), xcodeProjectFolder, Console.WriteLine, Console.Error.WriteLine)); var buildOutput = new StringBuilder (); - var buildCode = ExecutionHelper.Execute ("/usr/bin/xcodebuild", xcodeBuildArgs.Concat (new [] { "build" }).ToArray (), out var _, workingDirectory: xcodeProjectFolder, environment_variables: env, stdout_callback: t => buildOutput.Append (t), stderr_callback: t => buildOutput.Append (t)); + var buildCode = ExecutionHelper.Execute ("/usr/bin/xcodebuild", xcodeBuildArgs.Concat (new [] { "build" }).ToList (), xcodeProjectFolder, t => buildOutput.Append (t), t => buildOutput.Append (t)); Assert.AreEqual (0, buildCode, $"Build Failed:{buildOutput}"); AppBundlePath = mtouchPaths.AppBundlePath; @@ -36,7 +36,9 @@ public void BasicTest () RunTarget (proj, "Clean", 0); RunTarget (proj, "Build", 0); - Assert.That (File.Exists (Path.Combine (AppBundlePath, "PlugIns", "NativeTodayExtension.appex", "NativeTodayExtension")), "NativeTodayExtension"); + var expectedFilepath = Path.Combine (AppBundlePath, "PlugIns", "NativeTodayExtension.appex", "NativeTodayExtension"); + + Assert.That (File.Exists (expectedFilepath), $"NativeTodayExtension, file path '{expectedFilepath}' missing."); } } } diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/Extensions/WatchKit.cs b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/Extensions/WatchKit.cs index d4841b70e990..e537540e0073 100644 --- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/Extensions/WatchKit.cs +++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/Extensions/WatchKit.cs @@ -11,8 +11,6 @@ namespace Xamarin.iOS.Tasks { [TestFixture ("iPhoneSimulator")] public class WatchKit : ExtensionTestBase { - bool isXcode10OrLater = Configuration.XcodeVersion.Major >= 10; - public WatchKit (string platform) : base(platform) { } @@ -20,106 +18,13 @@ public WatchKit (string platform) : base(platform) [Test] public void BasicTest () { - this.BuildExtension ("MyWatchApp", "MyWatchKitExtension", Platform, "Debug", expectedErrorCount: isXcode10OrLater ? 1 : 0, additionalAsserts: (ProjectPaths mtouchPaths) => + this.BuildExtension ("MyWatchApp", "MyWatchKitExtension", Platform, "Debug", expectedErrorCount: 1, additionalAsserts: (ProjectPaths mtouchPaths) => { Assert.IsTrue (Directory.Exists (Path.Combine (mtouchPaths.AppBundlePath, "PlugIns", "MyWatchKitExtension.appex")), "appex"); Assert.IsFalse (Directory.Exists (Path.Combine (mtouchPaths.AppBundlePath, "PlugIns", "MyWatchKitExtension.appex", "Frameworks")), "frameworks"); }); - if (isXcode10OrLater) - Assert.AreEqual ("Xcode 10 does not support watchOS 1 apps. Either upgrade to watchOS 2 apps, or use an older version of Xcode.", Engine.Logger.ErrorEvents[0].Message, "WK 1 error message"); - } - - [Test] - public void InvalidBundleIdTest () - { - if (isXcode10OrLater) - Assert.Ignore ("WK 1 apps are not supported when running with Xcode 10+."); - - var mtouchPaths = SetupProjectPaths ("MyWatchApp", platform: Platform); - using (var xiproj = XIProject.Clone (mtouchPaths.ProjectPath, "MyWatchKitExtension", "MyWatchKitApp")) { - mtouchPaths = SetupProjectPaths ("MyWatchApp", "MyWatchApp", xiproj.ProjectDirectory, platform: Platform); - - var appInfoPath = Path.Combine (mtouchPaths.ProjectPath, "Info.plist"); - var appInfoContents = File.ReadAllText (appInfoPath); - if (!appInfoContents.Contains ("com.xamarin.MyWatchApp")) - Assert.Fail ("Info.plist did not contain 'com.xamarin.MyWatchApp'"); - File.WriteAllText (appInfoPath, appInfoContents.Replace ("com.xamarin.MyWatchApp", "com.xamarin.MyWatchAppX")); - - var proj = SetupProject (Engine, mtouchPaths.ProjectCSProjPath); - Engine.ProjectCollection.SetGlobalProperty ("Platform", Platform); - AppBundlePath = mtouchPaths ["app_bundlepath"]; - RunTarget (proj, "Build", 2); - Assert.AreEqual ("The App Extension 'WatchExtension' has an invalid CFBundleIdentifier (com.xamarin.MyWatchApp.WatchExtension), it does not begin with the main app bundle's CFBundleIdentifier (com.xamarin.MyWatchAppX).", Engine.Logger.ErrorEvents [0].Message, "#1"); - Assert.AreEqual ("The Watch App 'WatchApp' has an invalid WKCompanionAppBundleIdentifier value ('com.xamarin.MyWatchApp'), it does not match the main app bundle's CFBundleIdentifier ('com.xamarin.MyWatchAppX').", Engine.Logger.ErrorEvents [1].Message, "#2"); - } - } - - [Test] - public void CreateIpa () - { - if (isXcode10OrLater) - Assert.Ignore ("WK 1 apps are not supported when running with Xcode 10+."); - - if (Platform == "iPhoneSimulator") - return; // this is a device-only test. - - const string hostAppName = "MyWatchApp"; -// string extensionName = "MyWatchKitExtension"; - const string configuration = "Release"; - - var mtouchPaths = SetupProjectPaths (hostAppName, "../", true, Platform, configuration); - var proj = SetupProject (Engine, mtouchPaths.ProjectCSProjPath); - - AppBundlePath = mtouchPaths.AppBundlePath; - - Engine.ProjectCollection.SetGlobalProperty ("Platform", Platform); - Engine.ProjectCollection.SetGlobalProperty ("BuildIpa", "true"); - Engine.ProjectCollection.SetGlobalProperty ("IpaIncludeArtwork", "true"); - Engine.ProjectCollection.SetGlobalProperty ("CodesignProvision", "Automatic"); // Provisioning profile - Engine.ProjectCollection.SetGlobalProperty ("CodesignKey", "iPhone Developer"); - Engine.ProjectCollection.SetGlobalProperty ("Configuration", configuration); - - RunTarget (proj, "Clean"); - Assert.IsFalse (Directory.Exists (AppBundlePath), "{1}: App bundle exists after cleanup: {0} ", AppBundlePath, Platform); - - proj = SetupProject (Engine, mtouchPaths.ProjectCSProjPath); - RunTarget (proj, "Build"); - - var plist = PDictionary.FromFile (Path.Combine (AppBundlePath, "Info.plist")); - Assert.IsTrue (plist.ContainsKey ("CFBundleExecutable")); - Assert.IsTrue (plist.ContainsKey ("CFBundleVersion")); - Assert.IsNotEmpty (((PString)plist["CFBundleExecutable"]).Value); - Assert.IsNotEmpty (((PString)plist["CFBundleVersion"]).Value); - - var ipaPath = Path.Combine (mtouchPaths.ProjectBinPath, hostAppName + ".ipa"); - var payloadPath = "Payload/"; - var watchkitSupportPath = "WatchKitSupport/"; - - Assert.IsTrue (File.Exists (ipaPath), "IPA package does not exist: {0}", ipaPath); - - var startInfo = new ProcessStartInfo ("/usr/bin/zipinfo", "-1 \"" + ipaPath + "\""); - startInfo.RedirectStandardOutput = true; - startInfo.UseShellExecute = false; - var process = new Process (); - process.StartInfo = startInfo; - process.Start (); - var output = process.StandardOutput.ReadToEnd (); - process.WaitForExit (); - - var lines = output.Split (new char [] { '\n' }, StringSplitOptions.RemoveEmptyEntries); - - Assert.Contains (payloadPath, lines, payloadPath + " does not exist"); - Assert.Contains (watchkitSupportPath, lines, watchkitSupportPath + " does not exist"); - - string wkPath = "WatchKitSupport/WK"; - Assert.Contains (wkPath, lines, wkPath + " does not exist"); - - var ipaIncludeArtwork = proj.GetPropertyValue ("IpaIncludeArtwork"); - Assert.IsTrue (output.Contains ("iTunesMetadata.plist"), string.Format ("The ipa should contain at least one iTunesMetadata.plist file if we are using an AppStore config and IpaIncludeArtwork is true. IpaIncludeArtwork: {0}", ipaIncludeArtwork)); - - RunTarget (proj, "Clean"); - Assert.IsFalse (File.Exists (ipaPath), "IPA package still exists after Clean: {0}", ipaPath); + Assert.AreEqual ("Xamarin.iOS 14+ does not support watchOS 1 apps. Please migrate your project to watchOS 2+.", Engine.Logger.ErrorEvents[0].Message, "WK 1 error message"); } } } diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj b/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj index b8592fd97045..9836c3474734 100644 --- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj +++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj @@ -56,9 +56,6 @@ ExecutionHelper.cs - - Execution.cs - Cache.cs diff --git a/runtime/Makefile b/runtime/Makefile index c8a5522914f5..e9251a844202 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -77,7 +77,6 @@ MONOTOUCH_HEADERS = \ MONOTOUCH_LIBS = \ libextension.a \ - libwatchextension.a \ libtvextension.a \ libapp.a \ libxamarin.a \ @@ -197,11 +196,11 @@ $(eval $(call PlatformTemplate,tvsimulator,TVSIMULATOR,x86_64)) endif # -# LibTemplate we build three different libraries from the same source code, -# libapp.a, libextension.a and libwatchextension.a. +# LibTemplate we build two different libraries from the same source code, +# libapp.a and libextension.a # # They're all built from the same soure file (extension-main.m), but with different defines: -# libextension.a has EXTENSION defined, while libwatchextension.a has WATCH_EXTENSION defined. +# libextension.a has EXTENSION defined. # define LibTemplate @@ -225,14 +224,6 @@ $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/tvextension-main.$$(arch).o): $(Q) rm -f $$@ $$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@ -.libs/$(1)/libwatchextension.%.a: .libs/$(1)/watchextension-main.%.o - $(Q) rm -f $$@ - $$(call Q_2,AR, [$1]) $(DEVICE_BIN_PATH)/ar cru $$@ $$^ - -.libs/$(1)/libwatchextension.a: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libwatchextension.$$(arch).a) - $(Q) rm -f $$@ - $$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@ - .libs/$(1)/libtvextension.%.a: .libs/$(1)/tvextension-main.%.o $(Q) rm -f $$@ $$(call Q_2,AR, [$1]) $(DEVICE_BIN_PATH)/ar cru $$@ $$^ diff --git a/runtime/bindings-generator.cs b/runtime/bindings-generator.cs index a0a389555b3d..3417b8e2564d 100644 --- a/runtime/bindings-generator.cs +++ b/runtime/bindings-generator.cs @@ -2682,6 +2682,18 @@ static IEnumerable GetFunctionData () } ); + data.Add ( + new FunctionData { + Comment = " // void func (NVector3, IntPtr)", + Prefix = "simd__", + Variants = Variants.NonStret, + Parameters = new ParameterData [] { + new ParameterData { TypeData = Types.NVector3 }, + new ParameterData { TypeData = Types.IntPtr } + } + } + ); + // We must expand functions with native types to their actual type as well. for (int i = data.Count - 1; i >= 0; i--) { if (!data [i].HasNativeType) diff --git a/runtime/extension-main.m b/runtime/extension-main.m index af6443c7457b..2d9b9595e6f2 100644 --- a/runtime/extension-main.m +++ b/runtime/extension-main.m @@ -19,7 +19,7 @@ #elif EXTENSION xamarin_extension_main = NSExtensionMain; #elif WATCH_EXTENSION - xamarin_extension_main = main; + xamarin_extension_main = xamarin_watch_extension_main; #else xamarin_extension_main = NULL; #endif diff --git a/runtime/main-internal.h b/runtime/main-internal.h index b5fa37fb06de..63bc852b1264 100644 --- a/runtime/main-internal.h +++ b/runtime/main-internal.h @@ -14,8 +14,9 @@ extern "C" { //#endif #ifdef WATCH_EXTENSION -// WatchKit.framework defines a main function. - int main (int argc, char **argv); +// Some versions of WatchKit.framework defines a main function, others don't. +// We decide which one to use in our GenerateMain function + int xamarin_watch_extension_main (int argc, char **argv); #endif #ifdef TV_EXTENSION diff --git a/src/ARKit/ARSkeleton.cs b/src/ARKit/ARSkeleton.cs new file mode 100644 index 000000000000..9dd2081a422f --- /dev/null +++ b/src/ARKit/ARSkeleton.cs @@ -0,0 +1,23 @@ +using System; +using System.ComponentModel; +using System.Runtime.InteropServices; + +using Foundation; +using ObjCRuntime; + +namespace ARKit { + public partial class ARSkeleton { + + [iOS (14,0)] + [DllImport (Constants.ARKitLibrary)] + static extern IntPtr /* NSString */ ARSkeletonJointNameForRecognizedPointKey (/* NSString */ IntPtr recognizedPointKey); + + [iOS (14,0)] + public static NSString CreateJointName (NSString recognizedPointKey) + { + if (recognizedPointKey == null) + throw new ArgumentNullException (nameof (recognizedPointKey)); + return (NSString) Runtime.GetNSObject (ARSkeletonJointNameForRecognizedPointKey (recognizedPointKey.Handle)); + } + } +} diff --git a/src/AVFoundation/Enums.cs b/src/AVFoundation/Enums.cs index 9d79aae63c54..d57acd834df5 100644 --- a/src/AVFoundation/Enums.cs +++ b/src/AVFoundation/Enums.cs @@ -332,6 +332,12 @@ public enum AVAudioSessionSetActiveOptions : ulong { public enum AVAudioSessionPortOverride : ulong { None = 0, [NoTV] +#if XAMCORE_4_0 // Removed in Xcode 12 GM + [NoMac, NoWatch] +#else + [Obsoleted (PlatformName.WatchOS, 2,0, message : "Unavailable and will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,7, message : "Unavailable and will be removed in the future.")] +#endif Speaker = 0x73706b72 // 'spkr' } @@ -354,15 +360,42 @@ public enum AVAudioSessionRouteChangeReason : ulong { public enum AVAudioSessionCategoryOptions : ulong { MixWithOthers = 1, DuckOthers = 2, +#if XAMCORE_4_0 // Removed in Xcode 12 GM + [NoMac, NoWatch] +#else + [Obsoleted (PlatformName.WatchOS, 2,0, message : "Unavailable and will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,7, message : "Unavailable and will be removed in the future.")] +#endif [NoTV] AllowBluetooth = 4, +#if XAMCORE_4_0 // Removed in Xcode 12 GM + [NoMac, NoWatch] +#else + [Obsoleted (PlatformName.WatchOS, 2,0, message : "Unavailable and will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,7, message : "Unavailable and will be removed in the future.")] +#endif [NoTV] DefaultToSpeaker = 8, +#if XAMCORE_4_0 // Removed in Xcode 12 GM + [NoMac] +#else + [Obsoleted (PlatformName.MacOSX, 10,7, message : "Unavailable and will be removed in the future.")] +#endif [iOS (9,0)] InterruptSpokenAudioAndMixWithOthers = 17, +#if XAMCORE_4_0 // Removed in Xcode 12 GM + [NoMac] +#else + [Obsoleted (PlatformName.MacOSX, 10,7, message : "Unavailable and will be removed in the future.")] +#endif [NoWatch, iOS (10,0), TV (10,0)] AllowBluetoothA2DP = 32, +#if XAMCORE_4_0 // Removed in Xcode 12 GM + [NoMac] +#else + [Obsoleted (PlatformName.MacOSX, 10,7, message : "Unavailable and will be removed in the future.")] +#endif [NoWatch, iOS (10,0), TV (10,0)] AllowAirPlay = 64, } @@ -728,7 +761,7 @@ public enum AVPlayerViewControllerSkippingBehavior : long { SkipItem } - [TV (10,2), Mac (10,12,4), iOS (10,3), NoWatch] + [TV (10,2), Mac (10,12,4), iOS (10,3), Watch (7,0)] [Native] public enum AVContentKeyRequestStatus : long { Requesting, @@ -739,7 +772,7 @@ public enum AVContentKeyRequestStatus : long { Failed } - [TV (10, 2), Mac (10, 12, 4), iOS (10, 3), NoWatch] + [TV (10, 2), Mac (10, 12, 4), iOS (10, 3), Watch (7, 0)] public enum AVContentKeyRequestRetryReason { [Field ("AVContentKeyRequestRetryReasonTimedOut")] TimedOut, @@ -749,19 +782,20 @@ public enum AVContentKeyRequestRetryReason { ReceivedObsoleteContentKey, } - [TV (10, 2), Mac (10, 12, 4), iOS (10, 3), NoWatch] + [TV (10, 2), Mac (10, 12, 4), iOS (10, 3), Watch (7, 0)] public enum AVContentKeySystem { [Field ("AVContentKeySystemFairPlayStreaming")] FairPlayStreaming = 0, - [TV (11, 0), NoWatch, Mac (10, 13), iOS (11, 0)] + [TV (11, 0), Mac (10, 13), iOS (11, 0)] [Field ("AVContentKeySystemClearKey")] ClearKey = 1, + [NoWatch] [Obsolete ("Use 'AVContentKeySystem.SystemClearKey' instead.")] AVContentKeySystemClearKey = ClearKey, - [TV (13,0), NoWatch, Mac (10,15), iOS (13,0)] + [TV (13,0), Mac (10,15), iOS (13,0)] [Field ("AVContentKeySystemAuthorizationToken")] AuthorizationToken = 2, } @@ -873,7 +907,9 @@ public enum AVAudioEngineManualRenderingStatus : long { public enum AVAudioSessionRouteSharingPolicy : ulong { Default = 0, LongForm = 1, - Independent = 2 + Independent = 2, + [iOS (14,0), NoWatch, NoTV, NoMac] + LongFormVideo = 3, } [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] @@ -1062,4 +1098,50 @@ public enum AVAudio3DMixingPointSourceInHeadMode : long { Bypass = 1, } + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Native] + public enum AVAssetSegmentType : long { + Initialization = 1, + Separable = 2, + } + + [Flags] + [Native] + [TV (14, 0), Watch (7, 0), Mac (11, 0), iOS (14, 0)] + public enum AVAudioSpatializationFormats : ulong { + None = 0, + MonoAndStereo = 3, + Multichannel = 4, + MonoStereoAndMultichannel = 7, + } + + [Native] + [TV (14, 0), Watch (7, 0), Mac (11, 0), iOS (14, 0)] + public enum AVAudioStereoOrientation : long { + None = 0, + Portrait = 1, + PortraitUpsideDown = 2, + LandscapeRight = 3, + LandscapeLeft = 4, + } + + [TV (14, 0), Watch (7, 0), Mac (11, 0), iOS (14, 0)] + public enum AVFileTypeProfile { + [Field (null)] + None = 0, + [Field ("AVFileTypeProfileMPEG4AppleHLS")] + Mpeg4AppleHls, + [Field ("AVFileTypeProfileMPEG4CMAFCompliant")] + Mpeg4CmafCompliant, + } + + [Native] + [NoTV, NoWatch, Mac (11, 0), NoiOS] + public enum AVAudioRoutingArbitrationCategory : long { + Playback = 0, + PlayAndRecord = 1, + PlayAndRecordVoice = 2, + } + + } diff --git a/src/AppKit/Enums.cs b/src/AppKit/Enums.cs index 63ce9c3c627e..7d77cd1caa50 100644 --- a/src/AppKit/Enums.cs +++ b/src/AppKit/Enums.cs @@ -327,9 +327,11 @@ public enum NSControlTint : ulong { [Native] public enum NSControlSize : ulong { - Regular, - Small, - Mini + Regular = 0, + Small = 1, + Mini = 2, + [Mac (11,0)] + Large = 3, } [Native] @@ -1514,6 +1516,7 @@ public enum NSFontSymbolicTraits : int { // uint32_t NSFontSymbolicTraits TraitTightLeading = 1 << 15, [Mac (10,13)] TraitLooseLeading = 1 << 16, + TraitEmphasized = BoldTrait, UnknownClass = 0 << 28, OldStyleSerifsClass = 1 << 28, TransitionalSerifsClass = 2 << 28, @@ -1741,6 +1744,7 @@ public enum NSTokenStyle : ulong { [Flags] [Native] + [Deprecated (PlatformName.MacOSX, 11, 0)] public enum NSWorkspaceLaunchOptions : ulong { Print = 2, InhibitingBackgroundOnly = 0x80, @@ -3013,4 +3017,68 @@ public enum NSWorkspaceAuthorizationType : long { SetAttributes, ReplaceFile, } + + [Mac (11,0)] + [Native] + public enum NSTableViewStyle : long + { + Automatic, + FullWidth, + Inset, + SourceList, + } + + [Mac (11,0)] + [Native] + public enum NSTitlebarSeparatorStyle : long + { + Automatic, + None, + Line, + Shadow, + } + + [Mac (11,0)] + [Native] + public enum NSWindowToolbarStyle : long + { + Automatic, + Expanded, + Preference, + Unified, + UnifiedCompact, + } + + [Flags] + [Native] + public enum NSTableViewAnimationOptions : ulong + { + EffectNone = 0x0, + EffectFade = 0x1, + EffectGap = 0x2, + SlideUp = 0x10, + SlideDown = 0x20, + SlideLeft = 0x30, + SlideRight = 0x40, + } + + [Mac (11,0)] + [Native] + public enum NSImageSymbolScale : long + { + Small = 1, + Medium = 2, + Large = 3, + } + + [Mac (11,0)] + [Flags] + [Native] + public enum NSLineBreakStrategy : ulong + { + None = 0x0, + PushOut = 1uL << 0, + HangulWordPriority = 1uL << 1, + Standard = 0xffff, + } } diff --git a/src/AppKit/NSWorkspace.cs b/src/AppKit/NSWorkspace.cs index 8f5d4693ff9e..c45cf3a58710 100644 --- a/src/AppKit/NSWorkspace.cs +++ b/src/AppKit/NSWorkspace.cs @@ -9,17 +9,20 @@ namespace AppKit { public partial class NSWorkspace { + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSWorkspace.OpenUrls' with completion handler.")] public virtual bool OpenUrls (NSUrl[] urls, string bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor, string[] identifiers) { // Ignore the passed in argument, because if you pass it in we will crash on cleanup. return _OpenUrls (urls, bundleIdentifier, options, descriptor, null); } + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSWorkspace.OpenUrls' with completion handler.")] public virtual bool OpenUrls (NSUrl[] urls, string bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor) { return _OpenUrls (urls, bundleIdentifier, options, descriptor, null); } + [Advice ("Use 'NSWorkSpace.IconForContentType' instead.")] public virtual NSImage IconForFileType (string fileType) { var nsFileType = NSString.CreateNative (fileType); @@ -31,6 +34,7 @@ public virtual NSImage IconForFileType (string fileType) } } + [Advice ("Use 'NSWorkSpace.IconForContentType' instead.")] public virtual NSImage IconForFileType (HfsTypeCode typeCode) { var nsFileType = GetNSFileType ((uint) typeCode); diff --git a/src/AudioToolbox/Enums.cs b/src/AudioToolbox/Enums.cs index 2c7690b7be1c..c8d62ee85c28 100644 --- a/src/AudioToolbox/Enums.cs +++ b/src/AudioToolbox/Enums.cs @@ -13,4 +13,29 @@ public enum AudioSettingsFlags : uint MetaParameter = (1u << 2), UserInterfaceParameter = (1u << 3), } + + [NoWatch, TV (14, 0), Mac (11, 0), iOS (14, 0)] + public enum AUSpatialMixerOutputType : uint + { + Headphones = 1, + BuiltInSpeakers = 2, + ExternalSpeakers = 3, + } + + [NoWatch, TV (14, 0), Mac (11, 0), iOS (14, 0)] + public enum AUSpatialMixerPointSourceInHeadMode : uint + { + Mono = 0, + Bypass = 1, + } + + [NoWatch, TV (14, 0), Mac (11, 0), iOS (14, 0)] + public enum AUSpatialMixerSourceMode : uint + { + SpatializeIfMono = 0, + Bypass = 1, + PointSource = 2, + AmbienceBed = 3, + } + } diff --git a/src/AudioUnit/AudioComponent.cs b/src/AudioUnit/AudioComponent.cs index ff2cf0d38125..cb0b373acf69 100644 --- a/src/AudioUnit/AudioComponent.cs +++ b/src/AudioUnit/AudioComponent.cs @@ -35,6 +35,14 @@ using AudioToolbox; using CoreFoundation; using Foundation; +#if !MONOMAC +using UIKit; +#else +using AppKit; +#if !COREBUILD +using UIImage=AppKit.NSImage; +#endif +#endif namespace AudioUnit { @@ -321,6 +329,17 @@ public Version Version { } } + [NoWatch, TV (14,0), Mac (11,0), iOS (14,0)] + [DllImport (Constants.AudioUnitLibrary)] + static extern unsafe IntPtr AudioComponentCopyIcon (IntPtr comp); + + [NoWatch, TV (14,0), iOS (14,0), Mac (11,0)] + public UIImage CopyIcon () + { + var ptr = AudioComponentCopyIcon (handle); + return Runtime.GetNSObject (ptr, owns: true); + } + #if !MONOMAC [iOS (7,0)] [DllImport(Constants.AudioUnitLibrary)] diff --git a/src/AudioUnit/AudioUnit.cs b/src/AudioUnit/AudioUnit.cs index 4a1cbbb99251..62f5a1d4bd32 100644 --- a/src/AudioUnit/AudioUnit.cs +++ b/src/AudioUnit/AudioUnit.cs @@ -1080,6 +1080,8 @@ public enum AudioObjectPropertySelector : uint TranslateBundleIDToTransportManager = 1953325673, // 'tmbi' BoxList = 1651472419, // 'box#' TranslateUIDToBox = 1969841250, // 'uidb' + ClockDeviceList = 1668049699, //'clk#' + TranslateUidToClockDevice = 1969841251, // 'uidc', ProcessIsMaster = 1835103092, // 'mast' IsInitingOrExiting = 1768845172, // 'inot' UserIDChanged = 1702193508, // 'euid' @@ -1089,7 +1091,10 @@ public enum AudioObjectPropertySelector : uint HogModeIsAllowed = 1752131442, // 'hogr' UserSessionIsActiveOrHeadless = 1970496882, // 'user' ServiceRestarted = 1936880500, // 'srst' - PowerHint = 1886353256 // 'powh' + PowerHint = 1886353256, // 'powh' + ActualSampleRate = 1634955892,// 'asrt', + ClockDevice = 1634755428, // 'apcd', + IOThreadOSWorkgroup = 1869838183, // 'oswg' } public enum AudioObjectPropertyScope : uint diff --git a/src/CFNetwork/CFHTTPMessage.cs b/src/CFNetwork/CFHTTPMessage.cs index bbda55a18d19..395b01527c1a 100644 --- a/src/CFNetwork/CFHTTPMessage.cs +++ b/src/CFNetwork/CFHTTPMessage.cs @@ -77,16 +77,33 @@ protected virtual void Dispose (bool disposing) static IntPtr GetVersion (Version version) { if ((version == null) || version.Equals (HttpVersion.Version11)) - return _HTTPVersion1_1.Handle; - else if (version.Equals (HttpVersion.Version10)) - return _HTTPVersion1_0.Handle; - else if (version.Major == 2 && version.Minor == 0) { - if (_HTTPVersion2_0 != null && _HTTPVersion2_0.Handle != IntPtr.Zero) - return _HTTPVersion2_0.Handle; + return _HTTPVersion1_1; + + if (version.Equals (HttpVersion.Version10)) + return _HTTPVersion1_0; + + if (version.Major == 3 && version.Minor == 0) { + // HTTP 3.0 requires OS X 10.16 or later. + if (_HTTPVersion3_0 != IntPtr.Zero) + return _HTTPVersion3_0; + else if (_HTTPVersion2_0 != IntPtr.Zero) + return _HTTPVersion2_0; + else + return _HTTPVersion1_1; + } + + if (version.Major == 2 && version.Minor == 0) { // HTTP 2.0 requires OS X 10.11 or later. - return _HTTPVersion1_1.Handle; - } else - throw new ArgumentException (); + if (_HTTPVersion2_0 != IntPtr.Zero) + return _HTTPVersion2_0; + else + return _HTTPVersion1_1; + } + + if (_HTTPVersion1_1 != IntPtr.Zero) + return _HTTPVersion1_1; + // not supporting version 1.1 is something to worry about + throw new ArgumentException (); } [DllImport (Constants.CFNetworkLibrary)] @@ -195,7 +212,7 @@ public Version Version { IntPtr ptr = CFHTTPMessageCopyVersion (handle); try { // FIXME: .NET HttpVersion does not include (yet) Version20, so Version11 is returned - if (ptr == _HTTPVersion1_0.Handle) + if (ptr == _HTTPVersion1_0) return HttpVersion.Version10; else return HttpVersion.Version11; diff --git a/src/CarPlay/CPMessageListItem.cs b/src/CarPlay/CPMessageListItem.cs new file mode 100644 index 000000000000..340e430fe43b --- /dev/null +++ b/src/CarPlay/CPMessageListItem.cs @@ -0,0 +1,50 @@ +// +// CPMessageListItem.cs +// +// Authors: +// Whitney Schmidt +// +// Copyright (c) Microsoft Corporation. +// Licensed under MIT License. +// + +using System; +using Foundation; +using ObjCRuntime; + +#nullable enable + +namespace CarPlay { + + [NoWatch, NoTV, NoMac, iOS (14,0)] + public enum CPMessageListItemType { + Identifier, + FullName, + } + + public partial class CPMessageListItem { + + public CPMessageListItem (string identifier, string text, CPMessageListItemLeadingConfiguration leadingConfiguration, + CPMessageListItemTrailingConfiguration? trailingConfiguration, string? detailText, string? trailingText) : + this (identifier, text, leadingConfiguration, trailingConfiguration, detailText, trailingText, CPMessageListItemType.Identifier) + { + } + + public CPMessageListItem (string identifier, string text, CPMessageListItemLeadingConfiguration leadingConfiguration, CPMessageListItemTrailingConfiguration? trailingConfiguration, + string? detailText, string? trailingText, CPMessageListItemType type) : base (NSObjectFlag.Empty) + { + switch (type) { + case CPMessageListItemType.Identifier: + InitializeHandle (InitWithConversationIdentifier (identifier, text, leadingConfiguration, trailingConfiguration, detailText, trailingText), + "initWithConversationIdentifier:text:leadingConfiguration:trailingConfiguration:detailText:trailingText:"); + break; + case CPMessageListItemType.FullName: + InitializeHandle (InitWithFullName (identifier, text, leadingConfiguration, trailingConfiguration, detailText, trailingText), + "initWithFullName:phoneOrEmailAddress:leadingConfiguration:trailingConfiguration:detailText:trailingText:"); + break; + default: + throw new ArgumentException (nameof (type)); + } + } + } +} diff --git a/src/ClockKit/CLKComplication.cs b/src/ClockKit/CLKComplication.cs new file mode 100644 index 000000000000..16836ab979af --- /dev/null +++ b/src/ClockKit/CLKComplication.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.InteropServices; +using Foundation; +using CoreFoundation; +using ObjCRuntime; + +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 ())) { + var families = new CLKComplicationFamily [(int)nsArray.Count]; + for (nuint i = 0; i < nsArray.Count; i++) + { + families[i] = (CLKComplicationFamily)nsArray.GetItem (i).Int32Value; + } + return families; + } + } + } +} diff --git a/src/CloudKit/CKCompat.cs b/src/CloudKit/CKCompat.cs index 86d7ebe1344e..e3637619ed4f 100644 --- a/src/CloudKit/CKCompat.cs +++ b/src/CloudKit/CKCompat.cs @@ -90,7 +90,7 @@ public partial class CKDiscoverAllContactsOperation { public delegate void CKDiscoverUserInfosCompletionHandler (NSDictionary emailsToUserInfos, NSDictionary userRecordIdsToUserInfos, NSError operationError); #if !WATCH - [Obsolete ("Use 'CKDiscoverUserIdentitiesOperation' instead.")] + [Obsoleted (PlatformName.iOS, 14, 0, message : "Use 'CKDiscoverUserIdentitiesOperation' instead.")] public partial class CKDiscoverUserInfosOperation : CKOperation { public CKDiscoverUserInfosOperation () : base () { } diff --git a/src/CloudKit/Enums.cs b/src/CloudKit/Enums.cs index 9138c47897a3..96b942a36e4c 100644 --- a/src/CloudKit/Enums.cs +++ b/src/CloudKit/Enums.cs @@ -155,8 +155,10 @@ public enum CKSubscriptionType : long { [NoWatch] [iOS (8, 0)] + [Obsoleted (PlatformName.iOS, 14, 0, message : "Use 'CKQuerySubscriptionOptions' instead.")] [Deprecated (PlatformName.iOS, 10, 0, message : "Use 'CKQuerySubscriptionOptions' instead.")] [Mac (10, 10)] + [Obsoleted (PlatformName.MacOSX, 10, 16, message : "Use 'CKQuerySubscriptionOptions' instead.")] [Deprecated (PlatformName.MacOSX, 10, 12, message : "Use 'CKQuerySubscriptionOptions' instead.")] [Flags] [Native] diff --git a/src/Constants.iOS.cs.in b/src/Constants.iOS.cs.in index b35996795455..ecb89c8be1da 100644 --- a/src/Constants.iOS.cs.in +++ b/src/Constants.iOS.cs.in @@ -134,5 +134,15 @@ namespace ObjCRuntime { public const string SoundAnalysisLibrary = "/System/Library/Frameworks/SoundAnalysis.framework/SoundAnalysis"; // iOS 13.4 public const string AutomaticAssessmentConfigurationLibrary = "/System/Library/Frameworks/AutomaticAssessmentConfiguration.framework/AutomaticAssessmentConfiguration"; + // iOS 14.0 + public const string AccessibilityLibrary = "/System/Library/Frameworks/Accessibility.framework/Accessibility"; + public const string AppClipLibrary = "/System/Library/Frameworks/AppClip.framework/AppClip"; + public const string AppTrackingTransparencyLibrary = "/System/Library/Frameworks/AppTrackingTransparency.framework/AppTrackingTransparency"; + public const string MediaSetupLibrary = "/System/Library/Frameworks/MediaSetup.framework/MediaSetup"; + public const string MLComputeLibrary = "/System/Library/Frameworks/MLCompute.framework/MLCompute"; + public const string NearbyInteractionLibrary = "/System/Library/Frameworks/NearbyInteraction.framework/NearbyInteraction"; + public const string ScreenTimeLibrary = "/System/Library/Frameworks/ScreenTime.framework/ScreenTime"; + public const string SensorKitLibrary = "/System/Library/Frameworks/SensorKit.framework/SensorKit"; + public const string UniformTypeIdentifiersLibrary = "/System/Library/Frameworks/UniformTypeIdentifiers.framework/UniformTypeIdentifiers"; } } diff --git a/src/Constants.mac.cs.in b/src/Constants.mac.cs.in index 13d9c90bb5cb..023ed5bc59bb 100644 --- a/src/Constants.mac.cs.in +++ b/src/Constants.mac.cs.in @@ -160,5 +160,18 @@ namespace ObjCRuntime { // macOS 10.15.4 public const string AutomaticAssessmentConfigurationLibrary = "/System/Library/Frameworks/AutomaticAssessmentConfiguration.framework/AutomaticAssessmentConfiguration"; + + // macOS 10.16/11.0 + public const string AccessibilityLibrary = "/System/Library/Frameworks/Accessibility.framework/Accessibility"; + public const string AppTrackingTransparencyLibrary = "/System/Library/Frameworks/AppTrackingTransparency.framework/AppTrackingTransparency"; + public const string ClassKitLibrary = "/System/Library/Frameworks/ClassKit.framework/ClassKit"; + public const string PassKitLibrary = "/System/Library/Frameworks/PassKit.framework/PassKit"; + public const string MLComputeLibrary = "/System/Library/Frameworks/MLCompute.framework/MLCompute"; + public const string NearbyInteractionLibrary = "/System/Library/Frameworks/NearbyInteraction.framework/NearbyInteraction"; + public const string ReplayKitLibrary = "/System/Library/Frameworks/ReplayKit.framework/ReplayKit"; + public const string ScreenTimeLibrary = "/System/Library/Frameworks/ScreenTime.framework/ScreenTime"; + public const string UniformTypeIdentifiersLibrary = "/System/Library/Frameworks/UniformTypeIdentifiers.framework/UniformTypeIdentifiers"; + public const string UserNotificationsUILibrary = "/System/Library/Frameworks/UserNotificationsUI.framework/UserNotificationsUI"; + } } diff --git a/src/Constants.tvos.cs.in b/src/Constants.tvos.cs.in index 4ce27d28bbb4..336ed1247994 100644 --- a/src/Constants.tvos.cs.in +++ b/src/Constants.tvos.cs.in @@ -82,5 +82,13 @@ namespace ObjCRuntime { public const string SoundAnalysisLibrary = "/System/Library/Frameworks/SoundAnalysis.framework/SoundAnalysis"; public const string BackgroundTasksLibrary = "/System/Library/Frameworks/BackgroundTasks.framework/BackgroundTasks"; + // tvOS 14.0 + public const string AccessibilityLibrary = "/System/Library/Frameworks/Accessibility.framework/Accessibility"; + public const string AppTrackingTransparencyLibrary = "/System/Library/Frameworks/AppTrackingTransparency.framework/AppTrackingTransparency"; + public const string CoreHapticsLibrary = "/System/Library/Frameworks/CoreHaptics.framework/CoreHaptics"; + public const string LinkPresentationLibrary = "/System/Library/Frameworks/LinkPresentation.framework/LinkPresentation"; + public const string MLComputeLibrary = "/System/Library/Frameworks/MLCompute.framework/MLCompute"; + public const string UniformTypeIdentifiersLibrary = "/System/Library/Frameworks/UniformTypeIdentifiers.framework/UniformTypeIdentifiers"; + public const string IntentsLibrary = "/System/Library/Frameworks/Intents.framework/Intents"; } } diff --git a/src/Constants.watch.cs.in b/src/Constants.watch.cs.in index 33d5d6e6d812..2e955444b9a3 100644 --- a/src/Constants.watch.cs.in +++ b/src/Constants.watch.cs.in @@ -59,5 +59,8 @@ namespace ObjCRuntime { public const string CoreMediaLibrary = "/System/Library/Frameworks/CoreMedia.framework/CoreMedia"; public const string StoreKitLibrary = "/System/Library/Frameworks/StoreKit.framework/StoreKit"; + // watchOS 7 + public const string AccessibilityLibrary = "/System/Library/Frameworks/Accessibility.framework/Accessibility"; + public const string UniformTypeIdentifiersLibrary = "/System/Library/Frameworks/UniformTypeIdentifiers.framework/UniformTypeIdentifiers"; } } diff --git a/src/CoreData/Enums.cs b/src/CoreData/Enums.cs index 33b662d22f1f..babdb675dce3 100644 --- a/src/CoreData/Enums.cs +++ b/src/CoreData/Enums.cs @@ -226,4 +226,20 @@ public enum NSPersistentCloudKitContainerSchemaInitializationOptions : ulong { DryRun = 1 << 1, PrintSchema = 1 << 2, } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + public enum NSPersistentCloudKitContainerEventResultType : long { + Events = 0, + CountEvents, + } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + public enum NSPersistentCloudKitContainerEventType : long { + Setup, + Import, + Export, + } + } diff --git a/src/CoreData/Obsolete.cs b/src/CoreData/Obsolete.cs index 514785798f8f..ff9d081be8e9 100644 --- a/src/CoreData/Obsolete.cs +++ b/src/CoreData/Obsolete.cs @@ -28,4 +28,13 @@ public NSPersistentStore () } } #endif +#if !XAMCORE_4_0 + public partial class NSCoreDataCoreSpotlightDelegate { + + [Obsolete ("Default constructor is not available")] + public NSCoreDataCoreSpotlightDelegate () + { + } + } +#endif } diff --git a/src/CoreFoundation/CFNetwork.cs b/src/CoreFoundation/CFNetwork.cs index d60811542fe6..b748886c07db 100644 --- a/src/CoreFoundation/CFNetwork.cs +++ b/src/CoreFoundation/CFNetwork.cs @@ -106,6 +106,7 @@ public enum CFNetworkErrors { NetServiceCancel = -72005, NetServiceInvalid = -72006, NetServiceTimeout = -72007, + NetServiceMissingRequiredConfiguration = -72008, NetServiceDnsServiceFailure = -73000 } } diff --git a/src/CoreGraphics/CGColor.cs b/src/CoreGraphics/CGColor.cs index 15c9041442ef..04a55740353b 100644 --- a/src/CoreGraphics/CGColor.cs +++ b/src/CoreGraphics/CGColor.cs @@ -94,7 +94,6 @@ public CGColor (CGColorSpace colorspace, nfloat [] components) handle = CGColorCreate (colorspace.handle, components); } -#if !XAMCORE_3_0 || MONOMAC [DllImport(Constants.CoreGraphicsLibrary)] extern static /* CGColorRef */ IntPtr CGColorCreateGenericGray (/* CGFloat */ nfloat gray, /* CGFloat */ nfloat alpha); @@ -131,7 +130,18 @@ public CGColor (string name) CGColorRetain (handle); } } -#endif + + [iOS (14,0)][TV (14,0)][Watch (7,0)] + public CGColor (CGConstantColor color) + { + var constant = color.GetConstant (); + if (constant == null) + throw new ArgumentNullException (nameof (color)); + handle = CGColorGetConstantColor (constant.Handle); + if (handle == IntPtr.Zero) + throw new ArgumentException (nameof (color)); + CGColorRetain (handle); + } [DllImport(Constants.CoreGraphicsLibrary)] extern static /* CGColorRef */ IntPtr CGColorCreateWithPattern (/* CGColorSpaceRef */ IntPtr space, /* CGPatternRef */ IntPtr pattern, /* const CGFloat[] */ nfloat [] components); @@ -273,7 +283,7 @@ static CGColor CreateByMatchingToColorSpace (CGColorSpace space, CGColorRenderin { var h = CGColorCreateCopyByMatchingToColorSpace (space == null ? IntPtr.Zero : space.Handle, intent, color == null ? IntPtr.Zero : color.Handle, options == null ? IntPtr.Zero : options.Handle); - return h == IntPtr.Zero ? null : new CGColor (h); + return h == IntPtr.Zero ? null : new CGColor (h, owns: true); } [Mac (10,15)] @@ -290,7 +300,7 @@ static CGColor CreateByMatchingToColorSpace (CGColorSpace space, CGColorRenderin static public CGColor CreateSrgb (nfloat red, nfloat green, nfloat blue, nfloat alpha) { var h = CGColorCreateSRGB (red, green, blue, alpha); - return h == IntPtr.Zero ? null : new CGColor (h); + return h == IntPtr.Zero ? null : new CGColor (h, owns: true); } [Mac (10,15)] @@ -307,8 +317,28 @@ static public CGColor CreateSrgb (nfloat red, nfloat green, nfloat blue, nfloat static public CGColor CreateGenericGrayGamma2_2 (nfloat gray, nfloat alpha) { var h = CGColorCreateGenericGrayGamma2_2 (gray, alpha); - return h == IntPtr.Zero ? null : new CGColor (h); + return h == IntPtr.Zero ? null : new CGColor (h, owns: true); } + + [iOS (14,0)][TV (14,0)][Watch (7,0)][Mac (11,0)] + [DllImport(Constants.CoreGraphicsLibrary)] + static extern /* CGColorRef */ IntPtr CGColorCreateGenericCMYK (nfloat cyan, nfloat magenta, nfloat yellow, nfloat black, nfloat alpha); + + [iOS (14,0)][TV (14,0)][Watch (7,0)][Mac (11,0)] + static public CGColor CreateCmyk (nfloat cyan, nfloat magenta, nfloat yellow, nfloat black, nfloat alpha) + { + var h = CGColorCreateGenericCMYK (cyan, magenta, yellow, black, alpha); + return h == IntPtr.Zero ? null : new CGColor (h, owns: true); + } + + [iOS (14,0)][TV (14,0)][Watch (7,0)][Mac (11,0)] + [DllImport (Constants.AccessibilityLibrary)] + static extern /* NSString */ IntPtr AXNameFromColor (/* CGColorRef */ IntPtr color); + + [iOS (14,0)][TV (14,0)][Watch (7,0)][Mac (11,0)] + public string AXName => NSString.FromHandle (AXNameFromColor (handle)); + + #endif // !COREBUILD } } diff --git a/src/CoreGraphics/CGColorSpace.cs b/src/CoreGraphics/CGColorSpace.cs index 193a11330891..2e1abad85533 100644 --- a/src/CoreGraphics/CGColorSpace.cs +++ b/src/CoreGraphics/CGColorSpace.cs @@ -548,6 +548,17 @@ public bool IsHdr { return CGColorSpaceIsHDR (handle); } } + + [iOS (14,0)][TV (14,0)][Watch (7,0)][Mac (11,0)] + [DllImport (Constants.CoreGraphicsLibrary)] + static extern bool CGColorSpaceUsesExtendedRange (/* CGColorSpaceRef */ IntPtr space); + + [iOS (14,0)][TV (14,0)][Watch (7,0)][Mac (11,0)] + public bool UsesExtendedRange { + get { + return CGColorSpaceUsesExtendedRange (handle); + } + } #endif // !COREBUILD } } diff --git a/src/CoreGraphics/CGContextPDF.cs b/src/CoreGraphics/CGContextPDF.cs index 0f5597c80241..73d418177f52 100644 --- a/src/CoreGraphics/CGContextPDF.cs +++ b/src/CoreGraphics/CGContextPDF.cs @@ -82,6 +82,10 @@ public partial class CGPDFInfo : CGPDFPageInfo { public bool? AllowsCopying { get; set; } public CGPDFAccessPermissions? AccessPermissions { get; set; } //public NSDictionary OutputIntent { get; set; } + [Mac (11,0)][iOS (14,0)][TV (14,0)][Watch (7,0)] + public bool? CreateLinearizedPdf { get; set; } + [Mac (11,0)][iOS (14,0)][TV (14,0)][Watch (7,0)] + public bool? CreatePdfA2u { get; set; } internal override NSMutableDictionary ToDictionary () { @@ -113,6 +117,12 @@ internal override NSMutableDictionary ToDictionary () ret.LowlevelSetObject (CFBoolean.FalseHandle, kCGPDFContextAllowsCopying); if (AccessPermissions.HasValue) ret.LowlevelSetObject (NSNumber.FromInt32 ((int) AccessPermissions.Value), kCGPDFContextAccessPermissions); + // only set the keys if they exists in the current OS version + if ((kCGPDFContextCreateLinearizedPDF != IntPtr.Zero) && CreateLinearizedPdf.HasValue) + ret.LowlevelSetObject (CFBoolean.ToHandle (CreateLinearizedPdf.Value), kCGPDFContextCreateLinearizedPDF); + // default to kCFBooleanFalse + if ((kCGPDFContextCreatePDFA != IntPtr.Zero) && CreatePdfA2u.HasValue && CreatePdfA2u == true) + ret.LowlevelSetObject (CFBoolean.TrueHandle, kCGPDFContextCreatePDFA); return ret; } } diff --git a/src/CoreGraphics/CGEvent.cs b/src/CoreGraphics/CGEvent.cs index d682a16400a1..841172c59653 100644 --- a/src/CoreGraphics/CGEvent.cs +++ b/src/CoreGraphics/CGEvent.cs @@ -429,6 +429,22 @@ public unsafe CGEventTapInformation [] GetEventTapList () return result; } + [Mac (11,0)] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGPreflightListenEventAccess")] + public static extern bool PreflightListenEventAccess (); + + [Mac (11,0)] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGRequestListenEventAccess")] + public static extern bool RequestListenEventAccess (); + + [Mac (11,0)] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGPreflightPostEventAccess")] + public static extern bool PreflightPostEventAccess (); + + [Mac (11,0)] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGRequestPostEventAccess")] + public static extern bool RequestPostEventAccess (); + } public struct CGEventTapInformation { diff --git a/src/CoreHaptics/Enums.cs b/src/CoreHaptics/Enums.cs index 608959da5a87..26821506b19b 100644 --- a/src/CoreHaptics/Enums.cs +++ b/src/CoreHaptics/Enums.cs @@ -12,7 +12,7 @@ namespace CoreHaptics { - [Mac (10, 15), iOS (13, 0)] + [Mac (10, 15), iOS (13, 0), TV (14, 0)] public enum CHHapticEventParameterId { [Field ("CHHapticEventParameterIDHapticIntensity")] HapticIntensity, @@ -45,7 +45,7 @@ public enum CHHapticEventParameterId { AudioBrightness, } - [Mac (10, 15), iOS (13, 0)] + [Mac (10, 15), iOS (13, 0), TV (14, 0)] public enum CHHapticDynamicParameterId { [Field ("CHHapticDynamicParameterIDHapticIntensityControl")] HapticIntensityControl, @@ -84,7 +84,7 @@ public enum CHHapticDynamicParameterId { AudioReleaseTimeControl, } - [Mac (10, 15), iOS (13, 0)] + [Mac (10, 15), iOS (13, 0), TV (14, 0)] public enum CHHapticEventType { [Field ("CHHapticEventTypeHapticTransient")] HapticTransient, @@ -99,7 +99,7 @@ public enum CHHapticEventType { AudioCustom, } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14, 0)] [Native] public enum CHHapticErrorCode : long { EngineNotRunning = -4805, @@ -125,14 +125,14 @@ public enum CHHapticErrorCode : long { MemoryError = -4899, } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14, 0)] [Native] public enum CHHapticEngineFinishedAction : long { StopEngine = 1, LeaveEngineRunning = 2, } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14, 0)] [Native] public enum CHHapticEngineStoppedReason : long { AudioSessionInterrupt = 1, diff --git a/src/CoreImage/CIContext.cs b/src/CoreImage/CIContext.cs index 789ebd740049..4bd06326b36d 100644 --- a/src/CoreImage/CIContext.cs +++ b/src/CoreImage/CIContext.cs @@ -129,6 +129,16 @@ public bool? AllowLowPower { SetBooleanValue (CIContext.AllowLowPower, value); } } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + public string Name { + get { + return GetStringValue (CIContext.Name); + } + set { + SetStringValue (CIContext.Name, value); + } + } } public partial class CIContext { diff --git a/src/CoreLocation/CLEnums.cs b/src/CoreLocation/CLEnums.cs index 12e84bb0946b..25c7805fac44 100644 --- a/src/CoreLocation/CLEnums.cs +++ b/src/CoreLocation/CLEnums.cs @@ -99,4 +99,12 @@ public enum CLActivityType : long { [iOS (12,0)][TV (12,0)][Watch (5,0)][Mac (10,14)] Airborne, } + + [Native] + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + public enum CLAccuracyAuthorization : long { + FullAccuracy, + ReducedAccuracy, + } + } diff --git a/src/CoreLocation/CoreLocation.cs b/src/CoreLocation/CoreLocation.cs index 398de68ee1e9..3ca203ea783e 100644 --- a/src/CoreLocation/CoreLocation.cs +++ b/src/CoreLocation/CoreLocation.cs @@ -70,7 +70,7 @@ public override string ToString () #if IOS && !COREBUILD // This code comes from Intents.CLPlacemark_INIntentsAdditions Category public partial class CLPlacemark { - [iOS (10, 0)] + [iOS (10, 0), Mac (11,0)] static public CLPlacemark GetPlacemark (CLLocation location, string name, CNPostalAddress postalAddress) { return (null as CLPlacemark)._GetPlacemark (location, name, postalAddress); diff --git a/src/CoreMedia/CoreMedia.cs b/src/CoreMedia/CoreMedia.cs index 54588d472595..27b194789ade 100644 --- a/src/CoreMedia/CoreMedia.cs +++ b/src/CoreMedia/CoreMedia.cs @@ -244,6 +244,8 @@ public enum CMVideoCodecType : uint Mpeg4Video = 0x6d703476, Mpeg2Video = 0x6d703276, Mpeg1Video = 0x6d703176, + [iOS (14,0), TV (14,0), Watch (7,0), Mac (11,0)] + VP9 = 0x76703039, DvcNtsc = 0x64766320, DvcPal = 0x64766370, DvcProPal = 0x64767070, diff --git a/src/CoreServices/FSEvents.cs b/src/CoreServices/FSEvents.cs index b473e1033561..687629b1787e 100644 --- a/src/CoreServices/FSEvents.cs +++ b/src/CoreServices/FSEvents.cs @@ -30,6 +30,8 @@ public enum FSEventStreamCreateFlags : uint { MarkSelf = 0x00000020, [Mac (10,13)] UseExtendedData = 0x00000040, + [Mac (11,0)] + FullHistory = 0x00000080, } // FSEvents.h: typedef UInt32 FSEventStreamEventFlags; diff --git a/src/CoreTelephony/CoreTelephony.cs b/src/CoreTelephony/CoreTelephony.cs index 683e0782e516..843195ff9aad 100644 --- a/src/CoreTelephony/CoreTelephony.cs +++ b/src/CoreTelephony/CoreTelephony.cs @@ -42,6 +42,7 @@ public enum CTErrorDomain { NoError = 0, Posix = 1, Mach = 2 } + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [iOS (9,0)] [Native] public enum CTCellularDataRestrictedState : ulong { @@ -50,6 +51,7 @@ public enum CTCellularDataRestrictedState : ulong { NotRestricted } + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [iOS (12,0)] [Native] public enum CTCellularPlanProvisioningAddPlanResult : long { diff --git a/src/CoreText/CTEnums.cs b/src/CoreText/CTEnums.cs index 18bd7caaba2d..b796b954d44f 100644 --- a/src/CoreText/CTEnums.cs +++ b/src/CoreText/CTEnums.cs @@ -51,5 +51,6 @@ public enum CTFontManagerError : long { CancelledByUser = 304, DuplicatedName = 305, InvalidFilePath = 306, + UnsupportedScope = 307, } } diff --git a/src/CoreText/CTFont.cs b/src/CoreText/CTFont.cs index 6e7de31cc257..0055c4a66c0d 100644 --- a/src/CoreText/CTFont.cs +++ b/src/CoreText/CTFont.cs @@ -1860,6 +1860,16 @@ public bool GetGlyphsForCharacters (char[] characters, CGGlyph[] glyphs) return GetGlyphsForCharacters (characters, glyphs, Math.Min (characters.Length, glyphs.Length)); } + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [DllImport (Constants.CoreTextLibrary)] + static extern unsafe /* CFStringRef _Nullable */ IntPtr CTFontCopyNameForGlyph (/* CTFontRef */ IntPtr font, CGGlyph glyph); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + public string GetGlyphName (CGGlyph glyph) + { + return CFString.FetchString (CTFontCopyNameForGlyph (handle, glyph), releaseHandle: true); + } + static void AssertCount (nint count) { if (count < 0) diff --git a/src/CoreVideo/CVPixelFormatType.cs b/src/CoreVideo/CVPixelFormatType.cs index 0ba9725cda14..d65f67017054 100644 --- a/src/CoreVideo/CVPixelFormatType.cs +++ b/src/CoreVideo/CVPixelFormatType.cs @@ -5,6 +5,7 @@ // // Copyright 2011 Novell, Inc // Copyright 2011-2014, 2016 Xamarin Inc +// Copyright 2020 Microsoft Corporation // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -106,5 +107,16 @@ public enum CVPixelFormatType : uint { CV420YpCbCr10BiPlanarFullRange = 0x78663230, // xf20 CV422YpCbCr10BiPlanarFullRange = 0x78663232, // xf22 CV444YpCbCr10BiPlanarFullRange = 0x78663434, // xf44 + // iOS 14.0 + CV422YpCbCr8BiPlanarVideoRange = 0x34323276, // '422v' + CV422YpCbCr8BiPlanarFullRange = 0x34323266, // '422f' + CV444YpCbCr8BiPlanarVideoRange = 0x34343476, // '444v' + CV444YpCbCr8BiPlanarFullRange = 0x34343466, // '444f' + OneComponent10 = 0x4c303130, // 'L010' + OneComponent12 = 0x4c303132, // 'L012' + OneComponent16 = 0x4c303136, // 'L016' + TwoComponent16 = 0x32433136, // '2C16' + CV16VersatileBayer = 0x62703136, // 'bp16' + CV64Rgba_DownscaledProResRaw = 0x62703634, // 'bp64' } } diff --git a/src/CoreWlan/Enums.cs b/src/CoreWlan/Enums.cs index fc80e00166b0..44b0079d6386 100644 --- a/src/CoreWlan/Enums.cs +++ b/src/CoreWlan/Enums.cs @@ -86,6 +86,7 @@ public enum CWSecurity : ulong { Unknown = int.MaxValue, } + [Deprecated (PlatformName.MacOSX, 11,0)] [Native] public enum CWIbssModeSecurity : ulong { None = 0, @@ -136,7 +137,11 @@ public enum CWEventType : long { LinkQualityDidChange = 6, ModeDidChange = 7, ScanCacheUpdated = 8, + + [Deprecated (PlatformName.MacOSX, 11,0)] VirtualInterfaceStateChanged = 9, + + [Deprecated (PlatformName.MacOSX, 11,0)] RangingReportEvent = 10, Unknown = long.MaxValue } diff --git a/src/FileProvider/Compat.cs b/src/FileProvider/Compat.cs new file mode 100644 index 000000000000..f1f010e5eb80 --- /dev/null +++ b/src/FileProvider/Compat.cs @@ -0,0 +1,26 @@ +#if !XAMCORE_4_0 + +using System; +using ObjCRuntime; + +namespace FileProvider { + +#if !MONOMAC + [iOS (13,0)] + [Obsoleted (PlatformName.iOS, 14,0)] + public interface INSFileProviderItemDecorating : INSFileProviderItem { + } +#endif + + [iOS (13,0)][Obsoleted (PlatformName.iOS, 14,0)] + [Mac (10,15)][Obsoleted (PlatformName.MacOSX, 11,0)] + public interface INSFileProviderItemFlags : INativeObject, IDisposable { + bool Hidden { get; } + bool PathExtensionHidden { get; } + bool UserExecutable { get; } + bool UserReadable { get; } + bool UserWritable { get; } + } +} + +#endif diff --git a/src/Foundation/Compat.cs b/src/Foundation/Compat.cs index 9b41cf5badbc..c0332debce3a 100644 --- a/src/Foundation/Compat.cs +++ b/src/Foundation/Compat.cs @@ -11,6 +11,18 @@ namespace Foundation { +#if !XAMCORE_4_0 && MONOMAC + public partial class NSError { + + // removed in Xcode 11 GM + [Obsolete ("This API has been removed.")] + public static NSError GetFileProviderErrorForOutOfDateItem (FileProvider.INSFileProviderItem updatedVersion) + { + return null; + } + } +#endif + #if !XAMCORE_3_0 public partial class NSOperation { diff --git a/src/Foundation/Enum.cs b/src/Foundation/Enum.cs index 3b848cdb5f93..0bc467c27b00 100644 --- a/src/Foundation/Enum.cs +++ b/src/Foundation/Enum.cs @@ -55,7 +55,9 @@ public enum NSBundleExecutableArchitecture { I386 = 0x00000007, PPC = 0x00000012, X86_64 = 0x01000007, - PPC64 = 0x01000012 + PPC64 = 0x01000012, + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + ARM64 = 0x0100000c, } #endif @@ -144,7 +146,8 @@ public enum NSNetServicesStatus : long { BadArgumentError = -72004, CancelledError = -72005, InvalidError = -72006, - TimeoutError = -72007 + TimeoutError = -72007, + MissingRequiredConfigurationError = -72008, } [Flags] @@ -215,11 +218,15 @@ public enum NSDataWritingOptions : ulong { Atomic = 1, WithoutOverwriting = 2, - + [Mac (11,0)] FileProtectionNone = 0x10000000, + [Mac (11,0)] FileProtectionComplete = 0x20000000, + [Mac (11,0)] FileProtectionMask = 0xf0000000, + [Mac (11,0)] FileProtectionCompleteUnlessOpen = 0x30000000, + [Mac (11,0)] FileProtectionCompleteUntilFirstUserAuthentication = 0x40000000, } diff --git a/src/Foundation/NSCompat.cs b/src/Foundation/NSCompat.cs deleted file mode 100644 index c3dd5bc4a34c..000000000000 --- a/src/Foundation/NSCompat.cs +++ /dev/null @@ -1,12 +0,0 @@ -#if !XAMCORE_3_0 - -namespace Foundation { - public partial class NSNetService { - - [Obsolete ("")] - public NSNetService () - { - } - } -} -#endif diff --git a/src/Foundation/NSString2.cs b/src/Foundation/NSString2.cs index d79574c2a239..de7f6c6e5ec1 100644 --- a/src/Foundation/NSString2.cs +++ b/src/Foundation/NSString2.cs @@ -63,15 +63,6 @@ public int CompareTo (NSString other) return (int)Compare (other); } - // [Export ("initWithContentsOfURL:encoding:error")] - // IntPtr Constructor (NSUrl url, NSStringEncoding encoding, out NSError error); - // - // [Export ("initWithContentsOfURL:usedEncoding:error:")] - // IntPtr Constructor (NSUrl url, out NSStringEncoding encoding, out NSError error); - // - // [Export ("initWithBytes:length:encoding")] - // IntPtr Constructor (IntPtr bytes, int length, NSStringEncoding encoding); - public char this [nint idx] { get { return _characterAtIndex (idx); diff --git a/src/GameController/Enums.cs b/src/GameController/Enums.cs index 4c8055367bc8..98d51cdb42c7 100644 --- a/src/GameController/Enums.cs +++ b/src/GameController/Enums.cs @@ -3,8 +3,9 @@ // // Authors: // Chris Hamons (chris.hamons@xamarin.com) +// Whitney Schmidt (whschm@microsoft.com) // -// Copyright 2019 Microsoft Corporation +// Copyright 2019, 2020 Microsoft Corporation using System; @@ -21,10 +22,38 @@ public enum GCExtendedGamepadSnapshotDataVersion : long Version1 = 0x0100, Version2 = 0x0101, } - + [Native] public enum GCMicroGamepadSnapshotDataVersion : long { Version1 = 0x0100, } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + public enum GCTouchState : long + { + Up, + Down, + Moving, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + public enum GCDeviceBatteryState : long + { + Unknown = -1, + Discharging, + Charging, + Full, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + public enum GCSystemGestureState : long + { + Enabled = 0, + AlwaysReceive, + Disabled, + } } diff --git a/src/GameKit/GameKit.cs b/src/GameKit/GameKit.cs index 0a8ba24e6775..2a940e79f44c 100644 --- a/src/GameKit/GameKit.cs +++ b/src/GameKit/GameKit.cs @@ -291,11 +291,42 @@ public enum GKInviteRecipientResponse : long { NoAnswer = 5, } - [Mac (10,13,4), TV (11,3), iOS (11,3)] + [iOS (11,3)][Deprecated (PlatformName.iOS, 14,0, message: "Do not use; this API was removed.")] + [Mac (10,13,4)][Deprecated (PlatformName.MacOSX, 11,0, message: "Do not use; this API was removed.")] + [TV (11,3)][Deprecated (PlatformName.TvOS, 14,0, message: "Do not use; this API was removed.")] [Native] public enum GKAuthenticationType : ulong { WithoutUI = 0, GreenBuddyUI = 1, AuthKitInvocation = 2, } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [NoWatch] + [Native] + public enum GKAccessPointLocation : long + { + TopLeading, + TopTrailing, + BottomLeading, + BottomTrailing, + } + + [TV (14,0), Mac (11,0), iOS (14,0), Watch(7,0)] + [Native] + public enum GKLeaderboardType : long + { + Classic, + Recurring, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [NoWatch] + [Native] + public enum GKMatchmakingMode : long + { + Default = 0, + NearbyOnly = 1, + AutomatchOnly = 2, + } } diff --git a/src/HealthKit/Enums.cs b/src/HealthKit/Enums.cs index 9706cb73cd0d..dd1d6fd6c90e 100644 --- a/src/HealthKit/Enums.cs +++ b/src/HealthKit/Enums.cs @@ -479,6 +479,12 @@ public enum HKFhirResourceType { Observation, [Field ("HKFHIRResourceTypeProcedure")] Procedure, + [iOS (14, 0)] + [Field ("HKFHIRResourceTypeMedicationRequest")] + MedicationRequest, + [iOS (14, 0)] + [Field ("HKFHIRResourceTypeCoverage")] + Coverage, } [Watch (5, 0), iOS (12, 0)] @@ -498,6 +504,9 @@ public enum HKClinicalTypeIdentifier { ProcedureRecord, [Field ("HKClinicalTypeIdentifierVitalSignRecord")] VitalSignRecord, + [Watch (7, 0), iOS (14, 0)] + [Field ("HKClinicalTypeIdentifierCoverageRecord")] + CoverageRecord, } [Watch (5,0), iOS (12,0)] @@ -508,4 +517,88 @@ public enum HKAuthorizationRequestStatus : long ShouldRequest, Unnecessary, } + + [Watch (7,0), iOS (13,6)] + [Native] + public enum HKCategoryValueAppetiteChanges : long { + Unspecified = 0, + NoChange, + Decreased, + Increased, + } + + [Watch (7,0), iOS (14,0)] + [Native] + public enum HKAppleEcgAlgorithmVersion : long { + Version1 = 1, + } + + [Watch (7,0), iOS (14,0)] + [Native] + public enum HKCategoryValueEnvironmentalAudioExposureEvent : long { + MomentaryLimit = 1, + } + + [Watch (7,0), iOS (13,6)] + [Native] + public enum HKCategoryValuePresence : long { + Present = 0, + NotPresent, + } + + [Watch (7,0), iOS (13,6)] + [Native] + public enum HKCategoryValueSeverity : long { + Unspecified = 0, + NotPresent, + Mild, + Moderate, + Severe, + } + + [Watch (7,0), iOS (14,0)] + [Native] + public enum HKDevicePlacementSide : long { + Unknown = 0, + Left, + Right, + Central, + } + + [Watch (7,0), iOS (14,0)] + [Native] + public enum HKElectrocardiogramClassification : long { + NotSet = 0, + SinusRhythm, + AtrialFibrillation, + InconclusiveLowHeartRate, + InconclusiveHighHeartRate, + InconclusivePoorReading, + InconclusiveOther, + Unrecognized = 100, + } + + [Watch (7,0), iOS (14,0)] + [Native] + public enum HKElectrocardiogramLead : long { + AppleWatchSimilarToLeadI = 1, + } + + [Watch (7,0), iOS (14,0)] + [Native] + public enum HKElectrocardiogramSymptomsStatus : long { + NotSet = 0, + None = 1, + Present = 2, + } + + [NoWatch, iOS (14, 0)] + public enum HKFhirRelease { + [Field ("HKFHIRReleaseDSTU2")] + Dstu2, + [Field ("HKFHIRReleaseR4")] + R4, + [Field ("HKFHIRReleaseUnknown")] + Unknown, + } } diff --git a/src/HomeKit/HMEnums.cs b/src/HomeKit/HMEnums.cs index afc4d6b66ada..164987c66246 100644 --- a/src/HomeKit/HMEnums.cs +++ b/src/HomeKit/HMEnums.cs @@ -111,6 +111,11 @@ public enum HMError : long { OwnershipFailure = 96, MaximumAccessoriesOfTypeInHome = 97, WiFiCredentialGenerationFailed = 98, + // iOS 14 + EnterpriseNetworkNotSupported = 99, + TimedOutWaitingForAccessory = 100, + AccessoryCommunicationFailure = 101, + FailedToJoinNetwork = 102, } @@ -1385,4 +1390,32 @@ public enum HMCharacteristicValueConfigurationState : long { NotConfigured = 0, Configured, } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Watch (2,0), TV (10,0), NoMac, iOS (8,0)] + [Native] + public enum HMCharacteristicValueTargetDoorState : long + { + Open = 0, + Closed = 1, + } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Watch (2,0), TV (10,0), NoMac, iOS (8,0)] + [Native] + public enum HMCharacteristicValueCurrentHeatingCooling : long + { + Off = 0, + Heat = 1, + Cool = 2, + } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Watch (2,0), TV (10,0), NoMac, iOS (8,0)] + [Native] + public enum HMCharacteristicValueTargetLockMechanismState : long + { + Unsecured = 0, + Secured = 1, + } } diff --git a/src/Intents/INBillTypeResolutionResult.cs b/src/Intents/INBillTypeResolutionResult.cs index 8c0d3dc24cd9..676a1f22888c 100644 --- a/src/Intents/INBillTypeResolutionResult.cs +++ b/src/Intents/INBillTypeResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INCallRecord.cs b/src/Intents/INCallRecord.cs index c2fc454414c4..e952ea7eac9e 100644 --- a/src/Intents/INCallRecord.cs +++ b/src/Intents/INCallRecord.cs @@ -7,6 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // +#if !TVOS using System; using Foundation; using ObjCRuntime; @@ -23,3 +24,4 @@ public bool? Unseen { } } } +#endif diff --git a/src/Intents/INCallRecordTypeResolutionResult.cs b/src/Intents/INCallRecordTypeResolutionResult.cs index d0547b2d8390..38fdd4bab192 100644 --- a/src/Intents/INCallRecordTypeResolutionResult.cs +++ b/src/Intents/INCallRecordTypeResolutionResult.cs @@ -7,6 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // +#if !TVOS using System; using Foundation; using ObjCRuntime; @@ -43,3 +44,4 @@ public static INCallRecordTypeResolutionResult GetConfirmationRequired (INCallRe } } } +#endif diff --git a/src/Intents/INCarAirCirculationModeResolutionResult.cs b/src/Intents/INCarAirCirculationModeResolutionResult.cs index cc3087a99558..d40d101662c3 100644 --- a/src/Intents/INCarAirCirculationModeResolutionResult.cs +++ b/src/Intents/INCarAirCirculationModeResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INCarAudioSourceResolutionResult.cs b/src/Intents/INCarAudioSourceResolutionResult.cs index f0b80111cf9a..d88131c92c72 100644 --- a/src/Intents/INCarAudioSourceResolutionResult.cs +++ b/src/Intents/INCarAudioSourceResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INCarDefrosterResolutionResult.cs b/src/Intents/INCarDefrosterResolutionResult.cs index 5c3755ba5f39..8d330f264f22 100644 --- a/src/Intents/INCarDefrosterResolutionResult.cs +++ b/src/Intents/INCarDefrosterResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INCarSeatResolutionResult.cs b/src/Intents/INCarSeatResolutionResult.cs index db58d281fc0e..b05c58baf43a 100644 --- a/src/Intents/INCarSeatResolutionResult.cs +++ b/src/Intents/INCarSeatResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INCarSignalOptionsResolutionResult.cs b/src/Intents/INCarSignalOptionsResolutionResult.cs index c7389d40b018..aae33e0aaf84 100644 --- a/src/Intents/INCarSignalOptionsResolutionResult.cs +++ b/src/Intents/INCarSignalOptionsResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INGetCarLockStatusIntentResponse.cs b/src/Intents/INGetCarLockStatusIntentResponse.cs index 5861c56cf587..b1be4e9c6acd 100644 --- a/src/Intents/INGetCarLockStatusIntentResponse.cs +++ b/src/Intents/INGetCarLockStatusIntentResponse.cs @@ -6,7 +6,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if IOS || TVOS +#if IOS using Foundation; using Intents; diff --git a/src/Intents/INGetCarPowerLevelStatusIntentResponse.cs b/src/Intents/INGetCarPowerLevelStatusIntentResponse.cs index 8027784e6360..f51fa0b2a154 100644 --- a/src/Intents/INGetCarPowerLevelStatusIntentResponse.cs +++ b/src/Intents/INGetCarPowerLevelStatusIntentResponse.cs @@ -6,7 +6,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if IOS || TVOS +#if IOS && !TVOS using Foundation; using Intents; diff --git a/src/Intents/INIntentResolutionResult.cs b/src/Intents/INIntentResolutionResult.cs index 29c26f69e1be..9a2cf53ca363 100644 --- a/src/Intents/INIntentResolutionResult.cs +++ b/src/Intents/INIntentResolutionResult.cs @@ -15,6 +15,7 @@ namespace Intents { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [Register ("INIntentResolutionResult", SkipRegistration = true)] public sealed partial class INIntentResolutionResult : INIntentResolutionResult where ObjectType : class, INativeObject @@ -44,12 +45,11 @@ public static INIntentResolutionResult Unsupported { } } -#if !MONOMAC - [Watch (6,0), iOS (13,0)] + [Watch (6,0), iOS (13,0), Mac (11,0)] public static INIntentResolutionResult GetUnsupported (nint reason) => throw new NotImplementedException ("All subclasses of INIntentResolutionResult must re-implement this method"); - [Watch (6,0), iOS (13,0)] + [Watch (6,0), iOS (13,0), Mac (11,0)] public static INIntentResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason) => throw new NotImplementedException ("All subclasses of INIntentResolutionResult must re-implement this method"); -#endif + } } diff --git a/src/Intents/INInteraction.cs b/src/Intents/INInteraction.cs index d6e2bce2643c..cea20a78b759 100644 --- a/src/Intents/INInteraction.cs +++ b/src/Intents/INInteraction.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if IOS || WATCH using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INMessageAttributeOptionsResolutionResult.cs b/src/Intents/INMessageAttributeOptionsResolutionResult.cs index 3de6886e5210..471034701175 100644 --- a/src/Intents/INMessageAttributeOptionsResolutionResult.cs +++ b/src/Intents/INMessageAttributeOptionsResolutionResult.cs @@ -7,6 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // +#if !TVOS using System; using Foundation; using ObjCRuntime; @@ -43,3 +44,4 @@ public static INMessageAttributeOptionsResolutionResult GetConfirmationRequired } } } +#endif diff --git a/src/Intents/INMessageAttributeResolutionResult.cs b/src/Intents/INMessageAttributeResolutionResult.cs index e5c63715c66c..3e2c7e18b73a 100644 --- a/src/Intents/INMessageAttributeResolutionResult.cs +++ b/src/Intents/INMessageAttributeResolutionResult.cs @@ -7,6 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // +#if !TVOS using System; using Foundation; using ObjCRuntime; @@ -43,3 +44,4 @@ public static INMessageAttributeResolutionResult GetConfirmationRequired (INMess } } } +#endif diff --git a/src/Intents/INPaymentStatusResolutionResult.cs b/src/Intents/INPaymentStatusResolutionResult.cs index 068cbb3dea28..4a84d7ddfbce 100644 --- a/src/Intents/INPaymentStatusResolutionResult.cs +++ b/src/Intents/INPaymentStatusResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INRadioTypeResolutionResult.cs b/src/Intents/INRadioTypeResolutionResult.cs index 39cd3b812ef9..44063426daa2 100644 --- a/src/Intents/INRadioTypeResolutionResult.cs +++ b/src/Intents/INRadioTypeResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INRelativeReferenceResolutionResult.cs b/src/Intents/INRelativeReferenceResolutionResult.cs index 01dd7a00fd71..da5de24e7f51 100644 --- a/src/Intents/INRelativeReferenceResolutionResult.cs +++ b/src/Intents/INRelativeReferenceResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INRelativeSettingResolutionResult.cs b/src/Intents/INRelativeSettingResolutionResult.cs index 76c6c1c2256d..112556059bae 100644 --- a/src/Intents/INRelativeSettingResolutionResult.cs +++ b/src/Intents/INRelativeSettingResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INRideOption.cs b/src/Intents/INRideOption.cs index 8681efb045b4..87430176cbdf 100644 --- a/src/Intents/INRideOption.cs +++ b/src/Intents/INRideOption.cs @@ -1,4 +1,4 @@ -#if IOS || TVOS +#if IOS using Foundation; using Intents; diff --git a/src/Intents/INSearchCallHistoryIntent.cs b/src/Intents/INSearchCallHistoryIntent.cs index 22e8732f6c9d..6ba73e35d280 100644 --- a/src/Intents/INSearchCallHistoryIntent.cs +++ b/src/Intents/INSearchCallHistoryIntent.cs @@ -7,6 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // +#if !TVOS using System; using Foundation; using ObjCRuntime; @@ -19,3 +20,4 @@ public bool? Unseen { } } } +#endif diff --git a/src/Intents/INSetCarLockStatusIntent.cs b/src/Intents/INSetCarLockStatusIntent.cs index c230141d732d..2600f62f6e2c 100644 --- a/src/Intents/INSetCarLockStatusIntent.cs +++ b/src/Intents/INSetCarLockStatusIntent.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if IOS || TVOS +#if IOS using Foundation; using Intents; diff --git a/src/Intents/INSpeakableString.cs b/src/Intents/INSpeakableString.cs index 11a0ccadb406..2056c9155a96 100644 --- a/src/Intents/INSpeakableString.cs +++ b/src/Intents/INSpeakableString.cs @@ -24,8 +24,10 @@ public INSpeakableString (string identifier, string spokenPhrase, string pronunc if (PlatformHelper.CheckSystemVersion (10, 13)) #endif InitializeHandle (InitWithVocabularyIdentifier (identifier, spokenPhrase, pronunciationHint)); +#if !TVOS else InitializeHandle (InitWithIdentifier (identifier, spokenPhrase, pronunciationHint)); +#endif } } } diff --git a/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs b/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs index cc721732e61f..098d42a39c1e 100644 --- a/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs +++ b/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INWorkoutLocationTypeResolutionResult.cs b/src/Intents/INWorkoutLocationTypeResolutionResult.cs index 3aa6d628c804..94515f00fa0e 100644 --- a/src/Intents/INWorkoutLocationTypeResolutionResult.cs +++ b/src/Intents/INWorkoutLocationTypeResolutionResult.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if !MONOMAC +#if !MONOMAC && !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/MLCompute/MLHelpers.cs b/src/MLCompute/MLHelpers.cs new file mode 100644 index 000000000000..cc03d21db4e8 --- /dev/null +++ b/src/MLCompute/MLHelpers.cs @@ -0,0 +1,152 @@ +using System; +using System.Runtime.InteropServices; + +using CoreFoundation; +using Foundation; +using ObjCRuntime; + +namespace MLCompute { + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [NoWatch] + public static class MLCActivationTypeExtensions { + + [DllImport (Constants.MLComputeLibrary)] + static extern /* NSString */ IntPtr MLCActivationTypeDebugDescription (MLCActivationType activationType); + + public static string GetDebugDescription (this MLCActivationType self) + { + return CFString.FetchString (MLCActivationTypeDebugDescription (self)); + } + } + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [NoWatch] + public static class MLCArithmeticOperationExtensions { + + [DllImport (Constants.MLComputeLibrary)] + static extern /* NSString */ IntPtr MLCArithmeticOperationDebugDescription (MLCArithmeticOperation operation); + + public static string GetDebugDescription (this MLCArithmeticOperation self) + { + return CFString.FetchString (MLCArithmeticOperationDebugDescription (self)); + } + } + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [NoWatch] + public static class MLCPaddingPolicyExtensions { + + [DllImport (Constants.MLComputeLibrary)] + static extern /* NSString */ IntPtr MLCPaddingPolicyDebugDescription (MLCPaddingPolicy paddingPolicy); + + public static string GetDebugDescription (this MLCPaddingPolicy self) + { + return CFString.FetchString (MLCPaddingPolicyDebugDescription (self)); + } + } + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [NoWatch] + public static class MLCLossTypeExtensions { + + [DllImport (Constants.MLComputeLibrary)] + static extern /* NSString */ IntPtr MLCLossTypeDebugDescription (MLCLossType lossType); + + public static string GetDebugDescription (this MLCLossType self) + { + return CFString.FetchString (MLCLossTypeDebugDescription (self)); + } + } + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [NoWatch] + public static class MLCReductionTypeExtensions { + + [DllImport (Constants.MLComputeLibrary)] + static extern /* NSString */ IntPtr MLCReductionTypeDebugDescription (MLCReductionType reductionType); + + public static string GetDebugDescription (this MLCReductionType self) + { + return CFString.FetchString (MLCReductionTypeDebugDescription (self)); + } + } + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [NoWatch] + public static class MLCPaddingTypeExtensions { + + [DllImport (Constants.MLComputeLibrary)] + static extern /* NSString */ IntPtr MLCPaddingTypeDebugDescription (MLCPaddingType paddingType); + + public static string GetDebugDescription (this MLCPaddingType self) + { + return CFString.FetchString (MLCPaddingTypeDebugDescription (self)); + } + } + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [NoWatch] + public static class MLCConvolutionTypeExtensions { + + [DllImport (Constants.MLComputeLibrary)] + static extern /* NSString */ IntPtr MLCConvolutionTypeDebugDescription (MLCConvolutionType convolutionType); + + public static string GetDebugDescription (this MLCConvolutionType self) + { + return CFString.FetchString (MLCConvolutionTypeDebugDescription (self)); + } + } + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [NoWatch] + public static class MLCPoolingTypeExtensions { + + [DllImport (Constants.MLComputeLibrary)] + static extern /* NSString */ IntPtr MLCPoolingTypeDebugDescription (MLCPoolingType poolingType); + + public static string GetDebugDescription (this MLCPoolingType self) + { + return CFString.FetchString (MLCPoolingTypeDebugDescription (self)); + } + } + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [NoWatch] + public static class MLCSoftmaxOperationExtensions { + + [DllImport (Constants.MLComputeLibrary)] + static extern /* NSString */ IntPtr MLCSoftmaxOperationDebugDescription (MLCSoftmaxOperation operation); + + public static string GetDebugDescription (this MLCSoftmaxOperation self) + { + return CFString.FetchString (MLCSoftmaxOperationDebugDescription (self)); + } + } + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [NoWatch] + public static class MLCSampleModeExtensions { + + [DllImport (Constants.MLComputeLibrary)] + static extern /* NSString */ IntPtr MLCSampleModeDebugDescription (MLCSampleMode mode); + + public static string GetDebugDescription (this MLCSampleMode self) + { + return CFString.FetchString (MLCSampleModeDebugDescription (self)); + } + } + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [NoWatch] + public static class MLCLstmResultModeExtensions { + + [DllImport (Constants.MLComputeLibrary)] + static extern /* NSString */ IntPtr MLCLSTMResultModeDebugDescription (MLCLstmResultMode mode); + + public static string GetDebugDescription (this MLCLstmResultMode self) + { + return CFString.FetchString (MLCLSTMResultModeDebugDescription (self)); + } + } +} diff --git a/src/MediaPlayer/MPMediaItem.cs b/src/MediaPlayer/MPMediaItem.cs index 7325ab8fa779..4646dcc58da9 100644 --- a/src/MediaPlayer/MPMediaItem.cs +++ b/src/MediaPlayer/MPMediaItem.cs @@ -9,7 +9,7 @@ // Copyright 2011-2012 Xamarin, Inc // -#if !TVOS && !MONOMAC && !WATCH +#if !MONOMAC && !WATCH using System; using System.Collections; diff --git a/src/MediaPlayer/MediaPlayer.cs b/src/MediaPlayer/MediaPlayer.cs index e9242d471cdb..8cfb5f85eea9 100644 --- a/src/MediaPlayer/MediaPlayer.cs +++ b/src/MediaPlayer/MediaPlayer.cs @@ -107,7 +107,7 @@ public enum MPMovieTimeOption : long { // NSUInteger -> MPMediaItem.h [Native] - [NoWatch] + [Watch (7,0)] [Flags] public enum MPMediaType : ulong { Music = 1 << 0, @@ -196,9 +196,8 @@ public enum MPMovieControlMode { // NSInteger -> /MPMusicPlayerController.h [NoMac] - [NoTV] [NoWatch] - [Deprecated (PlatformName.iOS, 9, 0)] + [TV (14,0)] [Native] public enum MPMusicPlaybackState : long { Stopped, @@ -213,7 +212,7 @@ public enum MPMusicPlaybackState : long { [Native] [NoMac] [NoWatch] - [NoTV] + [TV (14,0)] public enum MPMusicRepeatMode : long { Default, None, @@ -224,8 +223,8 @@ public enum MPMusicRepeatMode : long { // NSInteger -> /MPMusicPlayerController.h [Native] [NoMac] - [NoTV] [NoWatch] + [TV (14,0)] public enum MPMusicShuffleMode : long { Default, Off, @@ -301,7 +300,7 @@ public enum MPNowPlayingInfoLanguageOptionType : ulong { } [Mac (10,14,2)] - [NoWatch] + [Watch (7,0)] [iOS (9,3)] [Native] [ErrorDomain ("MPErrorDomain")] diff --git a/src/Metal/Defs.cs b/src/Metal/Defs.cs index d6450e7b9776..4f7baaa81154 100644 --- a/src/Metal/Defs.cs +++ b/src/Metal/Defs.cs @@ -386,4 +386,16 @@ public struct MTLCoordinate2D { } #endif + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Mac (11,0), iOS (14,0), NoTV] + [StructLayout (LayoutKind.Sequential)] + public struct MTLAccelerationStructureSizes + { + public nuint AccelerationStructureSize; + + public nuint BuildScratchBufferSize; + + public nuint RefitScratchBufferSize; + } + } diff --git a/src/Metal/MTLBlitPassSampleBufferAttachmentDescriptorArray.cs b/src/Metal/MTLBlitPassSampleBufferAttachmentDescriptorArray.cs new file mode 100644 index 000000000000..b514464a2761 --- /dev/null +++ b/src/Metal/MTLBlitPassSampleBufferAttachmentDescriptorArray.cs @@ -0,0 +1,13 @@ +using System; + +namespace Metal { + + public partial class MTLBlitPassSampleBufferAttachmentDescriptorArray { + + public MTLBlitPassSampleBufferAttachmentDescriptor this[nuint i] { + get => GetObject (i); + set => SetObject (value, i); + } + } + +} diff --git a/src/Metal/MTLComputePassSampleBufferAttachmentDescriptorArray.cs b/src/Metal/MTLComputePassSampleBufferAttachmentDescriptorArray.cs new file mode 100644 index 000000000000..806f198f5c06 --- /dev/null +++ b/src/Metal/MTLComputePassSampleBufferAttachmentDescriptorArray.cs @@ -0,0 +1,13 @@ +using System; + +namespace Metal { + + public partial class MTLComputePassSampleBufferAttachmentDescriptorArray { + + public MTLComputePassSampleBufferAttachmentDescriptor this[nuint i] { + get => GetObject (i); + set => SetObject (value, i); + } + } + +} diff --git a/src/Metal/MTLEnums.cs b/src/Metal/MTLEnums.cs index 456ce5450a3c..548e53a25e2f 100644 --- a/src/Metal/MTLEnums.cs +++ b/src/Metal/MTLEnums.cs @@ -131,14 +131,13 @@ public enum MTLSamplerMipFilter : ulong { [Native] public enum MTLSamplerAddressMode : ulong { ClampToEdge = 0, -#if MONOMAC + [iOS (14,0)] MirrorClampToEdge = 1, -#endif Repeat = 2, MirrorRepeat = 3, ClampToZero = 4, - [Mac (10,12)] + [Mac (10,12), iOS (14,0)] ClampToBorderColor = 5, } @@ -773,9 +772,9 @@ public enum MTLMultisampleDepthResolveFilter : ulong{ } #if XAMCORE_4_0 - [NoiOS][NoTV] + [NoTV] #endif - [Mac (10,12)] + [Mac (10,12), iOS (14,0)] [Native] public enum MTLSamplerBorderColor : ulong { TransparentBlack = 0, @@ -1004,7 +1003,7 @@ public enum MTLMultisampleStencilResolveFilter : ulong } [Unavailable (PlatformName.MacCatalyst)] - [Flags, NoMac, NoTV, iOS (13,0)] + [Flags, Mac (11,0), NoTV, iOS (13,0)] [Native, Advice ("This API is not available when using UIKit on macOS.")] public enum MTLSparseTextureRegionAlignmentMode : ulong { Outward = 0x0, @@ -1012,7 +1011,7 @@ public enum MTLSparseTextureRegionAlignmentMode : ulong { } [Unavailable (PlatformName.MacCatalyst)] - [Flags, NoMac, NoTV, iOS (13,0)] + [Flags, Mac (11,0), NoTV, iOS (13,0)] [Native, Advice ("This API is not available when using UIKit on macOS.")] public enum MTLSparseTextureMappingMode : ulong { Map = 0x0, @@ -1044,6 +1043,10 @@ public enum MTLGpuFamily : long { Apple3 = 1003, Apple4 = 1004, Apple5 = 1005, + [NoTV, NoMac, iOS (14,0)] // Yep just available in iOS + Apple6 = 1006, + [NoTV, NoMac, iOS (14,0)] // Yep just available in iOS + Apple7 = 1007, Mac1 = 2001, Mac2 = 2002, Common1 = 3001, @@ -1076,15 +1079,15 @@ public enum MTLDeviceLocation : ulong { Unspecified = ulong.MaxValue, } - [NoiOS, NoTV, Mac (10,15)] + [iOS (14,0), TV (14,0), Mac (10,15)] [Native] [ErrorDomain ("MTLCounterErrorDomain")] public enum MTLCounterSampleBufferError : long { OutOfMemory, Internal, } -#if MONOMAC - [NoiOS, NoTV, Mac (10,15)] + + [iOS (14,0), TV (14,0), Mac (10,15)] public enum MTLCommonCounter { [Field ("MTLCommonCounterTimestamp")] Timestamp, @@ -1141,5 +1144,102 @@ public enum MTLCommonCounter { SetStatistic, } -#endif + [Flags, Mac (11,0), iOS (14,0), TV (14,0)] + public enum MTLAccelerationStructureInstanceOptions : uint { + None = 0x0, + DisableTriangleCulling = (1u << 0), + TriangleFrontFacingWindingCounterClockwise = (1u << 1), + Opaque = (1u << 2), + NonOpaque = (1u << 3), + } + + [Mac (11,0), iOS (14,0), NoTV] + [Flags] + [Native] + public enum MTLAccelerationStructureUsage : ulong { + None = 0x0, + Refit = (1uL << 0), + PreferFastBuild = (1uL << 1), + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [ErrorDomain ("MTLBinaryArchiveDomain")] + [Native] + public enum MTLBinaryArchiveError : ulong { + None = 0, + InvalidFile = 1, + UnexpectedElement = 2, + CompilationFailure = 3, + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [Flags] + [Native] + public enum MTLCommandBufferErrorOption : ulong { + None = 0x0, + EncoderExecutionStatus = 1uL << 0, + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [Native] + public enum MTLCommandEncoderErrorState : long { + Unknown = 0, + Completed = 1, + Affected = 2, + Pending = 3, + Faulted = 4, + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [Native] + public enum MTLCounterSamplingPoint : ulong { + StageBoundary, + DrawBoundary, + DispatchBoundary, + TileDispatchBoundary, + BlitBoundary, + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [ErrorDomain ("MTLDynamicLibraryDomain")] + [Native] + public enum MTLDynamicLibraryError : ulong { + None = 0, + InvalidFile = 1, + CompilationFailure = 2, + UnresolvedInstallName = 3, + DependencyLoadFailure = 4, + Unsupported = 5, + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [Native] + public enum MTLFunctionLogType : ulong + { + Validation = 0, + } + + [Flags, Mac (11,0), iOS (14,0), TV (14,0)] + [Native] + public enum MTLFunctionOptions : ulong { + None = 0x0, + CompileToBinary = 1uL << 0, + } + + [Flags, Mac (11,0), iOS (14,0), NoTV] + [Native] + public enum MTLIntersectionFunctionSignature : ulong { + None = 0x0, + Instancing = (1uL << 0), + TriangleData = (1uL << 1), + WorldSpaceData = (1uL << 2), + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [Native] + public enum MTLLibraryType : long { + Executable = 0, + Dynamic = 1, + } + } diff --git a/src/Metal/MTLIntersectionFunctionTable.cs b/src/Metal/MTLIntersectionFunctionTable.cs new file mode 100644 index 000000000000..73ed5a18c346 --- /dev/null +++ b/src/Metal/MTLIntersectionFunctionTable.cs @@ -0,0 +1,36 @@ +#if !TVOS +using System; +using System.Runtime.InteropServices; +using Foundation; +using ObjCRuntime; + +namespace Metal { + + // add some extension methods to make the API of the protocol nicer + public static class MTLIntersectionFunctionTableExtensions { + + [Mac (11,0), iOS (14,0), NoTV] + public static void SetBuffers (this IMTLIntersectionFunctionTable table, IMTLBuffer[] buffers, nuint[] offsets, NSRange range) + { + if (buffers == null) + throw new ArgumentNullException (nameof (buffers)); + if (offsets == null) + throw new ArgumentNullException (nameof (offsets)); + + var bufferPtrArray = buffers.Length <= 1024 ? stackalloc IntPtr[buffers.Length] : new IntPtr [buffers.Length]; + // get all intptr from the array to pass to the lower level call + for (var i = 0; i < buffers.Length; i++) { + bufferPtrArray [i] = buffers [i].Handle; + } + + unsafe { + fixed (void* buffersPtr = bufferPtrArray) + fixed (void* offsetsPtr = offsets) { // can use fixed + table.SetBuffers ((IntPtr) buffersPtr, (IntPtr) offsetsPtr, range); + } + } + GC.KeepAlive (buffers); + } + } +} +#endif diff --git a/src/Metal/MTLRenderPassSampleBufferAttachmentDescriptorArray.cs b/src/Metal/MTLRenderPassSampleBufferAttachmentDescriptorArray.cs new file mode 100644 index 000000000000..69645bcf0245 --- /dev/null +++ b/src/Metal/MTLRenderPassSampleBufferAttachmentDescriptorArray.cs @@ -0,0 +1,13 @@ +using System; + +namespace Metal { + + public partial class MTLRenderPassSampleBufferAttachmentDescriptorArray { + + public MTLRenderPassSampleBufferAttachmentDescriptor this[nuint i] { + get => GetObject (i); + set => SetObject (value, i); + } + } + +} diff --git a/src/Metal/MTLResourceStatePassSampleBufferAttachmentDescriptorArray.cs b/src/Metal/MTLResourceStatePassSampleBufferAttachmentDescriptorArray.cs new file mode 100644 index 000000000000..edc1175c4537 --- /dev/null +++ b/src/Metal/MTLResourceStatePassSampleBufferAttachmentDescriptorArray.cs @@ -0,0 +1,16 @@ +using System; + +namespace Metal { + +#if !TVOS + + public partial class MTLResourceStatePassSampleBufferAttachmentDescriptorArray { + + public MTLResourceStatePassSampleBufferAttachmentDescriptor this[nuint i] { + get => GetObject (i); + set => SetObject (value, i); + } + } + +#endif +} diff --git a/src/MetalPerformanceShaders/MPSDefs.cs b/src/MetalPerformanceShaders/MPSDefs.cs index 2a16513c142d..51d85fa7a02e 100644 --- a/src/MetalPerformanceShaders/MPSDefs.cs +++ b/src/MetalPerformanceShaders/MPSDefs.cs @@ -77,6 +77,8 @@ public enum MPSDataType : uint { // uint32_t [Flags] [Native] + [iOS (13,0), TV (13,0), Mac (10,15)] + [Introduced (PlatformName.MacCatalyst, 13, 0)] public enum MPSAliasingStrategy : ulong { Default = 0x0, @@ -128,6 +130,8 @@ public struct MPSSize { } // uses NSUInteger + [iOS (13,0), TV (13,0), Mac (10,15)] + [Introduced (PlatformName.MacCatalyst, 13, 0)] public struct MPSDimensionSlice { public nuint Start; public nuint Length; @@ -188,6 +192,7 @@ public enum MPSMatrixDecompositionStatus { NonPositiveDefinite = -3, } + [iOS (13,0), TV (13,0), Mac (10,15)] [Introduced (PlatformName.MacCatalyst, 13, 0)] [Flags] [Native] @@ -563,6 +568,8 @@ public static class MPSConstants // MaxTextures = 128 or 32, } + [iOS (11,3), TV (11,3), Mac (10,13,4)] + [Introduced (PlatformName.MacCatalyst, 13, 0)] public enum MPSCustomKernelIndex : uint { DestIndex = 0, @@ -574,6 +581,8 @@ public enum MPSCustomKernelIndex : uint UserDataIndex = 30, } + [iOS (11,2), TV (11,2), Mac (10,13,2)] + [Introduced (PlatformName.MacCatalyst, 13, 0)] [StructLayout (LayoutKind.Sequential)] public struct MPSMatrixOffset { diff --git a/src/MetricKit/MXMetaData.cs b/src/MetricKit/MXMetaData.cs new file mode 100644 index 000000000000..58f771c74640 --- /dev/null +++ b/src/MetricKit/MXMetaData.cs @@ -0,0 +1,22 @@ +#if IOS +using System; + +using Foundation; +using ObjCRuntime; +using UIKit; + +namespace MetricKit { + + public partial class MXMetaData { + + public virtual NSDictionary DictionaryRepresentation { + get { + if (PlatformHelper.CheckSystemVersion (14,0)) + return _DictionaryRepresentation14; + else + return _DictionaryRepresentation13; + } + } + } +} +#endif diff --git a/src/MetricKit/MXMetric.cs b/src/MetricKit/MXMetric.cs new file mode 100644 index 000000000000..7cdd4f632a3f --- /dev/null +++ b/src/MetricKit/MXMetric.cs @@ -0,0 +1,22 @@ +#if IOS +using System; + +using Foundation; +using ObjCRuntime; +using UIKit; + +namespace MetricKit { + + public partial class MXMetric { + + public virtual NSDictionary DictionaryRepresentation { + get { + if (PlatformHelper.CheckSystemVersion (14,0)) + return _DictionaryRepresentation14; + else + return _DictionaryRepresentation13; + } + } + } +} +#endif diff --git a/src/MetricKit/MXMetricPayload.cs b/src/MetricKit/MXMetricPayload.cs new file mode 100644 index 000000000000..b34805539520 --- /dev/null +++ b/src/MetricKit/MXMetricPayload.cs @@ -0,0 +1,22 @@ +#if IOS +using System; + +using Foundation; +using ObjCRuntime; +using UIKit; + +namespace MetricKit { + + public partial class MXMetricPayload { + + public virtual NSDictionary DictionaryRepresentation { + get { + if (PlatformHelper.CheckSystemVersion (14,0)) + return _DictionaryRepresentation14; + else + return _DictionaryRepresentation13; + } + } + } +} +#endif diff --git a/src/NaturalLanguage/NLLanguage.cs b/src/NaturalLanguage/NLLanguage.cs new file mode 100644 index 000000000000..18f190ea5573 --- /dev/null +++ b/src/NaturalLanguage/NLLanguage.cs @@ -0,0 +1,20 @@ +using System; +using System.Linq; +using System.Collections.Generic; + +using Foundation; + +namespace NaturalLanguage { + + public partial class NLLanguageExtensions { + + static internal Dictionary Convert (NSDictionary dict) + { + var result = new Dictionary ((int) dict.Count); + foreach (var k in dict.Keys) { + result [NLLanguageExtensions.GetValue (k)] = dict [k].DoubleValue; + } + return result; + } + } +} diff --git a/src/NaturalLanguage/NLLanguageRecognizer.cs b/src/NaturalLanguage/NLLanguageRecognizer.cs index 05c645a3df47..1698539ee54f 100644 --- a/src/NaturalLanguage/NLLanguageRecognizer.cs +++ b/src/NaturalLanguage/NLLanguageRecognizer.cs @@ -31,32 +31,26 @@ public partial class NLLanguageRecognizer { public static NLLanguage GetDominantLanguage (string @string) { var nsstring = NSString.CreateNative (@string); - var nslang = _GetDominantLanguage (nsstring); - var lang = NLLanguageExtensions.GetValue (nslang); - nslang?.Dispose (); - NSString.ReleaseNative (nsstring); - return lang; + try { + using (var nslang = _GetDominantLanguage (nsstring)) + return NLLanguageExtensions.GetValue (nslang); + } + finally { + NSString.ReleaseNative (nsstring); + } } public Dictionary GetLanguageHypotheses (nuint maxHypotheses) { using (var hypo = GetNativeLanguageHypotheses (maxHypotheses)) { - var result = new Dictionary (hypo.Keys.Length); - foreach (var k in hypo.Keys) { - result[NLLanguageExtensions.GetValue (k)] = hypo[k].DoubleValue; - } - return result; + return NLLanguageExtensions.Convert (hypo); } } public Dictionary LanguageHints { get { - var result = new Dictionary (NativeLanguageHints.Keys.Length); - foreach (var k in NativeLanguageHints.Keys) { - result[NLLanguageExtensions.GetValue (k)] = NativeLanguageHints[k].DoubleValue; - } - return result; + return NLLanguageExtensions.Convert (NativeLanguageHints); } set { var i = 0; diff --git a/src/NaturalLanguage/NLModel.cs b/src/NaturalLanguage/NLModel.cs new file mode 100644 index 000000000000..107ed871c44e --- /dev/null +++ b/src/NaturalLanguage/NLModel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +using Foundation; + +namespace NaturalLanguage { + + public partial class NLModel { + + public Dictionary GetPredictedLabelHypotheses (string @string, nuint maximumCount) + { + using (var hypo = GetNativePredictedLabelHypotheses (@string, maximumCount)) + return NLLanguageExtensions.Convert (hypo); + } + + public Dictionary[] GetPredictedLabelHypotheses (string[] tokens, nuint maximumCount) + { + var hypos = GetNativePredictedLabelHypotheses (tokens, maximumCount); + var result = new Dictionary [hypos.Length]; + for (int i = 0; i < result.Length; i++) + result [i] = NLLanguageExtensions.Convert (hypos [i]); + return result; + } + } +} diff --git a/src/NaturalLanguage/NLTagger.cs b/src/NaturalLanguage/NLTagger.cs new file mode 100644 index 000000000000..9abe4ada3491 --- /dev/null +++ b/src/NaturalLanguage/NLTagger.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; + +using Foundation; + +namespace NaturalLanguage { + + public partial class NLTagger { + + public Dictionary GetTagHypotheses (nuint characterIndex, NLTokenUnit unit, NLTagScheme scheme, nuint maximumCount) + { + using (var hypo = GetNativeTagHypotheses (characterIndex, unit, scheme.GetConstant (), maximumCount)) + return NLLanguageExtensions.Convert (hypo); + } + + public Dictionary GetTagHypotheses (nuint characterIndex, NLTokenUnit unit, NLTagScheme scheme, nuint maximumCount, out NSRange tokenRange) + { + using (var hypo = GetNativeTagHypotheses (characterIndex, unit, scheme.GetConstant (), maximumCount, out tokenRange)) + return NLLanguageExtensions.Convert (hypo); + } + } +} diff --git a/src/NearbyInteraction/Enums.cs b/src/NearbyInteraction/Enums.cs new file mode 100644 index 000000000000..5bd9f7314098 --- /dev/null +++ b/src/NearbyInteraction/Enums.cs @@ -0,0 +1,36 @@ +// +// NearbyInteraction enums +// +// Authors: +// Whitney Schmidt +// +// Copyright 2020 Microsoft Inc. +// + +using ObjCRuntime; +using Foundation; +using System; + +namespace NearbyInteraction { + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [ErrorDomain ("NIErrorDomain")] + [Native] + public enum NIErrorCode : long + { + UnsupportedPlatform = -5889, + InvalidConfiguration = -5888, + SessionFailed = -5887, + ResourceUsageTimeout = -5886, + ActiveSessionsLimitExceeded = -5885, + UserDidNotAllow = -5884, + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Native] + public enum NINearbyObjectRemovalReason : long + { + Timeout, + PeerEnded, + } +} diff --git a/src/NearbyInteraction/NINearbyObject.cs b/src/NearbyInteraction/NINearbyObject.cs new file mode 100644 index 000000000000..50a1de3d6fb8 --- /dev/null +++ b/src/NearbyInteraction/NINearbyObject.cs @@ -0,0 +1,41 @@ +// +// NearbyInteraction manual bindings +// +// Authors: +// Whitney Schmidt +// +// Copyright 2020 Microsoft Inc. +// + +using System; +using System.Runtime.InteropServices; + +using CoreFoundation; +using Foundation; +using ObjCRuntime; +using Vector3 = global::OpenTK.Vector3; + +#if __IOS__ +namespace NearbyInteraction { + partial class NINearbyObject + { + static Vector3? _DirectionNotAvailable; + + // TODO: https://github.com/xamarin/maccore/issues/2274 + // We do not have generator support to trampoline Vector3 -> vector_float3 for Fields + [Field ("NINearbyObjectDirectionNotAvailable", "NearbyInteraction")] + public static Vector3 DirectionNotAvailable { + get { + if (_DirectionNotAvailable == null) { + unsafe { + Vector3 *pointer = (Vector3 *) Dlfcn.GetIndirect (Libraries.NearbyInteraction.Handle, "NINearbyObjectDirectionNotAvailable"); + _DirectionNotAvailable = *pointer; + } + } + return (Vector3)_DirectionNotAvailable; + } + } + } + +} +#endif //__IOS__ diff --git a/src/NetworkExtension/NEEnums.cs b/src/NetworkExtension/NEEnums.cs index d0b682920af2..520eaf02fa7d 100644 --- a/src/NetworkExtension/NEEnums.cs +++ b/src/NetworkExtension/NEEnums.cs @@ -262,4 +262,33 @@ public enum NEHotspotHelperResult : long { TemporaryFailure = 6 } #endif + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Native] + [ErrorDomain ("NEAppPushErrorDomain")] + public enum NEAppPushManagerError : long { + ConfigurationInvalid = 1, + ConfigurationNotLoaded = 2, + InternalError = 3, + InactiveSession = 4, + } + + [NoWatch, NoTV, Mac (11,0), iOS (14,0)] + [Native] + public enum NEDnsProtocol : long { + Cleartext = 1, + Tls = 2, + Https = 3, + } + + [NoWatch, NoTV, Mac (11,0), iOS (14,0)] + [Native] + [ErrorDomain ("NEDNSSettingsErrorDomain")] + public enum NEDnsSettingsManagerError : long { + Invalid = 1, + Disabled = 2, + Stale = 3, + CannotBeRemoved = 4, + } + } diff --git a/src/NotificationCenter/NCEnums.cs b/src/NotificationCenter/NCEnums.cs index a10cbb8a08fc..993fa557a5f6 100644 --- a/src/NotificationCenter/NCEnums.cs +++ b/src/NotificationCenter/NCEnums.cs @@ -11,6 +11,8 @@ namespace NotificationCenter { [iOS (8,0)][Mac (10,10)] + [Deprecated (PlatformName.iOS, 14,0)] + [Deprecated (PlatformName.MacOSX, 11,0)] [Native] public enum NCUpdateResult : ulong { NewData, @@ -19,6 +21,7 @@ public enum NCUpdateResult : ulong { } [iOS (10,0)][NoMac] + [Deprecated (PlatformName.iOS, 14,0)] [Native] public enum NCWidgetDisplayMode : long { Compact, diff --git a/src/ObjCRuntime/PlatformAvailability2.cs b/src/ObjCRuntime/PlatformAvailability2.cs index d45e5282a867..c42b53a570d6 100644 --- a/src/ObjCRuntime/PlatformAvailability2.cs +++ b/src/ObjCRuntime/PlatformAvailability2.cs @@ -100,7 +100,7 @@ public override string ToString () } if (Architecture != PlatformArchitecture.None) - builder.AppendFormat (", {0}.{1}", nameof (PlatformArchitecture), Architecture); + builder.Append (", ObjCRuntime.PlatformArchitecture.").Append (Architecture); if (Message != null) builder.AppendFormat (", message: \"{0}\"", Message.Replace ("\"", "\"\"")); diff --git a/src/PassKit/PKEnums.cs b/src/PassKit/PKEnums.cs index 99530e2a40b6..cb7b80c6bfac 100644 --- a/src/PassKit/PKEnums.cs +++ b/src/PassKit/PKEnums.cs @@ -9,6 +9,7 @@ namespace PassKit { // untyped enum -> PKError.h // This never seemed to be deprecatd, yet in iOS8 it's obsoleted [Obsoleted (PlatformName.iOS, 8, 0)] + [NoMac] public enum PKErrorCode { None = 0, Unknown = 1, @@ -17,6 +18,7 @@ public enum PKErrorCode { } // NSInteger -> PKPass.h + [Mac (11,0)] [ErrorDomain ("PKPassKitErrorDomain")] [Native] public enum PKPassKitErrorCode : long { @@ -31,6 +33,7 @@ public enum PKPassKitErrorCode : long { // NSInteger -> PKPassLibrary.h [iOS (7,0)] + [Mac (11,0)] [Native] public enum PKPassLibraryAddPassesStatus : long { DidAddPasses, @@ -38,30 +41,36 @@ public enum PKPassLibraryAddPassesStatus : long { DidCancelAddPasses } + [Mac (11,0)] [Native] public enum PKPassType : ulong { Barcode, SecureElement, + [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'SecureElement' instead.")] [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'SecureElement' instead.")] Payment = SecureElement, Any = ulong.MaxValue, } + [Mac (11,0)] [Watch (3,0)] [Native] public enum PKPaymentAuthorizationStatus : long { Success, Failure, + [NoMac] [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentBillingAddressInvalidError'.")] [Deprecated (PlatformName.iOS, 11,0, 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'.")] InvalidShippingPostalAddress, + [NoMac] [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentContactInvalidError'.")] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentContactInvalidError'.")] InvalidShippingContact, @@ -74,6 +83,7 @@ public enum PKPaymentAuthorizationStatus : long { PinLockout } + [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'PKSecureElementPassActivationState' instead.")] [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'PKSecureElementPassActivationState' instead.")] [Native] @@ -81,6 +91,7 @@ public enum PKPaymentPassActivationState : ulong { Activated, RequiresActivation, Activating, Suspended, Deactivated } + [Mac (11,0)] [Watch (6,2), iOS (13,4)] [Native] public enum PKSecureElementPassActivationState : long { @@ -91,6 +102,7 @@ public enum PKSecureElementPassActivationState : long { Deactivated, } + [Mac (11,0)] [Watch (3,0)] [Native] public enum PKMerchantCapability : ulong { @@ -100,6 +112,7 @@ public enum PKMerchantCapability : ulong { Debit = 1 << 3 } + [NoMac] [Watch (3,0)] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'PKContactField' instead.")] [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'PKContactField' instead.")] @@ -115,6 +128,7 @@ public enum PKAddressField : ulong { All = PostalAddress|Phone|Email|Name } + [Mac (11,0)] [NoWatch] [iOS (8,3)] [Native] @@ -124,6 +138,7 @@ public enum PKPaymentButtonStyle : long { Black, } + [Mac (11,0)] [NoWatch] [iOS (8,3)] [Native] @@ -138,6 +153,7 @@ public enum PKPaymentButtonType : long { Donate, } + [Mac (11,0)] [Watch (3,0)] [iOS (8,3)] [Native] @@ -150,6 +166,7 @@ public enum PKShippingType : ulong { [Watch (6,0)] [iOS (9,0)] + [Mac (11,0)] [Native] public enum PKAddPaymentPassError : long { @@ -158,6 +175,7 @@ public enum PKAddPaymentPassError : long SystemCancelled } + [Mac (11,0)] [NoWatch] [iOS (9,0)] [Native] @@ -170,6 +188,7 @@ public enum PKAutomaticPassPresentationSuppressionResult : ulong Success } + [Mac (11,0)] [Watch (3,0)] [iOS (9,0)] [Native] @@ -182,6 +201,7 @@ public enum PKPaymentMethodType : ulong Store } + [Mac (11,0)] [Watch (3,0)] [iOS (9,0)] [Native] @@ -192,6 +212,7 @@ public enum PKPaymentSummaryItemType : ulong } [NoWatch] + [NoMac] // under `#if TARGET_OS_IOS` [iOS (9,0)] [Native] public enum PKAddPassButtonStyle : long { @@ -199,6 +220,7 @@ public enum PKAddPassButtonStyle : long { Outline } + [Mac (11,0)] [Watch (4,0)][iOS (11,0)] [ErrorDomain ("PKPaymentErrorDomain")] [Native] @@ -210,6 +232,7 @@ public enum PKPaymentErrorCode : long { } [iOS (12,0)] + [Mac (11,0)] [NoWatch] // https://feedbackassistant.apple.com/feedback/6301809 https://github.com/xamarin/maccore/issues/1819 [Native] public enum PKAddPaymentPassStyle : ulong { @@ -218,6 +241,7 @@ public enum PKAddPaymentPassStyle : ulong { } [Watch (6,2), iOS (13,4)] + [Mac (11,0)] [ErrorDomain ("PKAddSecureElementPassErrorDomain")] [Native] public enum PKAddSecureElementPassErrorCode : long { diff --git a/src/PdfKit/Enums.cs b/src/PdfKit/Enums.cs index 2f11af27dc21..5b6f73415187 100644 --- a/src/PdfKit/Enums.cs +++ b/src/PdfKit/Enums.cs @@ -75,7 +75,8 @@ public enum PdfLineStyle : long { public enum PdfMarkupType : long { Highlight = 0, StrikeOut = 1, - Underline = 2 + Underline = 2, + Redact = 3, } [iOS (11,0)] diff --git a/src/Photos/Enums.cs b/src/Photos/Enums.cs index ae2e51cd8d18..4acc88fe3bce 100644 --- a/src/Photos/Enums.cs +++ b/src/Photos/Enums.cs @@ -249,7 +249,12 @@ public enum PHAssetBurstSelectionType : ulong { [Mac (10,13)] [Native] public enum PHAuthorizationStatus : long { - NotDetermined, Restricted, Denied, Authorized + NotDetermined, + Restricted, + Denied, + Authorized, + [iOS (14,0)][NoTV][NoMac] + Limited, } [iOS (9,0)] @@ -378,5 +383,14 @@ public enum PHPhotosError : long { LibraryVolumeOffline = 3114, RelinquishingLibraryBundleToWriter = 3142, SwitchingSystemPhotoLibrary = 3143, + NetworkAccessRequired = 3164, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + public enum PHAccessLevel : long + { + AddOnly = 1, + ReadWrite = 2, } } diff --git a/src/PhotosUI/PHEnums.cs b/src/PhotosUI/PHEnums.cs index 016368c992bd..f8da54d2d034 100644 --- a/src/PhotosUI/PHEnums.cs +++ b/src/PhotosUI/PHEnums.cs @@ -54,4 +54,14 @@ public enum PHProjectCategory { [Field ("PHProjectCategoryUndefined")] Undefined, } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Native] + public enum PHPickerConfigurationAssetRepresentationMode : long + { + Automatic = 0, + Current = 1, + Compatible = 2, + } } diff --git a/src/ReplayKit/RPBroadcastConfiguration.cs b/src/ReplayKit/RPBroadcastConfiguration.cs index fd1d1e8abc4d..acd6f38095ff 100644 --- a/src/ReplayKit/RPBroadcastConfiguration.cs +++ b/src/ReplayKit/RPBroadcastConfiguration.cs @@ -25,6 +25,8 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +#if !MONOMAC + using System; using System.Drawing; using System.Diagnostics; @@ -49,3 +51,5 @@ public AVVideoCodecSettings VideoCompressionProperties { } } } + +#endif diff --git a/src/ReplayKit/RPEnums.cs b/src/ReplayKit/RPEnums.cs index aaf012f09ef9..ffe99054515f 100644 --- a/src/ReplayKit/RPEnums.cs +++ b/src/ReplayKit/RPEnums.cs @@ -7,12 +7,12 @@ using System; using ObjCRuntime; using Foundation; -using UIKit; namespace ReplayKit { [iOS (9,0)] [TV (10,0)] + [Mac (11,0)] [Native] [ErrorDomain ("RPRecordingErrorDomain")] public enum RPRecordingError : long { @@ -55,6 +55,7 @@ public enum RPRecordingError : long { [NoiOS] [TV (10,0)] + [NoMac] [Native] public enum RPPreviewViewControllerMode : long { Preview, @@ -64,6 +65,7 @@ public enum RPPreviewViewControllerMode : long { [Native] [iOS (10,0)] [TV (10,0)] + [Mac (11,0)] public enum RPSampleBufferType : long { Video = 1, AudioApp, @@ -73,6 +75,7 @@ public enum RPSampleBufferType : long { [Native] [iOS (11,0)] [NoTV] + [Mac (11,0)] public enum RPCameraPosition : long { Front = 1, Back, diff --git a/src/SafariServices/SSEnums.cs b/src/SafariServices/SSEnums.cs index 14e77b28c170..96f8709fea6f 100644 --- a/src/SafariServices/SSEnums.cs +++ b/src/SafariServices/SSEnums.cs @@ -27,7 +27,7 @@ public enum SSReadingListError : long { [NoMac] [iOS (9,0)] [Deprecated (PlatformName.iOS, 10,0, message: "Use 'SFErrorCode' enum.")] - [Introduced (PlatformName.MacCatalyst, 13, 4)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] [Native] [ErrorDomain ("SFContentBlockerErrorDomain")] public enum SFContentBlockerErrorCode : long { @@ -38,7 +38,7 @@ public enum SFContentBlockerErrorCode : long { } [iOS (10,0)] - [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] + [Introduced (PlatformName.MacCatalyst, 13,4)] [Native] [ErrorDomain ("SFErrorDomain")] public enum SFErrorCode : long diff --git a/src/Security/Enums.cs b/src/Security/Enums.cs index 03f1d35b73de..a8ec3151dcb1 100644 --- a/src/Security/Enums.cs +++ b/src/Security/Enums.cs @@ -69,6 +69,7 @@ public enum SecStatusCode { Pkcs12VerifyFailure = -25264, NotSigner = -26267, MissingEntitlement = -34018, + RestrictedApi = -34020, ServiceNotAvailable = -67585, InsufficientClientID = -67586, DeviceReset = -67587, @@ -394,6 +395,7 @@ public enum SecStatusCode { CertificatePolicyNotAllowed = -67899, CertificateNameNotAllowed = -67900, CertificateValidityPeriodTooLong = -67901, + CertificateIsCA = -67902, } // typedef uint32_t SecPadding; diff --git a/src/Security/SecSharedCredential.cs b/src/Security/SecSharedCredential.cs index ebe4f29c7671..053293ed9e72 100644 --- a/src/Security/SecSharedCredential.cs +++ b/src/Security/SecSharedCredential.cs @@ -1,4 +1,4 @@ -#if IOS +#if IOS || MONOMAC using System; using System.ComponentModel; @@ -13,6 +13,8 @@ namespace Security { public static partial class SecSharedCredential { [iOS (8,0)] + [Mac (11,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] [DllImport (Constants.SecurityLibrary)] extern static void SecAddSharedWebCredential (IntPtr /* CFStringRef */ fqdn, IntPtr /* CFStringRef */ account, IntPtr /* CFStringRef */ password, IntPtr /* void (^completionHandler)( CFErrorRef error) ) */ completionHandler); @@ -66,6 +68,8 @@ public static void AddSharedWebCredential (string domainName, string account, st } [iOS (8,0)] + [Mac (11,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] [DllImport (Constants.SecurityLibrary)] extern static void SecRequestSharedWebCredential ( IntPtr /* CFStringRef */ fqdn, IntPtr /* CFStringRef */ account, IntPtr /* void (^completionHandler)( CFArrayRef credentials, CFErrorRef error) */ completionHandler); @@ -98,6 +102,11 @@ public static void RequestSharedWebCredential (string domainName, string account #endif [iOS (8,0)] + [Mac (11,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'ASAuthorizationPasswordRequest' instead.")] + [Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'ASAuthorizationPasswordRequest' instead.")] + [Deprecated (PlatformName.MacCatalyst, 14,0, message: "Use 'ASAuthorizationPasswordRequest' instead.")] [BindingImpl (BindingImplOptions.Optimizable)] public static void RequestSharedWebCredential (string domainName, string account, Action handler) { @@ -136,10 +145,14 @@ public static void RequestSharedWebCredential (string domainName, string account } [iOS (8,0)] + [Mac (11,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] [DllImport (Constants.SecurityLibrary)] extern static IntPtr /* CFStringRef */ SecCreateSharedWebCredentialPassword (); [iOS (8,0)] + [Mac (11,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] public static string CreateSharedWebCredentialPassword () { var handle = SecCreateSharedWebCredentialPassword (); diff --git a/src/Security/SecureTransport.cs b/src/Security/SecureTransport.cs index de852b946666..09c2334c3eb6 100644 --- a/src/Security/SecureTransport.cs +++ b/src/Security/SecureTransport.cs @@ -158,6 +158,8 @@ public enum SslStatus { SslAtsLeafCertificateHashAlgorithmViolation = -9884, SslAtsCertificateHashAlgorithmViolation = -9885, SslAtsCertificateTrustViolation = -9886, + // xcode 12 + SslEarlyDataRejected = -9890, } // Security.framework/Headers/SecureTransport.h diff --git a/src/Security/Trust.cs b/src/Security/Trust.cs index d72c38f81192..cd3ea8499b9b 100644 --- a/src/Security/Trust.cs +++ b/src/Security/Trust.cs @@ -172,6 +172,10 @@ public SecCertificate this [nint index] { [DllImport (Constants.SecurityLibrary)] extern static IntPtr /* SecKeyRef */ SecTrustCopyPublicKey (IntPtr /* SecTrustRef */ trust); + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'GetKey' instead.")] + [Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'GetKey' instead.")] + [Deprecated (PlatformName.TvOS, 14,0, message: "Use 'GetKey' instead.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'GetKey' instead.")] public SecKey GetPublicKey () { if (handle == IntPtr.Zero) @@ -180,6 +184,25 @@ public SecKey GetPublicKey () return new SecKey (SecTrustCopyPublicKey (handle), true); } + [iOS (14,0)] + [TV (14,0)] + [Watch (7,0)] + [Mac (11,0)] + [DllImport (Constants.SecurityLibrary)] + extern static IntPtr /* SecKeyRef */ SecTrustCopyKey (IntPtr /* SecTrustRef */ trust); + + [iOS (14,0)] + [TV (14,0)] + [Watch (7,0)] + [Mac (11,0)] + public SecKey GetKey () + { + if (handle == IntPtr.Zero) + throw new ObjectDisposedException ("SecTrust"); + + return new SecKey (SecTrustCopyKey (handle), true); + } + [Mac (10,9)] [DllImport (Constants.SecurityLibrary)] extern static IntPtr /* CFDataRef */ SecTrustCopyExceptions (IntPtr /* SecTrustRef */ trust); diff --git a/src/SensorKit/SRAbsoluteTime.cs b/src/SensorKit/SRAbsoluteTime.cs new file mode 100644 index 000000000000..4c3e9610c5a5 --- /dev/null +++ b/src/SensorKit/SRAbsoluteTime.cs @@ -0,0 +1,25 @@ +using System; +using System.Runtime.InteropServices; +using ObjCRuntime; + +#nullable enable + +namespace SensorKit { + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + public static class SRAbsoluteTime { + + [DllImport (Constants.SensorKitLibrary, EntryPoint = "SRAbsoluteTimeGetCurrent")] + public static extern /* SRAbsoluteTime */ double GetCurrent (); + + [DllImport (Constants.SensorKitLibrary, EntryPoint = "SRAbsoluteTimeFromCFAbsoluteTime")] + public static extern /* SRAbsoluteTime */ double FromCFAbsoluteTime (/* CFAbsoluteTime */ double cfAbsoluteTime); + + [DllImport (Constants.SensorKitLibrary, EntryPoint = "SRAbsoluteTimeToCFAbsoluteTime")] + public static extern /* CFAbsoluteTime */ double ToCFAbsoluteTime (double srAbsoluteTime); + + [DllImport (Constants.SensorKitLibrary, EntryPoint = "SRAbsoluteTimeFromContinuousTime")] + public static extern /* SRAbsoluteTime */ double FromContinuousTime (ulong continuousTime); + } +} diff --git a/src/SensorKit/SRAmbientLightChromaticity.cs b/src/SensorKit/SRAmbientLightChromaticity.cs new file mode 100644 index 000000000000..4a90c4516a75 --- /dev/null +++ b/src/SensorKit/SRAmbientLightChromaticity.cs @@ -0,0 +1,16 @@ +using System; +using System.Runtime.InteropServices; +using ObjCRuntime; + +#nullable enable + +namespace SensorKit { + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [StructLayout (LayoutKind.Sequential)] + public struct SRAmbientLightChromaticity { + public float X; + public float Y; + } +} diff --git a/src/SensorKit/SRSensor.cs b/src/SensorKit/SRSensor.cs new file mode 100644 index 000000000000..82f62f67d0ef --- /dev/null +++ b/src/SensorKit/SRSensor.cs @@ -0,0 +1,21 @@ +using System; +using System.Runtime.InteropServices; +using ObjCRuntime; + +#nullable enable + +namespace SensorKit { + + public partial class SRSensorExtensions { + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + public static SRSensor GetSensorForDeletionRecords (this SRSensor self) + { + var constant = self.GetConstant (); + if (constant == null) + return SRSensor.Invalid; + return GetValue (constant._GetSensorForDeletionRecordsFromSensor ()); + } + } +} diff --git a/src/StoreKit/Enums.cs b/src/StoreKit/Enums.cs index dae692fbc436..542250e6243f 100644 --- a/src/StoreKit/Enums.cs +++ b/src/StoreKit/Enums.cs @@ -1,3 +1,4 @@ +using Foundation; using ObjCRuntime; using System; @@ -54,7 +55,7 @@ public enum SKDownloadState : long { } #if !MONOMAC || !XAMCORE_4_0 - [NoWatch] + [Watch (7,0)] [iOS (9,3)] [Native] public enum SKCloudServiceAuthorizationStatus : long { @@ -64,7 +65,7 @@ public enum SKCloudServiceAuthorizationStatus : long { Authorized } - [NoWatch] + [Watch (7,0)] [iOS (9,3)] [Native] public enum SKCloudServiceCapability : ulong { @@ -74,8 +75,11 @@ public enum SKCloudServiceCapability : ulong { MusicCatalogSubscriptionEligible = 1 << 1, AddToCloudMusicLibrary = 1 << 8 } +#endif + +#if !XAMCORE_4_0 - [iOS (11,0)][TV (11,0)][NoMac][NoWatch] + [iOS (11,0)][TV (11,0)][Mac (11,0)][NoWatch] [Native] public enum SKProductStorePromotionVisibility : long { Default, @@ -99,4 +103,12 @@ public enum SKProductDiscountPaymentMode : ulong { PayUpFront, FreeTrial, } + + [Unavailable (PlatformName.MacCatalyst)] + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Native, Advice ("This API is not available when using UIKit on macOS.")] + public enum SKOverlayPosition : long { + SKOverlayPositionBottom = 0, + Raised = 1, + } } diff --git a/src/StoreKit/SKOverlayAppClipConfiguration.cs b/src/StoreKit/SKOverlayAppClipConfiguration.cs new file mode 100644 index 000000000000..7ef205a5fbbb --- /dev/null +++ b/src/StoreKit/SKOverlayAppClipConfiguration.cs @@ -0,0 +1,20 @@ +#if __IOS__ +using System; + +using Foundation; +using CoreFoundation; +using ObjCRuntime; + +namespace StoreKit { + +#if !COREBUILD + public partial class SKOverlayAppClipConfiguration + { + public NSObject this[string i] { + get => GetAdditionalValue (i); + set => SetAdditionalValue (value, i); + } + } +#endif +} +#endif \ No newline at end of file diff --git a/src/StoreKit/SKOverlayAppConfiguration.cs b/src/StoreKit/SKOverlayAppConfiguration.cs new file mode 100644 index 000000000000..08215ec28c1d --- /dev/null +++ b/src/StoreKit/SKOverlayAppConfiguration.cs @@ -0,0 +1,20 @@ +#if __IOS__ +using System; + +using Foundation; +using CoreFoundation; +using ObjCRuntime; + +namespace StoreKit { + +#if !COREBUILD + public partial class SKOverlayAppConfiguration + { + public NSObject this[string i] { + get => GetAdditionalValue (i); + set => SetAdditionalValue (value, i); + } + } +#endif +} +#endif \ No newline at end of file diff --git a/src/StoreKit/StoreProductParameters.cs b/src/StoreKit/StoreProductParameters.cs index f9e1073b83db..824308e0973b 100644 --- a/src/StoreKit/StoreProductParameters.cs +++ b/src/StoreKit/StoreProductParameters.cs @@ -25,7 +25,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !MONOMAC && !WATCH +#if !WATCH using System; diff --git a/src/SystemConfiguration/CaptiveNetwork.cs b/src/SystemConfiguration/CaptiveNetwork.cs index 301276697a45..2fda470c6f7d 100644 --- a/src/SystemConfiguration/CaptiveNetwork.cs +++ b/src/SystemConfiguration/CaptiveNetwork.cs @@ -84,7 +84,8 @@ static public StatusCode TryCopyCurrentNetworkInfo (string interfaceName, out NS #endif [DllImport (Constants.SystemConfigurationLibrary)] extern static IntPtr /* CFArrayRef __nullable */ CNCopySupportedInterfaces (); - + + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'NEHotspotNetwork.FetchCurrent' instead.")] static public StatusCode TryGetSupportedInterfaces (out string[] supportedInterfaces) { IntPtr array = CNCopySupportedInterfaces (); diff --git a/src/UIKit/UIAccessibility.cs b/src/UIKit/UIAccessibility.cs index 54dbb3412242..526f48afd4c7 100644 --- a/src/UIKit/UIAccessibility.cs +++ b/src/UIKit/UIAccessibility.cs @@ -261,6 +261,13 @@ public static bool IsBoldTextEnabled { } } + [TV (14,0), iOS (14,0)] + [DllImport (Constants.UIKitLibrary)] + static extern bool UIAccessibilityButtonShapesEnabled (); + + [TV (14,0), iOS (14,0)] + public static bool ButtonShapesEnabled => UIAccessibilityButtonShapesEnabled (); + [iOS (8,0)] [DllImport (Constants.UIKitLibrary)] static extern bool UIAccessibilityIsGrayscaleEnabled (); @@ -283,6 +290,13 @@ static public bool IsReduceMotionEnabled { } } + [TV (14,0), iOS (14,0)] + [DllImport (Constants.UIKitLibrary)] + static extern bool UIAccessibilityPrefersCrossFadeTransitions (); + + [TV (14,0), iOS (14,0)] + public static bool PrefersCrossFadeTransitions => UIAccessibilityPrefersCrossFadeTransitions (); + [iOS (13,0), TV (13,0)] [DllImport (Constants.UIKitLibrary)] static extern bool UIAccessibilityIsVideoAutoplayEnabled (); diff --git a/src/UIKit/UICellAccessory.cs b/src/UIKit/UICellAccessory.cs new file mode 100644 index 000000000000..64f04c5bc163 --- /dev/null +++ b/src/UIKit/UICellAccessory.cs @@ -0,0 +1,111 @@ +// +// UICellAccessory.cs +// +// Authors: +// Alex Soto +// +// Copyright (c) Microsoft Corporation. +// + +using System; +using System.Runtime.InteropServices; +using Foundation; +using ObjCRuntime; + +#nullable enable +#if !WATCH + +namespace UIKit { + + public partial class UICellAccessory { + + [TV (14,0), iOS (14,0)] + [DllImport (Constants.UIKitLibrary)] + static extern IntPtr UICellAccessoryPositionBeforeAccessoryOfClass (IntPtr accessoryCls); + + [TV (14,0), iOS (14,0)] + [return: DelegateProxy (typeof (SDUICellAccessoryPosition))] + [BindingImpl (BindingImplOptions.Optimizable)] + public static UICellAccessoryPosition GetPositionBeforeAccessory (Class accessoryClass) + { + if (accessoryClass == null) + throw new ArgumentNullException (nameof (accessoryClass)); + var ret = UICellAccessoryPositionBeforeAccessoryOfClass (accessoryClass.Handle); + return NIDUICellAccessoryPosition.Create (ret)!; + } + + [TV (14,0), iOS (14,0)] + [return: DelegateProxy (typeof (SDUICellAccessoryPosition))] + [BindingImpl (BindingImplOptions.Optimizable)] + public static UICellAccessoryPosition GetPositionBeforeAccessory (Type accessoryType) => GetPositionBeforeAccessory (new Class (accessoryType)); + + [TV (14,0), iOS (14,0)] + [DllImport (Constants.UIKitLibrary)] + static extern IntPtr UICellAccessoryPositionAfterAccessoryOfClass (IntPtr accessoryCls); + + [TV (14,0), iOS (14,0)] + [return: DelegateProxy (typeof (SDUICellAccessoryPosition))] + [BindingImpl (BindingImplOptions.Optimizable)] + public static UICellAccessoryPosition GetPositionAfterAccessory (Class accessoryClass) + { + if (accessoryClass == null) + throw new ArgumentNullException (nameof (accessoryClass)); + var ret = UICellAccessoryPositionAfterAccessoryOfClass (accessoryClass.Handle); + return NIDUICellAccessoryPosition.Create (ret)!; + } + + [TV (14,0), iOS (14,0)] + [return: DelegateProxy (typeof (SDUICellAccessoryPosition))] + [BindingImpl (BindingImplOptions.Optimizable)] + public static UICellAccessoryPosition GetPositionAfterAccessory (Type accessoryType) => GetPositionAfterAccessory (new Class (accessoryType)); + } /* class UICellAccessory */ + + [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)] + [UserDelegateType (typeof (UICellAccessoryPosition))] + internal delegate nuint DUICellAccessoryPosition (IntPtr block, IntPtr accessories); + + // + // This class bridges native block invocations that call into C# + // + static internal class SDUICellAccessoryPosition { + static internal readonly DUICellAccessoryPosition Handler = Invoke; + + [MonoPInvokeCallback (typeof (DUICellAccessoryPosition))] + static unsafe nuint Invoke (IntPtr block, IntPtr accessories) + { + var descriptor = (BlockLiteral *) block; + var del = (UICellAccessoryPosition) (descriptor->Target); + nuint retval = del (NSArray.ArrayFromHandle (accessories)); + return retval; + } + } /* class SDUICellAccessoryPosition */ + + internal sealed class NIDUICellAccessoryPosition : TrampolineBlockBase { + DUICellAccessoryPosition invoker; + + [BindingImpl (BindingImplOptions.Optimizable)] + public unsafe NIDUICellAccessoryPosition (BlockLiteral *block) : base (block) + { + invoker = block->GetDelegateForBlock (); + } + + [Preserve (Conditional = true)] + [BindingImpl (BindingImplOptions.Optimizable)] + public unsafe static UICellAccessoryPosition? Create (IntPtr block) + { + if (block == IntPtr.Zero) + return null; + var del = (UICellAccessoryPosition) GetExistingManagedDelegate (block); + return del ?? new NIDUICellAccessoryPosition ((BlockLiteral *) block).Invoke; + } + + [BindingImpl (BindingImplOptions.Optimizable)] + nuint Invoke (UICellAccessory [] accessories) + { + using var nsa_accessories = accessories == null ? null : NSArray.FromNSObjects (accessories); + + return invoker (BlockPointer, nsa_accessories.GetHandle ()); + } + } /* class NIDUICellAccessoryPosition */ +} +#endif // WATCH diff --git a/src/UIKit/UIConfigurationColorTransformer.cs b/src/UIKit/UIConfigurationColorTransformer.cs new file mode 100644 index 000000000000..57e68f0304e7 --- /dev/null +++ b/src/UIKit/UIConfigurationColorTransformer.cs @@ -0,0 +1,86 @@ +// +// UIConfigurationColorTransformer.cs +// +// Authors: +// Alex Soto +// +// Copyright (c) Microsoft Corporation. +// + +using System; +using System.Runtime.InteropServices; +using Foundation; +using ObjCRuntime; + +#nullable enable +#if !WATCH + +namespace UIKit { + + public static partial class UIConfigurationColorTransformer { + + [BindingImpl (BindingImplOptions.Optimizable)] + public static UIConfigurationColorTransformerHandler Grayscale { + [return: DelegateProxy (typeof (SDUIConfigurationColorTransformerHandler))] + get => NIDUIConfigurationColorTransformerHandler.Create (_Grayscale)!; + } + + [BindingImpl (BindingImplOptions.Optimizable)] + public static UIConfigurationColorTransformerHandler PreferredTint { + [return: DelegateProxy (typeof (SDUIConfigurationColorTransformerHandler))] + get => NIDUIConfigurationColorTransformerHandler.Create (_PreferredTint)!; + } + + [BindingImpl (BindingImplOptions.Optimizable)] + public static UIConfigurationColorTransformerHandler MonochromeTint { + [return: DelegateProxy (typeof (SDUIConfigurationColorTransformerHandler))] + get => NIDUIConfigurationColorTransformerHandler.Create (_MonochromeTint)!; + } + } /* class UIConfigurationColorTransformer */ + + [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)] + [UserDelegateType (typeof (UIConfigurationColorTransformerHandler))] + internal delegate IntPtr DUIConfigurationColorTransformerHandler (IntPtr block, IntPtr color); + + // + // This class bridges native block invocations that call into C# + // + static internal class SDUIConfigurationColorTransformerHandler { + static internal readonly DUIConfigurationColorTransformerHandler Handler = Invoke; + + [MonoPInvokeCallback (typeof (DUIConfigurationColorTransformerHandler))] + static unsafe IntPtr Invoke (IntPtr block, IntPtr color) { + var descriptor = (BlockLiteral *) block; + var del = (UIConfigurationColorTransformerHandler) (descriptor->Target); + var retval = del (Runtime.GetNSObject (color)); + return retval != null ? retval.Handle : IntPtr.Zero; + } + } /* class SDUIConfigurationColorTransformerHandler */ + + internal sealed class NIDUIConfigurationColorTransformerHandler : TrampolineBlockBase { + DUIConfigurationColorTransformerHandler invoker; + + [BindingImpl (BindingImplOptions.Optimizable)] + public unsafe NIDUIConfigurationColorTransformerHandler (BlockLiteral *block) : base (block) + { + invoker = block->GetDelegateForBlock (); + } + + [Preserve (Conditional = true)] + [BindingImpl (BindingImplOptions.Optimizable)] + public unsafe static UIConfigurationColorTransformerHandler? Create (IntPtr block) + { + if (block == IntPtr.Zero) + return null; + var del = (UIConfigurationColorTransformerHandler) GetExistingManagedDelegate (block); + return del ?? new NIDUIConfigurationColorTransformerHandler ((BlockLiteral *) block).Invoke; + } + + [BindingImpl (BindingImplOptions.Optimizable)] + UIColor Invoke (UIColor color) + { + return Runtime.GetNSObject (invoker (BlockPointer, color.GetHandle ())); + } + } /* class NIDUIConfigurationColorTransformerHandler */ +} +#endif // WATCH diff --git a/src/UIKit/UIEnums.cs b/src/UIKit/UIEnums.cs index 3bfcf422ae59..9f1ca6e63175 100644 --- a/src/UIKit/UIEnums.cs +++ b/src/UIKit/UIEnums.cs @@ -117,6 +117,8 @@ public enum UIControlEvent : ulong { ValueChanged = 1 << 12, PrimaryActionTriggered = 1 << 13, + [iOS (14,0), TV (14,0)] + MenuActionTriggered = 1 << 14, EditingDidBegin = 1 << 16, EditingChanged = 1 << 17, @@ -392,9 +394,11 @@ public enum UIDocumentState : ulong { [Native] [NoWatch][NoTV] public enum UIImagePickerControllerSourceType : long { + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'PHPicker' instead.")] PhotoLibrary, Camera, - SavedPhotosAlbum + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'PHPicker' instead.")] + SavedPhotosAlbum, } // NSInteger -> UIImagePickerController.h @@ -951,6 +955,8 @@ public enum UIUserInterfaceIdiom : long { Pad, TV, CarPlay, + [Watch (7,0), TV (14,0), iOS (14,0)] + Mac, } // NSInteger -> UIApplication.h @@ -1717,6 +1723,7 @@ public enum UIDocumentMenuOrder : ulong { Last } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use the designated constructors instead.")] [NoTV][NoWatch] [iOS (8, 0)] [Native] @@ -1740,9 +1747,30 @@ public enum UIAccessibilityNavigationStyle : long { [NoWatch] public enum UISplitViewControllerDisplayMode : long { Automatic, - PrimaryHidden, - AllVisible, - PrimaryOverlay + [TV (14,0), iOS (14,0)] + SecondaryOnly, + [TV (14,0), iOS (14,0)] + OneBesideSecondary, + [TV (14,0), iOS (14,0)] + OneOverSecondary, + [TV (14,0), iOS (14,0)] + TwoBesideSecondary, + [TV (14,0), iOS (14,0)] + TwoOverSecondary, + [TV (14,0), iOS (14,0)] + TwoDisplaceSecondary, + + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'SecondaryOnly' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'SecondaryOnly' instead.")] + PrimaryHidden = SecondaryOnly, + + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'OneBesideSecondary' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'OneBesideSecondary' instead.")] + AllVisible = OneBesideSecondary, + + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'OneOverSecondary' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'OneOverSecondary' instead.")] + PrimaryOverlay = OneOverSecondary, } [Native] @@ -2171,6 +2199,7 @@ public enum UICollectionViewCellDragState : long Dragging } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'PHPicker' instead.")] [NoWatch] [NoTV, iOS (11,0)] [Native] @@ -2524,6 +2553,10 @@ public enum UIMenuIdentifier { BringAllToFront, [Field ("UIMenuRoot")] Root, + + [iOS (14,0), TV (14,0)] + [Field ("UIMenuOpenRecent")] + OpenRecent, } [iOS (13,0), TV (13,0), Watch (6,0)] @@ -2681,6 +2714,8 @@ public enum UIDatePickerStyle : long { Automatic, Wheels, Compact, + [iOS (14,0)] + Inline, } [Introduced (PlatformName.MacCatalyst, 13, 4)] @@ -2908,4 +2943,214 @@ public enum UIPointerEffectTintMode : long { Underlay, } + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UIButtonRole : long { + Normal, + Primary, + Cancel, + Destructive, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UICellAccessoryDisplayedState : long { + Always, + WhenEditing, + WhenNotEditing, + } + + [NoWatch, NoTV, iOS (14,0)] + [Native] + public enum UICellAccessoryOutlineDisclosureStyle : long { + Automatic, + Header, + Cell, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UICellAccessoryPlacement : long { + Leading, + Trailing, + } + + [NoWatch, NoTV, iOS (14,0)] + [Native] + public enum UICellConfigurationDragState : long { + None, + Lifting, + Dragging, + } + + [NoWatch, NoTV, iOS (14,0)] + [Native] + public enum UICellConfigurationDropState : long { + None, + NotTargeted, + Targeted, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UICollectionLayoutListAppearance : long { + Plain, + Grouped, +#if !TVOS + [NoTV] + InsetGrouped, + [NoTV] + Sidebar, + [NoTV] + SidebarPlain, +#endif + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UICollectionLayoutListHeaderMode : long { + None, + Supplementary, + FirstItemInSection, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UIContentInsetsReference : long { + Automatic, + None, + SafeArea, + LayoutMargins, + ReadableContent, + } + + [NoWatch, NoTV, iOS (14,0)] + [Native] + public enum UIContextMenuInteractionAppearance : long { + Unknown = 0, + Rich, + Compact, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UIUserInterfaceActiveAppearance : long { + Unspecified = -1, + Inactive, + Active, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UIListContentTextAlignment : long { + Natural, + Center, + Justified, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UIPageControlInteractionState : long { + None = 0, + Discrete = 1, + Continuous = 2, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UIPageControlBackgroundStyle : long { + Automatic = 0, + Prominent = 1, + Minimal = 2, + } + + [iOS (14,0), TV (14,0), NoWatch] + public enum UIPasteboardDetectionPattern { + [Field ("UIPasteboardDetectionPatternProbableWebURL")] + ProbableWebUrl, + [Field ("UIPasteboardDetectionPatternProbableWebSearch")] + ProbableWebSearch, + [Field ("UIPasteboardDetectionPatternNumber")] + Number, + } + + [Introduced (PlatformName.MacCatalyst, 10, 14)] + [NoWatch, NoTV, NoiOS] + [Native] + public enum UISceneCollectionJoinBehavior : long { + Automatic, + Preferred, + Disallowed, + PreferredWithoutActivating, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UISplitViewControllerStyle : long { + Unspecified, + DoubleColumn, + TripleColumn, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UISplitViewControllerColumn : long { + Primary, + Supplementary, + Secondary, + Compact, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UISplitViewControllerSplitBehavior : long { + Automatic, + Tile, + Overlay, + Displace, + } + + [NoWatch, NoTV, iOS (14,0)] + [Native] + public enum UISwitchStyle : long { + Automatic = 0, + Checkbox, + Sliding, + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Native] + public enum UICollectionLayoutListFooterMode : long { + None, + Supplementary, + } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, NoiOS] + [Native] + public enum UITitlebarSeparatorStyle : long { + Automatic, + None, + Line, + Shadow, + } + + [NoWatch, NoTV, iOS (14,0)] + [Native] + public enum UINavigationItemBackButtonDisplayMode : long { + Default = 0, + Generic = 1, + Minimal = 2, + } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Flags] + [Native] + public enum NSLineBreakStrategy : ulong { + None = 0x0, + PushOut = 1uL << 0, + HangulWordPriority = 1uL << 1, + Standard = 0xffff, + } + } diff --git a/src/VideoToolbox/VTDefs.cs b/src/VideoToolbox/VTDefs.cs index d35da5d27321..9938fcb28808 100644 --- a/src/VideoToolbox/VTDefs.cs +++ b/src/VideoToolbox/VTDefs.cs @@ -9,6 +9,7 @@ // using System; +using Foundation; using ObjCRuntime; namespace VideoToolbox { @@ -48,6 +49,10 @@ public enum VTStatus { ColorCorrectionImageRotationFailed = -12219, VideoDecoderRemoved = -17690, SessionMalfunction = -17691, + [Mac (11, 0)] + DecoderNeedsRosetta = -17692, + [Mac (11, 0)] + EncoderNeedsRosetta = -17693, } // uint32_t -> VTErrors.h @@ -252,4 +257,12 @@ public enum VTDownsamplingMode { Decimate, Average } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + public enum HdrMetadataInsertionMode { + [Field ("kVTHDRMetadataInsertionMode_None")] + None, + [Field ("kVTHDRMetadataInsertionMode_Auto")] + Auto, + } } diff --git a/src/VideoToolbox/VTUtilities.cs b/src/VideoToolbox/VTUtilities.cs index 1d082519dd0c..8243f46d961d 100644 --- a/src/VideoToolbox/VTUtilities.cs +++ b/src/VideoToolbox/VTUtilities.cs @@ -12,6 +12,7 @@ using ObjCRuntime; using CoreGraphics; +using CoreMedia; using CoreVideo; namespace VideoToolbox { @@ -45,5 +46,15 @@ public static VTStatus ToCGImage (this CVPixelBuffer pixelBuffer, out CGImage im return ret; } + +#if MONOMAC + [NoWatch, NoTV, NoiOS, Mac (11,0)] + [DllImport (Constants.VideoToolboxLibrary)] + static extern void VTRegisterSupplementalVideoDecoderIfAvailable (uint codecType); + + [NoWatch, NoTV, NoiOS, Mac (11,0)] + public static void RegisterSupplementalVideoDecoder (CMVideoCodecType codecType) + => VTRegisterSupplementalVideoDecoderIfAvailable ((uint) codecType); +#endif } } diff --git a/src/Vision/VNCircle.cs b/src/Vision/VNCircle.cs new file mode 100644 index 000000000000..b6a407201254 --- /dev/null +++ b/src/Vision/VNCircle.cs @@ -0,0 +1,31 @@ +// +// VNCircle.cs +// +// Authors: +// Alex Soto +// +// Copyright (c) Microsoft Corporation. +// + +using System; +using Foundation; +using ObjCRuntime; + +namespace Vision { + public partial class VNCircle { + + public static VNCircle CreateUsingRadius (VNPoint center, double radius) + { + var handle = Messaging.IntPtr_objc_msgSend (class_ptr, Selector.GetHandle ("alloc")); + handle = Messaging.IntPtr_objc_msgSend_IntPtr_Double (handle, Selector.GetHandle ("initWithCenter:radius:"), center.Handle, radius); + return Runtime.GetNSObject (handle, true); + } + + public static VNCircle CreateUsingDiameter (VNPoint center, double diameter) + { + var handle = Messaging.IntPtr_objc_msgSend (class_ptr, Selector.GetHandle ("alloc")); + handle = Messaging.IntPtr_objc_msgSend_IntPtr_Double (handle, Selector.GetHandle ("initWithCenter:diameter:"), center.Handle, diameter); + return Runtime.GetNSObject (handle, true); + } + } +} diff --git a/src/Vision/VNRecognizedPointsObservation.cs b/src/Vision/VNRecognizedPointsObservation.cs new file mode 100644 index 000000000000..59547acf7950 --- /dev/null +++ b/src/Vision/VNRecognizedPointsObservation.cs @@ -0,0 +1,57 @@ +// +// VNRecognizedPointsObservation.cs +// +// Authors: +// Alex Soto +// +// Copyright (c) Microsoft Corporation. +// + +using System; +using Foundation; +using ObjCRuntime; + +namespace Vision { + public partial class VNRecognizedPointsObservation { + + public T [] GetAvailableKeys () where T : Enum + { + var type = typeof (T); + if (!(type == typeof (VNHumanBodyPoseObservationJointName) || type == typeof (VNHumanHandPoseObservationJointName))) + throw new InvalidOperationException ($"Only '{nameof (VNHumanBodyPoseObservationJointName)}' and '{nameof (VNHumanHandPoseObservationJointName)}' are supported."); + + NSString[] keys = AvailableKeys; + if (keys == null) + return null; + + if (keys.Length == 0) + return Array.Empty (); + + if (type == typeof (VNHumanBodyPoseObservationJointName)) + return Array.ConvertAll (keys, (v) => (T) (object) VNHumanBodyPoseObservationJointNameExtensions.GetValue (v)); + else if (type == typeof (VNHumanHandPoseObservationJointName)) + return Array.ConvertAll (keys, (v) => (T) (object) VNHumanHandPoseObservationJointNameExtensions.GetValue (v)); + return null; + } + + public T [] GetAvailableGroupKeys () where T : Enum + { + var type = typeof (T); + if (!(type == typeof (VNHumanBodyPoseObservationJointsGroupName) || type == typeof (VNHumanHandPoseObservationJointsGroupName))) + throw new InvalidOperationException ($"Only '{nameof (VNHumanBodyPoseObservationJointsGroupName)}' and '{nameof (VNHumanHandPoseObservationJointsGroupName)}' are supported."); + + NSString[] keys = AvailableGroupKeys; + if (keys == null) + return null; + + if (keys.Length == 0) + return Array.Empty (); + + if (type == typeof (VNHumanBodyPoseObservationJointsGroupName)) + return Array.ConvertAll (keys, (v) => (T) (object) VNHumanBodyPoseObservationJointsGroupNameExtensions.GetValue (v)); + else if (type == typeof (VNHumanHandPoseObservationJointsGroupName)) + return Array.ConvertAll (keys, (v) => (T) (object) VNHumanHandPoseObservationJointsGroupNameExtensions.GetValue (v)); + return null; + } + } +} diff --git a/src/Vision/VNRequestRevision.cs b/src/Vision/VNRequestRevision.cs index 496aee1d4ebb..d53be4187b2b 100644 --- a/src/Vision/VNRequestRevision.cs +++ b/src/Vision/VNRequestRevision.cs @@ -14,14 +14,11 @@ namespace Vision { public partial class VNRequest { - internal static T [] GetSupportedVersions (NSIndexSet indexSet) where T : struct, IConvertible // Enum is sadly a C# 7.3 feature + internal static T [] GetSupportedVersions (NSIndexSet indexSet) where T : Enum { if (indexSet == null) return null; - if (!typeof (T).IsEnum) - throw new ArgumentException ("T must be an enum."); - var count = indexSet.Count; var supportedRevisions = new T [indexSet.Count]; diff --git a/src/Vision/VNUtils.cs b/src/Vision/VNUtils.cs index 0a5eabb2f666..b475eadef6ba 100644 --- a/src/Vision/VNUtils.cs +++ b/src/Vision/VNUtils.cs @@ -29,6 +29,10 @@ public static partial class VNUtils { [DllImport (Constants.VisionLibrary, EntryPoint = "VNImagePointForNormalizedPoint")] public static extern CGPoint GetImagePoint (CGPoint normalizedPoint, nuint imageWidth, nuint imageHeight); + [TV (14,0), Mac (11,0), iOS (14,0)] + [DllImport (Constants.VisionLibrary, EntryPoint = "VNNormalizedPointForImagePoint")] + public static extern CGPoint GetNormalizedPoint (CGPoint imagePoint, nuint imageWidth, nuint imageHeight); + [DllImport (Constants.VisionLibrary, EntryPoint = "VNImageRectForNormalizedRect")] public static extern CGRect GetImageRect (CGRect normalizedRect, nuint imageWidth, nuint imageHeight); @@ -68,4 +72,20 @@ public static CGPoint GetImagePoint (Vector2 faceLandmarkPoint, CGRect faceBound [TV (13,0), Mac (10,15), iOS (13,0)] public static nuint GetElementTypeSize (VNElementType elementType) => VNElementTypeSize ((nuint) (ulong) elementType); } + + public partial class VNGeometryUtils { + + public static VNCircle CreateBoundingCircle (Vector2 [] points, out NSError error) + { + if (points == null) + throw new ArgumentNullException (nameof (points)); + if (points.Length == 0) + throw new ArgumentException ($"'{nameof (points)}' array must have more than zero elements."); + + unsafe { + fixed (Vector2* points_ptr = points) + return CreateBoundingCircle ((IntPtr) points_ptr, points.Length, out error); + } + } + } } diff --git a/src/Vision/VNVector.cs b/src/Vision/VNVector.cs new file mode 100644 index 000000000000..0119030923d2 --- /dev/null +++ b/src/Vision/VNVector.cs @@ -0,0 +1,24 @@ +// +// VNVector.cs +// +// Authors: +// Alex Soto +// +// Copyright (c) Microsoft Corporation. +// + +using System; +using Foundation; +using ObjCRuntime; + +namespace Vision { + public partial class VNVector { + + public static VNVector Create (double r, double theta) + { + var handle = Messaging.IntPtr_objc_msgSend (class_ptr, Selector.GetHandle ("alloc")); + handle = Messaging.IntPtr_objc_msgSend_Double_Double (handle, Selector.GetHandle ("initWithR:theta:"), r, theta); + return Runtime.GetNSObject (handle, true); + } + } +} diff --git a/src/WKWebKit/Defs.cs b/src/WKWebKit/Defs.cs index c48cde09c5c5..4cc5a00dab67 100644 --- a/src/WKWebKit/Defs.cs +++ b/src/WKWebKit/Defs.cs @@ -68,6 +68,10 @@ public enum WKErrorCode : long { // Xcode 11 AttributedStringContentFailedToLoad, AttributedStringContentLoadTimedOut, + // Xcode 12 + JavaScriptInvalidFrameTarget, + NavigationAppBoundDomain, + JavaScriptAppBoundDomain, } #if !MONOMAC || !XAMCORE_4_0 diff --git a/src/WKWebKit/WKCompat.cs b/src/WKWebKit/WKCompat.cs new file mode 100644 index 000000000000..2e21e92d1fa7 --- /dev/null +++ b/src/WKWebKit/WKCompat.cs @@ -0,0 +1,16 @@ +using System; + +using Foundation; + +namespace WebKit { + +#if !XAMCORE_4_0 + public partial class WKWebsiteDataStore { + + [Obsolete ("This constructor does not create a valid instance of the type.")] + public WKWebsiteDataStore () + { + } + } +#endif +} diff --git a/src/WatchKit/WKDefs.cs b/src/WatchKit/WKDefs.cs index 2ca930bfb202..1000091c693b 100644 --- a/src/WatchKit/WKDefs.cs +++ b/src/WatchKit/WKDefs.cs @@ -23,6 +23,7 @@ public enum WKInterfaceMapPinColor : long { [iOS (8,2)] [Unavailable (PlatformName.iOS)] + [Deprecated (PlatformName.WatchOS, 7,0)] [Native] public enum WKMenuItemIcon : long { Accept, @@ -85,7 +86,13 @@ public enum WKHapticType : long { Retry, Start, Stop, - Click + Click, + [Watch (7,0)] + NavigationLeftTurn, + [Watch (7,0)] + NavigationRightTurn, + [Watch (7,0)] + NavigationGenericManeuver, } [NoiOS] diff --git a/src/accessibility.cs b/src/accessibility.cs new file mode 100644 index 000000000000..e277ac4a67f4 --- /dev/null +++ b/src/accessibility.cs @@ -0,0 +1,53 @@ +using System; +using Foundation; +using ObjCRuntime; + +namespace Accessibility { + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Native] + public enum AXCustomContentImportance : ulong + { + Default, + High, + } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AXCustomContent : NSCopying, NSSecureCoding + { + [Static] + [Export ("customContentWithLabel:value:")] + AXCustomContent Create (string label, string value); + + [Static] + [Export ("customContentWithAttributedLabel:attributedValue:")] + AXCustomContent Create (NSAttributedString label, NSAttributedString value); + + [Export ("label")] + string Label { get; } + + [Export ("attributedLabel", ArgumentSemantic.Copy)] + NSAttributedString AttributedLabel { get; } + + [Export ("value")] + string Value { get; } + + [Export ("attributedValue", ArgumentSemantic.Copy)] + NSAttributedString AttributedValue { get; } + + [Export ("importance", ArgumentSemantic.Assign)] + AXCustomContentImportance Importance { get; set; } + } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Protocol] + interface AXCustomContentProvider + { + [Abstract] + [NullAllowed, Export ("accessibilityCustomContent", ArgumentSemantic.Copy)] + AXCustomContent[] AccessibilityCustomContent { get; set; } + } + +} diff --git a/src/accounts.cs b/src/accounts.cs index 24e40dcd13b5..36a4af6cf42e 100644 --- a/src/accounts.cs +++ b/src/accounts.cs @@ -87,6 +87,8 @@ interface ACAccountStore { [Async] void RequestAccess (ACAccountType accountType, ACRequestCompletionHandler completionHandler); + [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacOSX, 11, 0)] [Field ("ACAccountStoreDidChangeNotification")] [Notification] NSString ChangeNotification { get; } diff --git a/src/adsupport.cs b/src/adsupport.cs index f3729eec3d3d..af41a7d543d6 100644 --- a/src/adsupport.cs +++ b/src/adsupport.cs @@ -22,6 +22,9 @@ interface ASIdentifierManager { [Static] ASIdentifierManager SharedManager { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'ATTrackingManager.AppTrackingTransparency' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'ATTrackingManager.AppTrackingTransparency' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'ATTrackingManager.AppTrackingTransparency' instead.")] [Export ("advertisingTrackingEnabled")] bool IsAdvertisingTrackingEnabled { [Bind ("isAdvertisingTrackingEnabled")] get; } diff --git a/src/appclip.cs b/src/appclip.cs new file mode 100644 index 000000000000..1a6b64df639d --- /dev/null +++ b/src/appclip.cs @@ -0,0 +1,29 @@ +using System; +using System.ComponentModel; +using CoreLocation; +using ObjCRuntime; +using Foundation; + +namespace AppClip { + + [iOS (14,0)] + [ErrorDomain ("APActivationPayloadErrorDomain")] + [Native] + public enum APActivationPayloadErrorCode : long { + Disallowed = 1, + DoesNotMatch = 2, + } + + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface APActivationPayload : NSSecureCoding, NSCopying { + + [NullAllowed, Export ("URL", ArgumentSemantic.Strong)] + NSUrl Url { get; } + + [Async] + [Export ("confirmAcquiredInRegion:completionHandler:")] + void ConfirmAcquired (CLRegion region, Action completionHandler); + } +} diff --git a/src/appkit.cs b/src/appkit.cs index 787464f9148f..bcb7765f40bf 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -42,6 +42,7 @@ using OpenGL; using CoreVideo; using CloudKit; +using UniformTypeIdentifiers; using CGGlyph = System.UInt16; @@ -375,8 +376,19 @@ interface NSAppearance : NSSecureCoding { bool AllowsVibrancy { get; } [Static, Export ("currentAppearance")] + [Deprecated (PlatformName.MacOSX, 10, 9, message: "Use 'CurrentDrawingAppearance' instead.")] NSAppearance CurrentAppearance { get; [Bind("setCurrentAppearance:")] set; } + [Mac (11, 0)] + [Static] + [Export ("currentDrawingAppearance", ArgumentSemantic.Strong)] + NSAppearance CurrentDrawingAppearance { get; } + + [Mac (11,0)] + [Export ("performAsCurrentDrawingAppearance:")] + void PerformAsCurrentDrawingAppearance (Action receiver); + + [Static, Export ("appearanceNamed:")] NSAppearance GetAppearance (NSString name); @@ -999,6 +1011,7 @@ interface NSApplicationDelegate { [Export ("application:openURLs:")] void OpenUrls (NSApplication application, NSUrl[] urls); + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Now optional on NSApplicationDelegate.")] [Export ("application:delegateHandlesKey:"), DelegateName ("NSApplicationHandlesKey"), NoDefaultValue] bool HandlesKey (NSApplication sender, string key); } @@ -1531,7 +1544,7 @@ interface NSBox { IntPtr Constructor (CGRect frameRect); [Export ("borderType")] - [Advice ("Only used with deprecated NSBoxOldStyle. Use 'Transparent' property for NSNoBorder.")] + [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Transparent' property for NSNoBorder instead.")] NSBorderType BorderType { get; set; } [Export ("titlePosition")] @@ -2257,6 +2270,11 @@ interface NSButton : NSAccessibilityButton, NSUserInterfaceCompression, NSUserIn [Export ("imageHugsTitle")] bool ImageHugsTitle { get; set; } + [NullAllowed] + [Mac (11,0)] + [Export ("symbolConfiguration", ArgumentSemantic.Copy)] + NSImageSymbolConfiguration SymbolConfiguration { get; set; } + [Export ("imageScaling")] NSImageScale ImageScaling { get; set; } @@ -2267,6 +2285,10 @@ interface NSButton : NSAccessibilityButton, NSUserInterfaceCompression, NSUserIn [Mac (10, 14)] [NullAllowed, Export ("contentTintColor", ArgumentSemantic.Copy)] NSColor ContentTintColor { get; set; } + + [Mac (11, 0)] + [Export ("hasDestructiveAction")] + bool HasDestructiveAction { get; set; } } [BaseType (typeof (NSImageRep))] @@ -3668,12 +3690,12 @@ partial interface NSColor : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea [Static] [Export ("controlShadowColor")] - [Advice ("Use a context specific color, 'SeparatorColor'")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use a context specific color such as 'SeparatorColor'.")] NSColor ControlShadow { get; } [Static] [Export ("controlDarkShadowColor")] - [Advice ("Use a context specific color, 'SeparatorColor'")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use a context specific color such as 'SeparatorColor'.")] NSColor ControlDarkShadow { get; } [Static] @@ -3682,12 +3704,12 @@ partial interface NSColor : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea [Static] [Export ("controlHighlightColor")] - [Advice ("Use a context specific color, 'SeparatorColor'")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use a context specific color such as 'SeparatorColor'.")] NSColor ControlHighlight { get; } [Static] [Export ("controlLightHighlightColor")] - [Advice ("Use a context specific color, 'SeparatorColor'")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use a context specific color such as 'SeparatorColor'.")] NSColor ControlLightHighlight { get; } [Static] @@ -3745,22 +3767,22 @@ partial interface NSColor : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea [Static] [Export ("scrollBarColor")] - [Advice ("Use 'NSScroller' instead")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSScroller' instead.")] NSColor ScrollBar { get; } [Static] [Export ("knobColor")] - [Advice ("Use 'NSScroller' instead")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSScroller' instead.")] NSColor Knob { get; } [Static] [Export ("selectedKnobColor")] - [Advice ("Use 'NSScroller' instead")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSScroller' instead.")] NSColor SelectedKnob { get; } [Static] [Export ("windowFrameColor")] - [Advice ("Use 'NSVisualEffectMaterial.Title' instead")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSVisualEffectMaterial.Title' instead.")] NSColor WindowFrame { get; } [Static] @@ -3769,7 +3791,7 @@ partial interface NSColor : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea [Static] [Export ("selectedMenuItemColor")] - [Advice ("Use 'NSVisualEffectMaterial.Selection' instead")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSVisualEffectMaterial.Title' instead.")] NSColor SelectedMenuItem { get; } [Static] @@ -3786,7 +3808,7 @@ partial interface NSColor : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea [Static] [Export ("headerColor")] - [Advice ("Use 'NSVisualEffectMaterial.HeaderView' instead")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSVisualEffectMaterial.Title' instead.")] NSColor Header { get; } [Static] @@ -4177,6 +4199,7 @@ interface NSColorChanging { [Abstract] [Export ("changeColor:")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSColorChanging' instead.")] void ChangeColor ([NullAllowed] NSColorPanel sender); } @@ -4866,9 +4889,11 @@ interface NSEditorRegistration interface NSObject_NSEditorRegistration { [Export ("objectDidBeginEditing:")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSEditorRegistration' instead.")] void ObjectDidBeginEditing (INSEditor editor); [Export ("objectDidEndEditing:")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSEditorRegistration' instead.")] void ObjectDidEndEditing (INSEditor editor); } @@ -5914,7 +5939,7 @@ interface NSDraggingInfo { [Abstract] #endif [Export ("draggedImage")] - [Advice ("Use 'NSDraggingItem' objects instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSDraggingItem' objects instead.")] NSImage DraggedImage { get; } #if XAMCORE_4_0 @@ -6169,6 +6194,7 @@ interface NSFontChanging [Export ("changeFont:")] void ChangeFont ([NullAllowed] NSFontManager sender); + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Now optional method.")] [Export ("validModesForFontPanel:")] NSFontPanelModeMask GetValidModes (NSFontPanel fontPanel); } @@ -6495,6 +6521,15 @@ partial interface NSFont : NSSecureCoding, NSCopying { [Export ("monospacedSystemFontOfSize:weight:")] [Internal] IntPtr _MonospacedSystemFont (nfloat fontSize, nfloat weight); + + [Mac (11,0)] + [Static] + [Export ("preferredFontForTextStyle:options:")] + NSFont GetPreferredFont (string textStyle, NSDictionary options); + + [Mac (11,0)] + [Export ("fontWithSize:")] + NSFont GetFont (nfloat fontSize); } interface NSFontCollectionChangedEventArgs { @@ -6722,6 +6757,11 @@ interface NSFontDescriptor : NSSecureCoding, NSCopying { [Export ("fontDescriptorWithDesign:")] [return: NullAllowed] NSFontDescriptor Create (NSFontDescriptorSystemDesign design); + + [Mac (11,0)] + [Static] + [Export ("preferredFontDescriptorForTextStyle:options:")] + NSFontDescriptor GetPreferredFont (string textStyle, NSDictionary options); } [BaseType (typeof (NSObject))] @@ -7919,10 +7959,10 @@ interface NSGestureRecognizerDelegate { [BaseType (typeof (NSObject))] [ThreadSafe] // Not documented anywhere, but their Finder extension sample uses it on non-ui thread - partial interface NSMenu : NSCoding, NSCopying, NSAccessibility, NSAccessibilityElement, NSUserInterfaceItemIdentification { + partial interface NSMenu : NSCoding, NSCopying, NSAccessibility, NSAccessibilityElement, NSAppearanceCustomization, NSUserInterfaceItemIdentification { [DesignatedInitializer] [Export ("initWithTitle:")] - IntPtr Constructor (string aTitle); + IntPtr Constructor (string title); [Static] [Export ("popUpContextMenu:withEvent:forView:")] @@ -9002,6 +9042,11 @@ partial interface NSOutlineViewDelegate { [Export ("outlineView:didRemoveRowView:forRow:")] void DidRemoveRowView (NSOutlineView outlineView, NSTableRowView rowView, nint row); + + [Mac (11,0)] + [Export ("outlineView:tintConfigurationForItem:")] + [return: NullAllowed] + NSTintConfiguration GetTintConfiguration (NSOutlineView outlineView, NSObject item); } [BaseType (typeof (NSObject))] @@ -9123,10 +9168,6 @@ partial interface NSImage : NSCopying, NSSecureCoding, NSPasteboardReading, NSPa //[Export ("initByReferencingURL:")] //IntPtr Constructor (NSUrl url); - // FIXME: need IconRec - //[Export ("initWithIconRef:")] - //IntPtr Constructor (IconRef iconRef); - [Sealed, Export ("initWithContentsOfFile:"), Internal] IntPtr InitWithContentsOfFile (string fileName); @@ -9307,6 +9348,17 @@ partial interface NSImage : NSCopying, NSSecureCoding, NSPasteboardReading, NSPa [Export ("layerContentsForContentsScale:")] NSObject GetLayerContentsForContentsScale (nfloat layerContentsScale); + + [Mac (11,0)] + [Static] + [Export ("imageWithSystemSymbolName:accessibilityDescription:")] + [return: NullAllowed] + NSImage GetSystemSymbol (string symbolName, [NullAllowed] string accessibilityDescription); + + [Mac (11,0)] + [Export ("imageWithSymbolConfiguration:")] + [return: NullAllowed] + NSImage GetImage (NSImageSymbolConfiguration configuration); } public enum NSImageName @@ -10116,6 +10168,11 @@ interface NSImageView : NSAccessibilityImage, NSMenuItemValidation { [Mac (10, 14)] [NullAllowed, Export ("contentTintColor", ArgumentSemantic.Copy)] NSColor ContentTintColor { get; set; } + + [NullAllowed] + [Mac (11,0)] + [Export ("symbolConfiguration", ArgumentSemantic.Copy)] + NSImageSymbolConfiguration SymbolConfiguration { get; set; } } [BaseType (typeof (NSControl), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] { typeof (NSMatrixDelegate)})] @@ -10535,6 +10592,18 @@ interface NSLayoutXAxisAnchor [Mac (10,12)] [Export ("anchorWithOffsetToAnchor:")] NSLayoutDimension GetAnchorWithOffset (NSLayoutXAxisAnchor otherAnchor); + + [Mac (11,0)] + [Export ("constraintEqualToSystemSpacingAfterAnchor:multiplier:")] + NSLayoutConstraint ConstraintEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); + + [Mac (11,0)] + [Export ("constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:multiplier:")] + NSLayoutConstraint ConstraintGreaterThanOrEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); + + [Mac (11,0)] + [Export ("constraintLessThanOrEqualToSystemSpacingAfterAnchor:multiplier:")] + NSLayoutConstraint ConstraintLessThanOrEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); } [Mac (10,11)] @@ -10545,6 +10614,18 @@ interface NSLayoutYAxisAnchor [Mac (10,12)] [Export ("anchorWithOffsetToAnchor:")] NSLayoutDimension GetAnchorWithOffset (NSLayoutYAxisAnchor otherAnchor); + + [Mac (11,0)] + [Export ("constraintEqualToSystemSpacingBelowAnchor:multiplier:")] + NSLayoutConstraint ConstraintEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); + + [Mac (11,0)] + [Export ("constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:")] + NSLayoutConstraint ConstraintGreaterThanOrEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); + + [Mac (11,0)] + [Export ("constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:")] + NSLayoutConstraint ConstraintLessThanOrEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); } [Mac (10,11)] @@ -12776,8 +12857,13 @@ interface NSSavePanel { [Export ("directoryURL", ArgumentSemantic.Copy)] NSUrl DirectoryUrl { get; set; } + [Advice ("Use 'AllowedContentTypes' instead.")] [Export ("allowedFileTypes")] string [] AllowedFileTypes { get; set; } + + [Mac (11, 0)] + [Export ("allowedContentTypes", ArgumentSemantic.Copy)] + UTType[] AllowedContentTypes { get; set; } [Export ("allowsOtherFileTypes")] bool AllowsOtherFileTypes { get; set; } @@ -13258,14 +13344,17 @@ interface NSSearchField { bool SendsSearchStringImmediately { get; set; } [Mac (10,11)] + [Advice ("Use 'SearchTextBounds' instead.")] [Export ("rectForSearchTextWhenCentered:")] CGRect GetRectForSearchText (bool isCentered); [Mac (10,11)] + [Advice ("Use 'SearchButtonBounds' instead.")] [Export ("rectForSearchButtonWhenCentered:")] CGRect GetRectForSearchButton (bool isCentered); [Mac (10,11)] + [Advice ("Use 'CancelButtonBounds' instead.")] [Export ("rectForCancelButtonWhenCentered:")] CGRect GetRectForCancelButton (bool isCentered); @@ -13278,8 +13367,21 @@ interface NSSearchField { NSObject WeakDelegate { get; set; } [Mac (10,11)] + [Advice ("No longer availabile, now a no-op.")] [Export ("centersPlaceholder")] bool CentersPlaceholder { get; set; } + + [Mac (11, 0)] + [Export ("searchTextBounds")] + CGRect SearchTextBounds { get; } + + [Mac (11, 0)] + [Export ("searchButtonBounds")] + CGRect SearchButtonBounds { get; } + + [Mac (11, 0)] + [Export ("cancelButtonBounds")] + CGRect CancelButtonBounds { get; } } [BaseType (typeof (NSObject))] @@ -14411,6 +14513,14 @@ interface NSSplitViewItem : NSAnimatablePropertyContainer, NSCoding { [Mac (10,11)] [Field ("NSSplitViewItemUnspecifiedDimension")] nfloat UnspecifiedDimension { get; } + + [Mac (11, 0)] + [Export ("allowsFullHeightLayout")] + bool AllowsFullHeightLayout { get; set; } + + [Mac (11, 0)] + [Export ("titlebarSeparatorStyle", ArgumentSemantic.Assign)] + NSTitlebarSeparatorStyle TitlebarSeparatorStyle { get; set; } } [BaseType (typeof (NSObject))] @@ -14759,6 +14869,10 @@ interface NSStringAttributeKey { [Field ("NSKernAttributeName")] NSString KerningAdjustment { get; } + [Mac (11,0)] + [Field ("NSTrackingAttributeName")] + NSString Tracking { get; } + [Field ("NSLinkAttributeName")] NSString Link { get; } @@ -16057,6 +16171,26 @@ partial interface NSView : NSDraggingDestination, NSAnimatablePropertyContainer, [Mac (10, 15)] [Export ("verticalContentSizeConstraintActive")] bool VerticalContentSizeConstraintActive { [Bind ("isVerticalContentSizeConstraintActive")] get; set; } + + [Mac (11, 0)] + [Export ("safeAreaInsets")] + NSEdgeInsets SafeAreaInsets { get; } + + [Mac (11, 0)] + [Export ("additionalSafeAreaInsets", ArgumentSemantic.Assign)] + NSEdgeInsets AdditionalSafeAreaInsets { get; set; } + + [Mac (11, 0)] + [Export ("safeAreaLayoutGuide", ArgumentSemantic.Strong)] + NSLayoutGuide SafeAreaLayoutGuide { get; } + + [Mac (11, 0)] + [Export ("safeAreaRect")] + CGRect SafeAreaRect { get; } + + [Mac (11, 0)] + [Export ("layoutMarginsGuide", ArgumentSemantic.Strong)] + NSLayoutGuide LayoutMarginsGuide { get; } } [BaseType (typeof (NSAnimation))] @@ -16902,6 +17036,14 @@ partial interface NSTableView : NSDraggingSource, NSAccessibilityTable { [Mac (10, 13)] [Export ("usesAutomaticRowHeights")] bool UsesAutomaticRowHeights { get; set; } + + [Mac (11, 0)] + [Export ("style", ArgumentSemantic.Assign)] + NSTableViewStyle Style { get; set; } + + [Mac (11, 0)] + [Export ("effectiveStyle")] + NSTableViewStyle EffectiveStyle { get; } } [BaseType (typeof (NSObject))] @@ -17821,7 +17963,7 @@ interface NSTextBlock : NSCoding, NSCopying, NSSecureCoding { } [BaseType (typeof (NSControl), Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NSTextFieldDelegate)})] - partial interface NSTextField : NSAccessibilityNavigableStaticText, NSUserInterfaceValidations { + partial interface NSTextField : NSAccessibilityNavigableStaticText, NSUserInterfaceValidations, NSTextContent { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frameRect); @@ -17903,6 +18045,10 @@ partial interface NSTextField : NSAccessibilityNavigableStaticText, NSUserInterf [Export ("allowsDefaultTighteningForTruncation")] bool AllowsDefaultTighteningForTruncation { get; set; } + [Mac (10,15)] + [Export ("lineBreakStrategy", ArgumentSemantic.Assign)] + NSLineBreakStrategy LineBreakStrategy { get; set; } + [Mac (10,12)] [Static] [Export ("labelWithString:")] @@ -17922,6 +18068,14 @@ partial interface NSTextField : NSAccessibilityNavigableStaticText, NSUserInterf [Static] [Export ("textFieldWithString:")] NSTextField CreateTextField ([NullAllowed] string stringValue); + + [Mac (11, 0)] + NSTextContentType ContentType { + [Wrap ("NSTextContentTypeExtensions.GetValue (GetContentType ()!)")] + get; + [Wrap ("SetContentType (value.GetConstant()!)")] + set; + } } [Mac (10, 12, 1)] @@ -18553,7 +18707,7 @@ interface NSTextInput } [BaseType (typeof (NSText), Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NSTextViewDelegate)})] - partial interface NSTextView : NSTextInputClient, NSTextLayoutOrientationProvider, NSDraggingSource, NSTextFinderClient, NSAccessibilityNavigableStaticText, NSCandidateListTouchBarItemDelegate, NSTouchBarDelegate, NSMenuItemValidation, NSUserInterfaceValidations, NSTextInput + partial interface NSTextView : NSTextInputClient, NSTextLayoutOrientationProvider, NSDraggingSource, NSTextFinderClient, NSAccessibilityNavigableStaticText, NSCandidateListTouchBarItemDelegate, NSTouchBarDelegate, NSMenuItemValidation, NSUserInterfaceValidations, NSTextInput, NSTextContent #if XAMCORE_4_0 , NSColorChanging, // ChangeColor has the wrong param type #endif @@ -19099,6 +19253,14 @@ partial interface NSTextView : NSTextInputClient, NSTextLayoutOrientationProvide [Static] [Export ("scrollablePlainDocumentContentTextView")] NSScrollView CreateScrollablePlainDocumentContentTextView (); + + [Mac (11, 0)] + NSTextContentType ContentType { + [Wrap ("NSTextContentTypeExtensions.GetValue (GetContentType ()!)")] + get; + [Wrap ("SetContentType (value.GetConstant()!)")] + set; + } } [BaseType (typeof (NSObject))] @@ -19384,6 +19546,7 @@ partial interface NSToolbar { bool AutosavesConfiguration { get; set; } [Field ("NSToolbarSeparatorItemIdentifier")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Ignored by system.")] NSString NSToolbarSeparatorItemIdentifier { get; } [Field ("NSToolbarSpaceItemIdentifier")] @@ -19399,6 +19562,7 @@ partial interface NSToolbar { NSString NSToolbarShowFontsItemIdentifier { get; } [Field ("NSToolbarCustomizeToolbarItemIdentifier")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Ignored by system.")] NSString NSToolbarCustomizeToolbarItemIdentifier { get; } [Field ("NSToolbarPrintItemIdentifier")] @@ -19419,6 +19583,10 @@ partial interface NSToolbar { [Mac (10, 14)] [NullAllowed, Export ("centeredItemIdentifier")] string CenteredItemIdentifier { get; set; } + + [Mac (11, 0)] + [Field ("NSToolbarSidebarTrackingSeparatorItemIdentifier")] + NSString NSToolbarSidebarTrackingSeparatorItemIdentifier { get; } } [BaseType (typeof (NSObject))] @@ -19515,9 +19683,11 @@ interface NSToolbarItem : NSCopying, NSMenuItemValidation, NSValidatedUserInterf NSView View { get; set; } [Export ("minSize")] + [Advice ("Use system constraints instead.")] CGSize MinSize { get; set; } [Export ("maxSize")] + [Advice ("Use system constraints instead.")] CGSize MaxSize { get; set; } [Export ("visibilityPriority")] @@ -19533,6 +19703,10 @@ interface NSToolbarItem : NSCopying, NSMenuItemValidation, NSValidatedUserInterf [Mac (10, 15)] [Export ("bordered")] bool Bordered { [Bind ("isBordered")] get; set; } + + [Mac (11, 0), iOS (14, 0)] + [Export ("navigational")] + bool Navigational { [Bind ("isNavigational")] get; set; } } [BaseType (typeof (NSToolbarItem))] @@ -20793,6 +20967,18 @@ partial interface NSWindow : NSAnimatablePropertyContainer, NSUserInterfaceItemI [Mac (10, 14)] [Export ("appearanceSource", ArgumentSemantic.Weak)] INSAppearanceCustomization AppearanceSource { get; set; } + + [Mac (11, 0)] + [Export ("subtitle")] + string Subtitle { get; set; } + + [Mac (11, 0)] + [Export ("toolbarStyle", ArgumentSemantic.Assign)] + NSWindowToolbarStyle ToolbarStyle { get; set; } + + [Mac (11, 0)] + [Export ("titlebarSeparatorStyle", ArgumentSemantic.Assign)] + NSTitlebarSeparatorStyle TitlebarSeparatorStyle { get; set; } } [Mac (10,10)] @@ -20822,6 +21008,10 @@ interface NSTitlebarAccessoryViewController : NSAnimationDelegate, NSAnimatableP [Mac (10,12)] [Export ("hidden")] bool IsHidden { [Bind ("isHidden")] get; set; } + + [Mac (11,0)] + [Export ("automaticallyAdjustsSize")] + bool AutomaticallyAdjustsSize { get; set; } } [Mac (10,10)] @@ -21188,6 +21378,7 @@ interface NSWorkspace : NSWorkspaceAccessibilityExtensions { void NoteFileSystemChanged (string path); [Export ("getInfoForFile:application:type:"), ThreadSafe] + [Advice ("Use 'NSWorkspace.UrlForApplication' or 'NSUrl.GetResourceValue' instead.")] bool GetInfo (string fullPath, out string appName, out string fileType); [Export ("isFilePackageAtPath:"), ThreadSafe] @@ -21272,17 +21463,22 @@ interface NSWorkspace : NSWorkspaceAccessibilityExtensions { NSDictionary ActiveApplication { get; } [Export ("typeOfFile:error:"), ThreadSafe] + [Advice ("Use 'NSUrl.GetResourceValue' instead.")] string TypeOfFile (string absoluteFilePath, out NSError outError); + [Advice ("Use 'UTType.LocalizedDescription' instead.")] [Export ("localizedDescriptionForType:"), ThreadSafe] string LocalizedDescription (string typeName); + [Advice ("Use 'UTType.PreferredFilenameExtension' instead.")] [Export ("preferredFilenameExtensionForType:"), ThreadSafe] string PreferredFilenameExtension (string typeName); + [Advice ("Compare against 'UTType.GetTypes' instead.")] [Export ("filenameExtension:isValidForType:"), ThreadSafe] bool IsFilenameExtensionValid (string filenameExtension, string typeName); + [Advice ("Use 'UTType.ConformsToType' instead.")] [Export ("type:conformsToType:"), ThreadSafe] bool TypeConformsTo (string firstTypeName, string secondTypeName); @@ -21458,6 +21654,10 @@ interface NSWorkspace : NSWorkspaceAccessibilityExtensions { [Async] [Export ("openURLs:withApplicationAtURL:configuration:completionHandler:")] void OpenUrls (NSUrl[] urls, NSUrl applicationUrl, NSWorkspaceOpenConfiguration configuration, [NullAllowed] Action completionHandler); + + [Mac (11,0)] + [Export ("iconForContentType:")] + NSImage GetIcon (UTType contentType); } [Mac (10,14)] @@ -27496,6 +27696,43 @@ public enum NSFontDescriptorSystemDesign Rounded, } + [Mac (11, 0)] + public enum NSFontTextStyle + { + [Field ("NSFontTextStyleLargeTitle")] + LargeTitle, + + [Field ("NSFontTextStyleTitle1")] + Title1, + + [Field ("NSFontTextStyleTitle2")] + Title2, + + [Field ("NSFontTextStyleTitle3")] + Title3, + + [Field ("NSFontTextStyleHeadline")] + Headline, + + [Field ("NSFontTextStyleSubheadline")] + Subheadline, + + [Field ("NSFontTextStyleBody")] + Body, + + [Field ("NSFontTextStyleCallout")] + Callout, + + [Field ("NSFontTextStyleFootnote")] + Footnote, + + [Field ("NSFontTextStyleCaption1")] + Caption1, + + [Field ("NSFontTextStyleCaption2")] + Caption2, + } + [Mac (10,15), iOS (10,13)] [BaseType (typeof (NSToolbarItem))] interface NSSharingServicePickerToolbarItem @@ -27519,4 +27756,179 @@ interface NSSharingServicePickerToolbarItemDelegate [Export ("itemsForSharingServicePickerToolbarItem:")] NSObject[] GetItems (NSSharingServicePickerToolbarItem pickerToolbarItem); } + + [Unavailable (PlatformName.MacCatalyst)] + [Mac (11,0)] + [BaseType (typeof(NSToolbarItem))] + [DisableDefaultCtor] + interface NSSearchToolbarItem + { + [DesignatedInitializer] + [Export ("initWithItemIdentifier:")] + IntPtr Constructor (string itemIdentifier); + + [Export ("searchField", ArgumentSemantic.Strong)] + NSSearchField SearchField { get; set; } + + [Export ("resignsFirstResponderWithCancel")] + bool ResignsFirstResponderWithCancel { get; set; } + + [Export ("preferredWidthForSearchField")] + nfloat PreferredWidthForSearchField { get; set; } + + [Export ("beginSearchInteraction")] + void BeginSearchInteraction (); + + [Export ("endSearchInteraction")] + void EndSearchInteraction (); + } + + delegate NSView NSTableViewDiffableDataSourceCellProvider (NSTableView tableView, NSTableColumn column, nint row, NSObject itemId); + delegate NSTableRowView NSTableViewDiffableDataSourceRowProvider (NSTableView tableView, nint row, NSObject identifier); + delegate NSView NSTableViewDiffableDataSourceSectionHeaderViewProvider (NSTableView tableView, nint row, NSObject sectionId); + + [Mac (11,0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface NSTableViewDiffableDataSource : NSTableViewDataSource + where SectionIdentifierType : NSObject + where ItemIdentifierType : NSObject { + [Export ("initWithTableView:cellProvider:")] + IntPtr Constructor (NSTableView tableView, NSTableViewDiffableDataSourceCellProvider cellProvider); + + [Export ("snapshot")] + NSDiffableDataSourceSnapshot Snapshot (); + + [Export ("applySnapshot:animatingDifferences:")] + void ApplySnapshot (NSDiffableDataSourceSnapshot snapshot, bool animatingDifferences); + + [Export ("applySnapshot:animatingDifferences:completion:")] + [Async] + void ApplySnapshot (NSDiffableDataSourceSnapshot snapshot, bool animatingDifferences, [NullAllowed] Action completion); + + [Export ("itemIdentifierForRow:")] + [return: NullAllowed] + ItemIdentifierType GetItemIdentifier (nint row); + + [Export ("rowForItemIdentifier:")] + nint GetRowForItemIdentifier (ItemIdentifierType itemIdentifier); + + [Export ("sectionIdentifierForRow:")] + [return: NullAllowed] + SectionIdentifierType GetSectionIdentifier (nint row); + + [Export ("rowForSectionIdentifier:")] + nint GetRowForSectionIdentifier (SectionIdentifierType sectionIdentifier); + + [NullAllowed, Export ("rowViewProvider", ArgumentSemantic.Copy)] + NSTableViewDiffableDataSourceRowProvider RowViewProvider { get; set; } + + [NullAllowed, Export ("sectionHeaderViewProvider", ArgumentSemantic.Copy)] + NSTableViewDiffableDataSourceSectionHeaderViewProvider SectionHeaderViewProvider { get; set; } + + [Export ("defaultRowAnimation", ArgumentSemantic.Assign)] + NSTableViewAnimationOptions DefaultRowAnimation { get; set; } + } + + [Mac (11, 0)] + [Protocol] + interface NSTextContent + { + [Abstract] + [Export ("contentType")] + NSString GetContentType (); + + [Abstract] + [Export ("setContentType:")] + void SetContentType (NSString contentType); + } + + [Mac (11, 0)] + enum NSTextContentType { + [Field ("NSTextContentTypeUsername")] + Username, + + [Field ("NSTextContentTypePassword")] + Password, + + [Field ("NSTextContentTypeOneTimeCode")] + OneTimeCode, + } + + [Mac (11,0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface NSTintConfiguration : NSCopying, NSSecureCoding + { + [Static] + [Export ("defaultTintConfiguration", ArgumentSemantic.Strong)] + NSTintConfiguration DefaultTintConfiguration { get; } + + [Static] + [Export ("monochromeTintConfiguration", ArgumentSemantic.Strong)] + NSTintConfiguration MonochromeTintConfiguration { get; } + + [Static] + [Export ("tintConfigurationWithPreferredColor:")] + NSTintConfiguration CreateWithPreferredColor (NSColor color); + + [Static] + [Export ("tintConfigurationWithFixedColor:")] + NSTintConfiguration CreateWithFixedColor (NSColor color); + + [NullAllowed, Export ("baseTintColor", ArgumentSemantic.Strong)] + NSColor BaseTintColor { get; } + + [NullAllowed, Export ("equivalentContentTintColor", ArgumentSemantic.Strong)] + NSColor EquivalentContentTintColor { get; } + + [Export ("adaptsToUserAccentColor")] + bool AdaptsToUserAccentColor { get; } + } + + [Mac (11,0)] + [BaseType (typeof(NSToolbarItem))] + [DisableDefaultCtor] + interface NSTrackingSeparatorToolbarItem + { + [DesignatedInitializer] + [Export ("initWithItemIdentifier:")] + IntPtr Constructor (string itemIdentifier); + + [Static] + [Export ("trackingSeparatorToolbarItemWithIdentifier:splitView:dividerIndex:")] + NSTrackingSeparatorToolbarItem GetTrackingSeparatorToolbar (string identifier, NSSplitView splitView, nint dividerIndex); + + [Export ("splitView", ArgumentSemantic.Strong)] + NSSplitView SplitView { get; set; } + + [Export ("dividerIndex")] + nint DividerIndex { get; set; } + } + + [Mac (11,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface NSImageSymbolConfiguration : NSCopying + { + [Static] + [Export ("configurationWithPointSize:weight:scale:")] + NSImageSymbolConfiguration Create (nfloat pointSize, double weight, NSImageSymbolScale scale); + + [Static] + [Export ("configurationWithPointSize:weight:")] + NSImageSymbolConfiguration Create (nfloat pointSize, double weight); + + [Static] + [Export ("configurationWithTextStyle:scale:")] + NSImageSymbolConfiguration Create (string style, NSImageSymbolScale scale); + + [Static] + [Export ("configurationWithTextStyle:")] + NSImageSymbolConfiguration Create (string style); + + [Static] + [Export ("configurationWithScale:")] + NSImageSymbolConfiguration Create (NSImageSymbolScale scale); + } } diff --git a/src/apptrackingtransparency.cs b/src/apptrackingtransparency.cs new file mode 100644 index 000000000000..de70cfc81240 --- /dev/null +++ b/src/apptrackingtransparency.cs @@ -0,0 +1,36 @@ +// +// AppTrackingTransparency.cs +// +// Authors: +// Dorothy Tam (dottam@gmail.com) +// + +using System; +using Foundation; +using ObjCRuntime; + +namespace AppTrackingTransparency { + + [iOS (14, 0), TV (14, 0), Mac (11, 0), NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Native] + public enum ATTrackingManagerAuthorizationStatus : ulong { + NotDetermined = 0, + Restricted = 1, + Denied = 2, + Authorized = 3, + } + + [iOS (14, 0), TV (14, 0), Mac (11, 0), NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface ATTrackingManager { + [Static, Export ("requestTrackingAuthorizationWithCompletionHandler:")] + [Async] + void RequestTrackingAuthorization (Action completion); + + [Static, Export ("trackingAuthorizationStatus", ArgumentSemantic.Assign)] + ATTrackingManagerAuthorizationStatus TrackingAuthorizationStatus { get; } + } +} diff --git a/src/arkit.cs b/src/arkit.cs index cb67cb7060c2..9b0dc8526f98 100644 --- a/src/arkit.cs +++ b/src/arkit.cs @@ -13,6 +13,7 @@ using CoreFoundation; using CoreGraphics; using CoreMedia; +using CoreLocation; using CoreVideo; using Foundation; using ObjCRuntime; @@ -194,6 +195,8 @@ public enum ARFrameSemantics : long { PersonSegmentation = 1 << 0, PersonSegmentationWithDepth = (1 << 1) | (1 << 0), BodyDetection = 1 << 2, + [iOS (14,0)] + SceneDepth = (1 << 4), } [iOS (13,0)] @@ -232,6 +235,56 @@ public enum ARCollaborationDataPriority : long { Optional, } + + [iOS (14, 0)] + [Native] + public enum ARAltitudeSource : long { + Unknown, + Coarse, + Precise, + UserDefined, + } + + [iOS (14, 0)] + [Native] + public enum ARConfidenceLevel : long { + Low, + Medium, + High, + } + + [iOS (14, 0)] + [Native] + public enum ARGeoTrackingAccuracy : long { + Undetermined, + Low, + Medium, + High, + } + + [iOS (14, 0)] + [Native] + public enum ARGeoTrackingState : long { + NotAvailable, + Initializing, + Localizing, + Localized, + } + + [iOS (14, 0)] + [Native] + public enum ARGeoTrackingStateReason : long { + None, + NotAvailableAtLocation, + NeedLocationPermissions, + WorldTrackingUnstable, + WaitingForLocation, + WaitingForAvailabilityCheck, + GeoDataNotLoaded, + DevicePointedTooLow, + VisualLocalizationFailed, + } + [iOS (12,0)] [NoWatch, NoTV, NoMac] [Protocol] @@ -404,6 +457,7 @@ interface ARFrame : NSCopying { [NullAllowed, Export ("detectedBody")] ARBody2D DetectedBody { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'ARSession.Raycast' instead.")] [Export ("hitTest:types:")] ARHitTestResult[] HitTest (CGPoint point, ARHitTestResultType types); @@ -413,9 +467,23 @@ interface ARFrame : NSCopying { [Export ("displayTransformForOrientation:viewportSize:")] CGAffineTransform GetDisplayTransform (UIInterfaceOrientation orientation, CGSize viewportSize); + + [iOS (14, 0)] + [NullAllowed, Export ("geoTrackingStatus", ArgumentSemantic.Strong)] + ARGeoTrackingStatus GeoTrackingStatus { get; } + + [iOS (14, 0)] + [NullAllowed, Export ("sceneDepth", ArgumentSemantic.Strong)] + ARDepthData SceneDepth { get; } + + [iOS (14, 0)] + [NullAllowed] + [Export ("smoothedSceneDepth", ArgumentSemantic.Strong)] + ARDepthData SmoothedSceneDepth { get; } } [iOS (11,0)] + [Deprecated (PlatformName.iOS, 14, 0, message: "Use Raycasting methods over HitTestResult ones.")] [NoWatch, NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -648,6 +716,7 @@ interface ARSCNView : ARSessionProviding { SCNNode GetNode (ARAnchor anchor); [Export ("hitTest:types:")] + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CreateRaycastQuery' instead.")] ARHitTestResult[] HitTest (CGPoint point, ARHitTestResultType types); [iOS (12,0)] @@ -706,6 +775,7 @@ interface ARSKView : ARSessionProviding { [return: NullAllowed] SKNode GetNode (ARAnchor anchor); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use Raycasting methods instead.")] [Export ("hitTest:types:")] ARHitTestResult[] HitTest (CGPoint point, ARHitTestResultType types); } @@ -735,6 +805,8 @@ interface ARSKViewDelegate : SKViewDelegate, ARSessionObserver { void DidRemoveNode (ARSKView view, SKNode node, ARAnchor anchor); } + delegate void GetGeolocationCallback (CLLocationCoordinate2D coordinate, double altitude, NSError error); + [iOS (11,0)] [NoWatch, NoTV, NoMac] [BaseType (typeof (NSObject))] @@ -800,6 +872,12 @@ interface ARSession { [iOS (13,0)] [Export ("updateWithCollaborationData:")] void Update (ARCollaborationData collaborationData); + + [iOS (14, 0)] + [Async (ResultTypeName="GeoLocationForPoint")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [Export ("getGeoLocationForPoint:completionHandler:")] + void GetGeoLocation (Vector3 position, GetGeolocationCallback completionHandler); } [iOS (11,0)] @@ -829,6 +907,10 @@ interface ARSessionObserver { [iOS (13,0)] [Export ("session:didOutputCollaborationData:")] void DidOutputCollaborationData (ARSession session, ARCollaborationData data); + + [iOS (14, 0)] + [Export ("session:didChangeGeoTrackingStatus:")] + void DidChangeGeoTrackingStatus (ARSession session, ARGeoTrackingStatus geoTrackingStatus); } interface IARSessionDelegate {} @@ -965,6 +1047,11 @@ interface ARWorldTrackingConfiguration { [iOS (13,4)] [Export ("sceneReconstruction", ArgumentSemantic.Assign)] ARSceneReconstruction SceneReconstruction { get; set; } + + [iOS (13,0)] + [Static] + [Export ("supportsFrameSemantics:")] + bool SupportsFrameSemantics (ARFrameSemantics frameSemantics); } [iOS (11,0)] @@ -980,6 +1067,11 @@ interface AROrientationTrackingConfiguration { [iOS (11,3)] [Export ("autoFocusEnabled")] bool AutoFocusEnabled { [Bind ("isAutoFocusEnabled")] get; set; } + + [iOS (13,0)] + [Static] + [Export ("supportsFrameSemantics:")] + bool SupportsFrameSemantics (ARFrameSemantics frameSemantics); } [iOS (11,0)] @@ -1029,6 +1121,11 @@ interface ARFaceTrackingConfiguration { [iOS (13,0)] [Export ("worldTrackingEnabled")] bool WorldTrackingEnabled { [Bind ("isWorldTrackingEnabled")] get; set; } + + [iOS (13,0)] + [Static] + [Export ("supportsFrameSemantics:")] + bool SupportsFrameSemantics (ARFrameSemantics frameSemantics); } [iOS (11,0)] @@ -1475,6 +1572,11 @@ interface ARImageTrackingConfiguration { [Export ("maximumNumberOfTrackedImages")] nint MaximumNumberOfTrackedImages { get; set; } + + [iOS (13,0)] + [Static] + [Export ("supportsFrameSemantics:")] + bool SupportsFrameSemantics (ARFrameSemantics frameSemantics); } [iOS (12,0)] @@ -1490,6 +1592,11 @@ interface ARObjectScanningConfiguration { [Export ("planeDetection", ArgumentSemantic.Assign)] ARPlaneDetection PlaneDetection { get; set; } + + [iOS (13,0)] + [Static] + [Export ("supportsFrameSemantics:")] + bool SupportsFrameSemantics (ARFrameSemantics frameSemantics); } [iOS (12,0)] @@ -1738,6 +1845,10 @@ interface ARBodyTrackingConfiguration { [Export ("maximumNumberOfTrackedImages")] nint MaximumNumberOfTrackedImages { get; set; } + + [Static] + [Export ("supportsFrameSemantics:")] + bool SupportsFrameSemantics (ARFrameSemantics frameSemantics); } [iOS (13,0)] @@ -1754,6 +1865,10 @@ interface ARPositionalTrackingConfiguration { [NullAllowed, Export ("initialWorldMap", ArgumentSemantic.Strong)] ARWorldMap InitialWorldMap { get; set; } + + [Static] + [Export ("supportsFrameSemantics:")] + bool SupportsFrameSemantics (ARFrameSemantics frameSemantics); } [iOS (13,0)] @@ -1876,13 +1991,21 @@ interface ARSkeleton3D { [Protected, Export ("jointLocalTransforms")] IntPtr RawJointLocalTransforms { get; } + [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("modelTransformForJointName:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Matrix4 GetModelTransform ([BindAs (typeof (ARSkeletonJointName))] NSString jointName); + Matrix4 GetModelTransform (NSString jointName); + [Wrap ("GetModelTransform (jointName.GetConstant()!)", IsVirtual = true)] + Matrix4 GetModelTransform (ARSkeletonJointName jointName); + + [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("localTransformForJointName:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Matrix4 GetLocalTransform ([BindAs (typeof (ARSkeletonJointName))] NSString jointName); + Matrix4 GetLocalTransform (NSString jointName); + + [Wrap ("GetLocalTransform (jointName.GetConstant()!)", IsVirtual = true)] + Matrix4 GetLocalTransform (ARSkeletonJointName jointName); } [iOS (13,0)] @@ -1894,9 +2017,13 @@ interface ARSkeleton2D { [Protected, Export ("jointLandmarks")] IntPtr RawJointLandmarks { get; } + [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("landmarkForJointNamed:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Vector2 GetLandmarkPoint ([BindAs (typeof (ARSkeletonJointName))] NSString jointName); + Vector2 GetLandmarkPoint (NSString jointName); + + [Wrap ("GetLandmarkPoint (jointName.GetConstant()!)", IsVirtual = true)] + Vector2 GetLandmarkPoint (ARSkeletonJointName jointName); } [iOS (13,0)] @@ -1924,8 +2051,12 @@ interface ARSkeletonDefinition { [NullAllowed, Export ("neutralBodySkeleton3D")] ARSkeleton3D NeutralBodySkeleton3D { get; } + [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("indexForJointName:")] - nuint GetJointIndex ([BindAs (typeof (ARSkeletonJointName))] NSString jointName); + nuint GetJointIndex (NSString jointName); + + [Wrap ("GetJointIndex (jointName.GetConstant()!)")] + nuint GetJointIndex (ARSkeletonJointName jointName); } [iOS (13,0)] @@ -2086,4 +2217,108 @@ interface ARMeshGeometry : NSSecureCoding { [NullAllowed] ARGeometrySource Classification { get; } } + + [iOS (14, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface ARDepthData { + [Export ("depthMap", ArgumentSemantic.Assign)] + CVPixelBuffer DepthMap { get; } + + [NullAllowed, Export ("confidenceMap", ArgumentSemantic.Assign)] + CVPixelBuffer ConfidenceMap { get; } + } + + [iOS (14, 0)] + [BaseType (typeof (ARAnchor))] + interface ARGeoAnchor : ARTrackable { + // Inlined from 'ARAnchorCopying' protocol (we can't have constructors in interfaces) + [iOS (14,0)] + [Export ("initWithAnchor:")] + IntPtr Constructor (ARAnchor anchor); + + [Export ("coordinate")] + CLLocationCoordinate2D Coordinate { get; } + + [Export ("altitude")] + double Altitude { get; } + + [Export ("altitudeSource", ArgumentSemantic.Assign)] + ARAltitudeSource AltitudeSource { get; } + + [Export ("initWithCoordinate:")] + IntPtr Constructor (CLLocationCoordinate2D coordinate); + + [Export ("initWithCoordinate:altitude:")] + IntPtr Constructor (CLLocationCoordinate2D coordinate, double altitude); + + [Export ("initWithName:coordinate:")] + IntPtr Constructor (string name, CLLocationCoordinate2D coordinate); + + [Export ("initWithName:coordinate:altitude:")] + IntPtr Constructor (string name, CLLocationCoordinate2D coordinate, double altitude); + } + + [iOS (14, 0)] + [BaseType (typeof (ARConfiguration))] + interface ARGeoTrackingConfiguration { + [Static] + [Export ("supportedVideoFormats")] + ARVideoFormat[] GetSupportedVideoFormats (); + + [Export ("environmentTexturing", ArgumentSemantic.Assign)] + AREnvironmentTexturing EnvironmentTexturing { get; set; } + + [Export ("wantsHDREnvironmentTextures")] + bool WantsHdrEnvironmentTextures { get; set; } + + [Export ("planeDetection", ArgumentSemantic.Assign)] + ARPlaneDetection PlaneDetection { get; set; } + + [NullAllowed, Export ("detectionImages", ArgumentSemantic.Copy)] + NSSet DetectionImages { get; set; } + + [Export ("automaticImageScaleEstimationEnabled")] + bool AutomaticImageScaleEstimationEnabled { get; set; } + + [Export ("maximumNumberOfTrackedImages")] + nint MaximumNumberOfTrackedImages { get; set; } + + [Export ("detectionObjects", ArgumentSemantic.Copy)] + NSSet DetectionObjects { get; set; } + + [Async] + [Static] + [Export ("checkAvailabilityWithCompletionHandler:")] + void CheckAvailability (Action completionHandler); + + [Async] + [Static] + [Export ("checkAvailabilityAtCoordinate:completionHandler:")] + void CheckAvailability (CLLocationCoordinate2D coordinate, Action completionHandler); + + [Static] + [Export ("new")] + [return: Release] + ARGeoTrackingConfiguration Create (); + + [Static] + [Export ("supportsFrameSemantics:")] + bool SupportsFrameSemantics (ARFrameSemantics frameSemantics); + } + + [iOS (14, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface ARGeoTrackingStatus : NSCopying, NSSecureCoding { + [Export ("state")] + ARGeoTrackingState State { get; } + + [Export ("accuracy")] + ARGeoTrackingAccuracy Accuracy { get; } + + [Export ("stateReason")] + ARGeoTrackingStateReason StateReason { get; } + } + } diff --git a/src/authenticationservices.cs b/src/authenticationservices.cs index a22580344bdc..fd0e7305993a 100644 --- a/src/authenticationservices.cs +++ b/src/authenticationservices.cs @@ -23,9 +23,10 @@ namespace AuthenticationServices { - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] - [NoMac][NoTV][NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoTV][NoWatch] [iOS (12,0)] + [Mac (11,0)] [Native] [ErrorDomain ("ASCredentialIdentityStoreErrorDomain")] public enum ASCredentialIdentityStoreErrorCode : long { @@ -34,9 +35,10 @@ public enum ASCredentialIdentityStoreErrorCode : long { StoreBusy = 2, } - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] - [NoMac][NoTV][NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoTV][NoWatch] [iOS (12,0)] + [Mac (11,0)] [Native] [ErrorDomain ("ASExtensionErrorDomain")] public enum ASExtensionErrorCode : long { @@ -46,9 +48,18 @@ public enum ASExtensionErrorCode : long { CredentialIdentityNotFound = 101, } - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] - [NoMac][NoTV][NoWatch] + [Partial] + interface ASExtensionErrorCodeExtensions { + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Field ("ASExtensionLocalizedFailureReasonErrorKey")] + NSString LocalizedFailureReasonErrorKey { get; } + } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoTV][NoWatch] [iOS (12,0)] + [Mac (11,0)] [Native] public enum ASCredentialServiceIdentifierType : long { Domain, @@ -59,6 +70,7 @@ public enum ASCredentialServiceIdentifierType : long { [Watch (6,2)] [Mac (10,15)] [iOS (12,0)] + [Introduced (PlatformName.MacCatalyst, 13, 0)] [Native] [ErrorDomain ("ASWebAuthenticationSessionErrorDomain")] public enum ASWebAuthenticationSessionErrorCode : long { @@ -69,9 +81,10 @@ public enum ASWebAuthenticationSessionErrorCode : long { delegate void ASCredentialIdentityStoreCompletionHandler (bool success, NSError error); - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] - [NoMac][NoTV][NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoTV][NoWatch] [iOS (12,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASCredentialIdentityStore { @@ -100,9 +113,10 @@ interface ASCredentialIdentityStore { void ReplaceCredentialIdentities (ASPasswordCredentialIdentity[] newCredentialIdentities, [NullAllowed] ASCredentialIdentityStoreCompletionHandler completion); } - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] - [NoMac][NoTV][NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoTV][NoWatch] [iOS (12,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASCredentialIdentityStoreState { @@ -115,9 +129,10 @@ interface ASCredentialIdentityStoreState { delegate void ASCredentialProviderExtensionRequestCompletionHandler (bool expired); - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] - [NoMac][NoTV][NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoTV][NoWatch] [iOS (12,0)] + [Mac (11,0)] [BaseType (typeof (NSExtensionContext))] [DisableDefaultCtor] interface ASCredentialProviderExtensionContext { @@ -131,9 +146,10 @@ interface ASCredentialProviderExtensionContext { void CancelRequest (NSError error); } - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] - [NoMac][NoTV][NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoTV][NoWatch] [iOS (12,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASCredentialServiceIdentifier : NSCopying, NSSecureCoding { @@ -147,9 +163,10 @@ interface ASCredentialServiceIdentifier : NSCopying, NSSecureCoding { ASCredentialServiceIdentifierType Type { get; } } - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] - [NoMac][NoTV][NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoTV][NoWatch] [iOS (12,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASPasswordCredentialIdentity : NSCopying, NSSecureCoding { @@ -174,9 +191,10 @@ interface ASPasswordCredentialIdentity : NSCopying, NSSecureCoding { nint Rank { get; set; } } - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] - [NoMac][NoTV][NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoTV][NoWatch] [iOS (12,0)] + [Mac (11,0)] [BaseType (typeof (UIViewController))] interface ASCredentialProviderViewController { [Export ("extensionContext", ArgumentSemantic.Strong)] @@ -470,7 +488,7 @@ interface IASAuthorizationProvider { } [Protocol] interface ASAuthorizationProvider { } - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, Mac (10,15), iOS (13,0)] [Protocol] interface ASAuthorizationProviderExtensionAuthorizationRequestHandler { @@ -483,16 +501,20 @@ interface ASAuthorizationProviderExtensionAuthorizationRequestHandler { void CancelAuthorization (ASAuthorizationProviderExtensionAuthorizationRequest request); } - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, Mac (10,15), iOS (13,0)] enum ASAuthorizationProviderAuthorizationOperation { // no value yet - but we must handle `nil` as a default value [DefaultEnumValue] [Field (null)] None, + + [Mac (11, 0), iOS (14, 0)] + [Field ("ASAuthorizationProviderAuthorizationOperationConfigurationRemoved")] + ConfigurationRemoved, } - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, Mac (10,15), iOS (13,0)] [BaseType (typeof (NSObject))] interface ASAuthorizationProviderExtensionAuthorizationRequest { @@ -545,6 +567,21 @@ interface ASAuthorizationProviderExtensionAuthorizationRequest { [Export ("authorizationOptions")] NSDictionary AuthorizationOptions { get; } + + [iOS (14,0)] + [Mac (11,0)] + [Export ("callerManaged")] + bool CallerManaged { [Bind ("isCallerManaged")] get; } + + [iOS (14,0)] + [Mac (11,0)] + [Export ("callerTeamIdentifier")] + string CallerTeamIdentifier { get; } + + [iOS (14,0)] + [Mac (11,0)] + [Export ("localizedCallerDisplayName")] + string LocalizedCallerDisplayName { get; } } [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] @@ -743,4 +780,149 @@ interface ASWebAuthenticationSessionWebBrowserSessionManager { [Export ("wasLaunchedByAuthenticationServices")] bool WasLaunchedByAuthenticationServices { get; } } + + + [Introduced (PlatformName.UIKitForMac, 14, 0)] + [iOS (14,0)] + [NoWatch, NoTV, NoMac] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface ASAccountAuthenticationModificationRequest { + } + + interface IASAccountAuthenticationModificationControllerDelegate {} + + [Introduced (PlatformName.UIKitForMac, 14, 0)] + [iOS (14,0)] + [NoWatch, NoTV, NoMac] + [Protocol][Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface ASAccountAuthenticationModificationControllerDelegate { + + [Export ("accountAuthenticationModificationController:didSuccessfullyCompleteRequest:withUserInfo:")] + void DidSuccessfullyCompleteRequest (ASAccountAuthenticationModificationController controller, ASAccountAuthenticationModificationRequest request, [NullAllowed] NSDictionary userInfo); + + [Export ("accountAuthenticationModificationController:didFailRequest:withError:")] + void DidFailRequest (ASAccountAuthenticationModificationController controller, ASAccountAuthenticationModificationRequest request, NSError error); + } + + interface IASAccountAuthenticationModificationControllerPresentationContextProviding {} + + [Introduced (PlatformName.UIKitForMac, 14, 0)] + [iOS (14,0)] + [NoWatch, NoTV, NoMac] + [Protocol] + interface ASAccountAuthenticationModificationControllerPresentationContextProviding { + + [Abstract] + [Export ("presentationAnchorForAccountAuthenticationModificationController:")] + UIWindow GetPresentationAnchor (ASAccountAuthenticationModificationController controller); + } + + [Introduced (PlatformName.UIKitForMac, 14, 0)] + [iOS (14,0)] + [NoWatch, NoTV, NoMac] + [BaseType (typeof (NSObject))] + interface ASAccountAuthenticationModificationController { + + [Wrap ("WeakDelegate")] + [NullAllowed] + IASAccountAuthenticationModificationControllerDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [NullAllowed, Export ("presentationContextProvider", ArgumentSemantic.Weak)] + IASAccountAuthenticationModificationControllerPresentationContextProviding PresentationContextProvider { get; set; } + + [Export ("performRequest:")] + void PerformRequest (ASAccountAuthenticationModificationRequest request); + } + + [Introduced (PlatformName.UIKitForMac, 14, 0)] + [iOS (14,0)] + [NoWatch, NoTV, NoMac] + [BaseType (typeof (NSExtensionContext))] + [DisableDefaultCtor] + interface ASAccountAuthenticationModificationExtensionContext { + + [Async] + [Export ("getSignInWithAppleUpgradeAuthorizationWithState:nonce:completionHandler:")] + void GetSignInWithAppleUpgradeAuthorization ([NullAllowed] string state, [NullAllowed] string nonce, Action completionHandler); + + [Export ("completeUpgradeToSignInWithAppleWithUserInfo:")] + void CompleteUpgradeToSignInWithApple ([NullAllowed] NSDictionary userInfo); + + [Export ("completeChangePasswordRequestWithUpdatedCredential:userInfo:")] + void CompleteChangePasswordRequest (ASPasswordCredential updatedCredential, [NullAllowed] NSDictionary userInfo); + + [Export ("cancelRequestWithError:")] + void CancelRequest (NSError error); + } + + [Introduced (PlatformName.UIKitForMac, 14, 0)] + [iOS (14,0)] + [NoWatch, NoTV, NoMac] + [BaseType (typeof (ASAccountAuthenticationModificationRequest))] + [DisableDefaultCtor] + interface ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest { + + [Export ("initWithUser:serviceIdentifier:userInfo:")] + IntPtr Constructor (string user, ASCredentialServiceIdentifier serviceIdentifier, [NullAllowed] NSDictionary userInfo); + + [Export ("user")] + string User { get; } + + [Export ("serviceIdentifier")] + ASCredentialServiceIdentifier ServiceIdentifier { get; } + + [NullAllowed, Export ("userInfo")] + NSDictionary UserInfo { get; } + } + + [Introduced (PlatformName.UIKitForMac, 14, 0)] + [iOS (14,0)] + [NoWatch, NoTV, NoMac] + [BaseType (typeof (ASAccountAuthenticationModificationRequest))] + [DisableDefaultCtor] + interface ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest { + + [Export ("initWithUser:serviceIdentifier:userInfo:")] + IntPtr Constructor (string user, ASCredentialServiceIdentifier serviceIdentifier, [NullAllowed] NSDictionary userInfo); + + [Export ("user")] + string User { get; } + + [Export ("serviceIdentifier")] + ASCredentialServiceIdentifier ServiceIdentifier { get; } + + [NullAllowed, Export ("userInfo")] + NSDictionary UserInfo { get; } + } + + [Introduced (PlatformName.UIKitForMac, 14, 0)] + [iOS (14,0)] + [NoWatch, NoTV, NoMac] + [BaseType (typeof (UIViewController))] + interface ASAccountAuthenticationModificationViewController { + + [Export ("extensionContext", ArgumentSemantic.Strong)] + ASAccountAuthenticationModificationExtensionContext ExtensionContext { get; } + + [Export ("convertAccountToSignInWithAppleWithoutUserInteractionForServiceIdentifier:existingCredential:userInfo:")] + void ConvertAccountToSignInWithAppleWithoutUserInteraction (ASCredentialServiceIdentifier serviceIdentifier, ASPasswordCredential existingCredential, [NullAllowed] NSDictionary userInfo); + + [Export ("prepareInterfaceToConvertAccountToSignInWithAppleForServiceIdentifier:existingCredential:userInfo:")] + void PrepareInterfaceToConvertAccountToSignInWithApple (ASCredentialServiceIdentifier serviceIdentifier, ASPasswordCredential existingCredential, [NullAllowed] NSDictionary userInfo); + + [Export ("changePasswordWithoutUserInteractionForServiceIdentifier:existingCredential:newPassword:userInfo:")] + void ChangePasswordWithoutUserInteraction (ASCredentialServiceIdentifier serviceIdentifier, ASPasswordCredential existingCredential, string newPassword, [NullAllowed] NSDictionary userInfo); + + [Export ("prepareInterfaceToChangePasswordForServiceIdentifier:existingCredential:newPassword:userInfo:")] + void PrepareInterfaceToChangePassword (ASCredentialServiceIdentifier serviceIdentifier, ASPasswordCredential existingCredential, string newPassword, [NullAllowed] NSDictionary userInfo); + + [Export ("cancelRequest")] + void CancelRequest (); + } + } diff --git a/src/automaticassessmentconfiguration.cs b/src/automaticassessmentconfiguration.cs index a2d8155d401b..0620bcf2b6b3 100644 --- a/src/automaticassessmentconfiguration.cs +++ b/src/automaticassessmentconfiguration.cs @@ -3,6 +3,7 @@ // // Authors: // Alex Soto +// TJ Lambert // // Copyright (c) Microsoft Corporation. // @@ -21,6 +22,16 @@ namespace AutomaticAssessmentConfiguration { public enum AEAssessmentErrorCode : long { Unknown = 1 } + + [Unavailable (PlatformName.MacCatalyst)] + [iOS (14, 0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Native] + enum AEAutocorrectMode : long { + None = 0, + Spelling = 1 << 0, + Punctuation = 1 << 1, + } [Unavailable (PlatformName.MacCatalyst)] [Mac (10,15,4), iOS (13,4)] @@ -28,6 +39,41 @@ public enum AEAssessmentErrorCode : long { [BaseType (typeof (NSObject))] interface AEAssessmentConfiguration : NSCopying { + [NoMac, iOS (14, 0)] + [Export ("autocorrectMode")] + AEAutocorrectMode AutocorrectMode { get; set; } + + [NoMac, iOS (14, 0)] + [Export ("allowsSpellCheck")] + bool AllowsSpellCheck { get; set; } + + [NoMac, iOS (14, 0)] + [Export ("allowsPredictiveKeyboard")] + bool AllowsPredictiveKeyboard { get; set; } + + [NoMac, iOS (14, 0)] + [Export ("allowsKeyboardShortcuts")] + bool AllowsKeyboardShortcuts { get; set; } + + [NoMac, iOS (14, 0)] + [Export ("allowsActivityContinuation")] + bool AllowsActivityContinuation { get; set; } + + [NoMac, iOS (14, 0)] + [Export ("allowsDictation")] + bool AllowsDictation { get; set; } + + [NoMac, iOS (14, 0)] + [Export ("allowsAccessibilitySpeech")] + bool AllowsAccessibilitySpeech { get; set; } + + [NoMac, iOS (14, 0)] + [Export ("allowsPasswordAutoFill")] + bool AllowsPasswordAutoFill { get; set; } + + [NoMac, iOS (14, 0)] + [Export ("allowsContinuousPathKeyboard")] + bool AllowsContinuousPathKeyboard { get; set; } } [Unavailable (PlatformName.MacCatalyst)] diff --git a/src/avfoundation.cs b/src/avfoundation.cs index fd1d7926e156..2df78b12cd66 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -48,6 +48,7 @@ using CoreFoundation; using CoreGraphics; using CoreVideo; +using UniformTypeIdentifiers; using ImageIO; using System; @@ -347,6 +348,10 @@ enum AVMediaCharacteristics { [Field ("AVMediaCharacteristicIsOriginalContent")] IsOriginalContent = 15, + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Field ("AVMediaCharacteristicContainsHDRVideo")] + ContainsHdrVideo = 16, + } #if !XAMCORE_4_0 @@ -1827,22 +1832,26 @@ interface AVAudioSessionSecondaryAudioHintEventArgs { delegate void AVPermissionGranted (bool granted); - [NoMac] + [Mac (11,0)] [Watch (3,0)] +#if MONOMAC + [Static] +#endif [BaseType (typeof (NSObject))] [DisableDefaultCtor] // for binary compatibility this is added in AVAudioSession.cs w/[Obsolete] interface AVAudioSession { - + + [NoMac] [Export ("sharedInstance"), Static] AVAudioSession SharedInstance (); - [NoWatch] + [NoWatch, NoMac] [Availability (Deprecated = Platform.iOS_6_0, Message = "Use 'AVAudioSession.Notification.Observe*' methods instead.")] [Export ("delegate", ArgumentSemantic.Assign)][NullAllowed] [NoTV] NSObject WeakDelegate { get; set; } - [NoWatch] + [NoWatch, NoMac] [Wrap ("WeakDelegate")] [Protocolize] [NullAllowed] @@ -1850,96 +1859,111 @@ interface AVAudioSession { [NoTV] AVAudioSessionDelegate Delegate { get; set; } + [NoMac] [Export ("setActive:error:")] bool SetActive (bool beActive, out NSError outError); - [NoTV] + [NoTV, NoMac] [Export ("setActive:withFlags:error:")] [Availability (Deprecated = Platform.iOS_6_0, Message = "Use 'SetActive (bool, AVAudioSessionSetActiveOptions, out NSError)' instead.")] bool SetActive (bool beActive, AVAudioSessionFlags flags, out NSError outError); + [NoMac] [Export ("setCategory:error:")] bool SetCategory (NSString theCategory, out NSError outError); - [NoTV] + [NoTV, NoMac] [Availability (Deprecated = Platform.iOS_6_0, Message = "Use 'SetPreferredSampleRate' instead.")] [Export ("setPreferredHardwareSampleRate:error:")] bool SetPreferredHardwareSampleRate (double sampleRate, out NSError outError); - [NoWatch] + [NoWatch, NoMac] [Export ("setPreferredIOBufferDuration:error:")] bool SetPreferredIOBufferDuration (double duration, out NSError outError); + [NoMac] [Export ("category")] NSString Category { get; } + [NoMac] [Export ("mode")] NSString Mode { get; } + [NoMac] [Export ("setMode:error:")] bool SetMode (NSString mode, out NSError error); - [NoTV] + [NoTV, NoMac] [Export ("preferredHardwareSampleRate")] [Availability (Deprecated = Platform.iOS_6_0, Message = "Use 'PreferredSampleRate' instead.")] double PreferredHardwareSampleRate { get; } - [NoWatch] + [NoWatch, NoMac] [Export ("preferredIOBufferDuration")] double PreferredIOBufferDuration { get; } - [NoTV] + [NoTV, NoMac] [Export ("inputIsAvailable")] [Availability (Deprecated = Platform.iOS_6_0)] bool InputIsAvailable { get; } - [NoTV] + [NoTV, NoMac] [Export ("currentHardwareSampleRate")] [Availability (Deprecated = Platform.iOS_6_0, Message = "Use 'SampleRate' instead.")] double CurrentHardwareSampleRate { get; } - [NoTV] + [NoTV, NoMac] [Export ("currentHardwareInputNumberOfChannels")] [Availability (Deprecated = Platform.iOS_6_0, Message = "Use 'InputNumberOfChannels' instead.")] nint CurrentHardwareInputNumberOfChannels { get; } - [NoTV] + [NoTV, NoMac] [Export ("currentHardwareOutputNumberOfChannels")] [Availability (Deprecated = Platform.iOS_6_0, Message = "Use 'OutputNumberOfChannels' instead.")] nint CurrentHardwareOutputNumberOfChannels { get; } + [NoMac] [Field ("AVAudioSessionCategoryAmbient")] NSString CategoryAmbient { get; } + [NoMac] [Field ("AVAudioSessionCategorySoloAmbient")] NSString CategorySoloAmbient { get; } + [NoMac] [Field ("AVAudioSessionCategoryPlayback")] NSString CategoryPlayback { get; } + [NoMac] [Field ("AVAudioSessionCategoryRecord")] NSString CategoryRecord { get; } + [NoMac] [Field ("AVAudioSessionCategoryPlayAndRecord")] NSString CategoryPlayAndRecord { get; } - [NoTV][NoWatch] + [NoTV][NoWatch][NoMac] [Availability (Deprecated = Platform.iOS_10_0)] // FIXME: Find the new value to use [Field ("AVAudioSessionCategoryAudioProcessing")] NSString CategoryAudioProcessing { get; } + [NoMac] [Field ("AVAudioSessionModeDefault")] NSString ModeDefault { get; } + [NoMac] [Field ("AVAudioSessionModeVoiceChat")] NSString ModeVoiceChat { get; } + [NoMac] [Field ("AVAudioSessionModeVideoRecording")] NSString ModeVideoRecording { get; } + [NoMac] [Field ("AVAudioSessionModeMeasurement")] NSString ModeMeasurement { get; } + [NoMac] [Field ("AVAudioSessionModeGameChat")] NSString ModeGameChat { get; } @@ -1947,77 +1971,94 @@ interface AVAudioSession { [Field ("AVAudioSessionModeVoicePrompt")] NSString VoicePrompt { get; } + [NoMac] [Export ("setActive:withOptions:error:")] bool SetActive (bool active, AVAudioSessionSetActiveOptions options, out NSError outError); + [NoMac] [iOS (9,0)] [Export ("availableCategories")] string [] AvailableCategories { get; } + [NoMac] [Export ("setCategory:withOptions:error:")] bool SetCategory (string category, AVAudioSessionCategoryOptions options, out NSError outError); + [NoMac] [iOS (10,0), TV (10,0), Watch (3,0)] [Export ("setCategory:mode:options:error:")] bool SetCategory (string category, string mode, AVAudioSessionCategoryOptions options, out NSError outError); + [NoMac] [Export ("categoryOptions")] AVAudioSessionCategoryOptions CategoryOptions { get; } + [NoMac] [iOS (9,0)] [Export ("availableModes")] string [] AvailableModes { get; } + [NoMac] [Export ("overrideOutputAudioPort:error:")] bool OverrideOutputAudioPort (AVAudioSessionPortOverride portOverride, out NSError outError); + [NoMac] [Export ("otherAudioPlaying")] bool OtherAudioPlaying { [Bind ("isOtherAudioPlaying")] get; } + [NoMac] [Export ("currentRoute")] AVAudioSessionRouteDescription CurrentRoute { get; } - [NoWatch] + [NoWatch, NoMac] [Export ("setPreferredSampleRate:error:")] bool SetPreferredSampleRate (double sampleRate, out NSError error); - [NoWatch] + [NoWatch, NoMac] [Export ("preferredSampleRate")] double PreferredSampleRate { get; } - [NoWatch] + [NoWatch, NoMac] [Export ("inputGain")] float InputGain { get; } // defined as 'float' - [NoWatch] + [NoWatch, NoMac] [Export ("inputGainSettable")] bool InputGainSettable { [Bind ("isInputGainSettable")] get; } + [NoMac] [Export ("inputAvailable")] bool InputAvailable { [Bind ("isInputAvailable")] get; } + [NoMac] [Export ("sampleRate")] double SampleRate { get; } + [NoMac] [Export ("inputNumberOfChannels")] nint InputNumberOfChannels { get; } + [NoMac] [Export ("outputNumberOfChannels")] nint OutputNumberOfChannels { get; } + [NoMac] [Export ("outputVolume")] float OutputVolume { get; } // defined as 'float' + [NoMac] [Export ("inputLatency")] double InputLatency { get; } + [NoMac] [Export ("outputLatency")] double OutputLatency { get; } + [NoMac] [Export ("IOBufferDuration")] double IOBufferDuration { get; } - [NoWatch] + [NoWatch, NoMac] [Export ("setInputGain:error:")] bool SetInputGain (float /* defined as 'float' */ gain, out NSError outError); @@ -2025,6 +2066,7 @@ interface AVAudioSession { [Notification (typeof (AVAudioSessionInterruptionEventArgs))] NSString InterruptionNotification { get; } + [NoMac] [Field ("AVAudioSessionRouteChangeNotification")] [Notification (typeof (AVAudioSessionRouteChangeEventArgs))] NSString RouteChangeNotification { get; } @@ -2036,64 +2078,106 @@ interface AVAudioSession { [iOS (7,0), Notification, Field ("AVAudioSessionMediaServicesWereLostNotification")] NSString MediaServicesWereLostNotification { get; } + [NoMac] [Field ("AVAudioSessionCategoryMultiRoute")] NSString CategoryMultiRoute { get; } + [NoMac] [Field ("AVAudioSessionModeMoviePlayback")] NSString ModeMoviePlayback { get; } + [NoMac] [iOS (7,0)] [Field ("AVAudioSessionModeVideoChat")] NSString ModeVideoChat { get; } + [NoMac] [iOS (9,0)] [Field ("AVAudioSessionModeSpokenAudio")] NSString ModeSpokenAudio { get; } + [NoMac] [Field ("AVAudioSessionPortLineIn")] NSString PortLineIn { get; } + [NoMac] [Field ("AVAudioSessionPortBuiltInMic")] NSString PortBuiltInMic { get; } + [NoMac] [Field ("AVAudioSessionPortHeadsetMic")] NSString PortHeadsetMic { get; } + [NoMac] [Field ("AVAudioSessionPortLineOut")] NSString PortLineOut { get; } + [NoMac] [Field ("AVAudioSessionPortHeadphones")] NSString PortHeadphones { get; } + [NoMac] [Field ("AVAudioSessionPortBluetoothA2DP")] NSString PortBluetoothA2DP { get; } + [NoMac] [Field ("AVAudioSessionPortBuiltInReceiver")] NSString PortBuiltInReceiver { get; } + [NoMac] [Field ("AVAudioSessionPortBuiltInSpeaker")] NSString PortBuiltInSpeaker { get; } + [NoMac] [Field ("AVAudioSessionPortHDMI")] NSString PortHdmi { get; } + [NoMac] [Field ("AVAudioSessionPortAirPlay")] NSString PortAirPlay { get; } + [NoMac] [Field ("AVAudioSessionPortBluetoothHFP")] NSString PortBluetoothHfp { get; } + [NoMac] [Field ("AVAudioSessionPortUSBAudio")] NSString PortUsbAudio { get; } + [NoMac] [iOS (7,0)] [Field ("AVAudioSessionPortBluetoothLE")] NSString PortBluetoothLE { get; } + [NoMac] [iOS (7,1)] [Field ("AVAudioSessionPortCarAudio")] NSString PortCarAudio { get; } + [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [Field ("AVAudioSessionPortAVB")] + NSString PortAvb { get; } + + [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [Field ("AVAudioSessionPortDisplayPort")] + NSString PortDisplayPort { get; } + + [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [Field ("AVAudioSessionPortFireWire")] + NSString PortFireWire { get; } + + [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [Field ("AVAudioSessionPortPCI")] + NSString PortPci { get; } + + [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [Field ("AVAudioSessionPortThunderbolt")] + NSString PortThunderbolt { get; } + + [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [Field ("AVAudioSessionPortVirtual")] + NSString PortVirtual { get; } + [iOS (7,0)] [UnifiedInternal, Field ("AVAudioSessionLocationUpper")] NSString LocationUpper { get; } @@ -2102,71 +2186,75 @@ interface AVAudioSession { [UnifiedInternal, Field ("AVAudioSessionLocationLower")] NSString LocationLower { get; } + [NoMac] [Export ("inputDataSources"), NullAllowed] AVAudioSessionDataSourceDescription [] InputDataSources { get; } + [NoMac] [Export ("inputDataSource"), NullAllowed] AVAudioSessionDataSourceDescription InputDataSource { get; } + [NoMac] [Export ("outputDataSources"), NullAllowed] AVAudioSessionDataSourceDescription [] OutputDataSources { get; } + [NoMac] [Export ("outputDataSource"), NullAllowed] AVAudioSessionDataSourceDescription OutputDataSource { get; } - [NoWatch] + [NoWatch, NoMac] [Export ("setInputDataSource:error:")] [PostGet ("InputDataSource")] bool SetInputDataSource ([NullAllowed] AVAudioSessionDataSourceDescription dataSource, out NSError outError); - [NoWatch] + [NoWatch, NoMac] [Export ("setOutputDataSource:error:")] [PostGet ("OutputDataSource")] bool SetOutputDataSource ([NullAllowed] AVAudioSessionDataSourceDescription dataSource, out NSError outError); - [NoTV] + [NoTV, NoMac] [Watch (4,0)] [iOS (7,0)] [Export ("requestRecordPermission:")] void RequestRecordPermission (AVPermissionGranted responseCallback); - [NoWatch, iOS (7,0)] + [NoWatch, iOS (7,0), NoMac] [Export ("setPreferredInput:error:")] bool SetPreferredInput ([NullAllowed] AVAudioSessionPortDescription inPort, out NSError outError); - [NoWatch, iOS (7,0)] + [NoWatch, iOS (7,0), NoMac] [Export ("preferredInput", ArgumentSemantic.Copy), NullAllowed] AVAudioSessionPortDescription PreferredInput { get; } - [iOS (7,0)] + [iOS (7,0), NoMac] [NullAllowed, Export ("availableInputs")] AVAudioSessionPortDescription [] AvailableInputs { get; } - [NoWatch] + [NoWatch, NoMac] [iOS (7,0)] [Export ("setPreferredInputNumberOfChannels:error:")] bool SetPreferredInputNumberOfChannels (nint count, out NSError outError); - [NoWatch] + [NoWatch, NoMac] [iOS (7,0)] [Export ("preferredInputNumberOfChannels")] nint GetPreferredInputNumberOfChannels (); - [NoWatch] + [NoWatch, NoMac] [iOS (7,0)] [Export ("setPreferredOutputNumberOfChannels:error:")] bool SetPreferredOutputNumberOfChannels (nint count, out NSError outError); - [NoWatch] + [NoWatch, NoMac] [iOS (7,0)] [Export ("preferredOutputNumberOfChannels")] nint GetPreferredOutputNumberOfChannels (); - [iOS (7,0)] + [iOS (7,0), NoMac] [Export ("maximumInputNumberOfChannels")] nint MaximumInputNumberOfChannels { get; } - [iOS (7,0)] + [iOS (7,0), NoMac] [Export ("maximumOutputNumberOfChannels")] nint MaximumOutputNumberOfChannels { get; } @@ -2206,22 +2294,26 @@ interface AVAudioSession { [UnifiedInternal, Field ("AVAudioSessionPolarPatternSubcardioid")] NSString PolarPatternSubcardioid { get; } + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Field ("AVAudioSessionPolarPatternStereo")] + NSString PolarPatternStereo { get; } + // 8.0 - [NoTV] + [NoTV, NoMac] [iOS (8,0), Watch (5,0)] [Export ("recordPermission")] AVAudioSessionRecordPermission RecordPermission { get; } - [iOS (8,0)] + [iOS (8,0), NoMac] [Export ("secondaryAudioShouldBeSilencedHint")] bool SecondaryAudioShouldBeSilencedHint { get; } - [iOS (8,0)] + [iOS (8,0), NoMac] [Field ("AVAudioSessionSilenceSecondaryAudioHintNotification")] [Notification (typeof (AVAudioSessionSecondaryAudioHintEventArgs))] NSString SilenceSecondaryAudioHintNotification { get; } - [NoWatch, NoTV, iOS(10,0)] + [NoWatch, NoTV, iOS(10,0), NoMac] [Export ("setAggregatedIOPreference:error:")] bool SetAggregatedIOPreference (AVAudioSessionIOType ioType, out NSError error); @@ -2249,6 +2341,19 @@ interface AVAudioSession { [Watch (6,0), TV (13,0), NoMac, iOS (13,0)] [Export ("allowHapticsAndSystemSoundsDuringRecording")] bool AllowHapticsAndSystemSoundsDuringRecording { get; } + + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Export ("preferredInputOrientation")] + AVAudioStereoOrientation PreferredInputOrientation { get; } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Export ("setPreferredInputOrientation:error:")] + bool SetPreferredInputOrientation (AVAudioStereoOrientation orientation, [NullAllowed] out NSError outError); + + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Export ("inputOrientation")] + AVAudioStereoOrientation InputOrientation { get; } + } [NoMac] @@ -2292,7 +2397,7 @@ interface AVAudioSessionDataSourceDescription { } - [NoMac] + [Mac (11,0)] interface AVAudioSessionInterruptionEventArgs { [Export ("AVAudioSessionInterruptionTypeKey")] AVAudioSessionInterruptionType InterruptionType { get; } @@ -2300,7 +2405,7 @@ interface AVAudioSessionInterruptionEventArgs { [Export ("AVAudioSessionInterruptionOptionKey")] AVAudioSessionInterruptionOptions Option { get; } - [iOS (10, 3), NoMac, TV (10, 2), Watch (3,2)] + [iOS (10, 3), TV (10, 2), Watch (3, 2)] [NullAllowed] [Export ("AVAudioSessionInterruptionWasSuspendedKey")] bool WasSuspended { get; } @@ -3767,6 +3872,8 @@ interface AVAssetResourceLoadingRequest { bool Finished { get; } [Export ("finishLoadingWithResponse:data:redirect:")] + [Deprecated (PlatformName.MacOSX, 10, 15, message : "Use the 'Response', 'Redirect' properties and the 'AVAssetResourceLoadingDataRequest.Responds' and 'AVAssetResourceLoadingRequest.FinishLoading' methods instead.")] + [Deprecated (PlatformName.TvOS, 9, 0, message : "Use the 'Response', 'Redirect' properties and the 'AVAssetResourceLoadingDataRequest.Responds' and 'AVAssetResourceLoadingRequest.FinishLoading' methods instead.")] [Availability (Introduced = Platform.iOS_6_0, Deprecated = Platform.iOS_7_0, Message = "Use the 'Response', 'Redirect' properties and the 'AVAssetResourceLoadingDataRequest.Responds' and 'AVAssetResourceLoadingRequest.FinishLoading' methods instead.")] void FinishLoading ([NullAllowed] NSUrlResponse usingResponse, [NullAllowed] NSData data, [NullAllowed] NSUrlRequest redirect); @@ -3844,6 +3951,20 @@ interface AVAssetResourceLoadingContentInformationRequest { string[] AllowedContentTypes { get; } } + interface IAVAssetWriterDelegate { } + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Protocol] + [Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface AVAssetWriterDelegate { + [Export ("assetWriter:didOutputSegmentData:segmentType:segmentReport:")] + void DidOutputSegmentData (AVAssetWriter writer, NSData segmentData, AVAssetSegmentType segmentType, [NullAllowed] AVAssetSegmentReport segmentReport); + + [Export ("assetWriter:didOutputSegmentData:segmentType:")] + void DidOutputSegmentData (AVAssetWriter writer, NSData segmentData, AVAssetSegmentType segmentType); + } + [NoWatch] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVAssetWriter initWithURL:fileType:error:] invalid parameter not satisfying: outputURL != ((void*)0) @@ -3888,6 +4009,11 @@ interface AVAssetWriter { [Export ("initWithURL:fileType:error:")] IntPtr Constructor (NSUrl outputUrl, string outputFileType, out NSError error); + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("initWithContentType:")] + [DesignatedInitializer] + IntPtr Constructor (UTType outputContentType); + [Export ("canApplyOutputSettings:forMediaType:")] bool CanApplyOutputSettings ([NullAllowed] NSDictionary outputSettings, string mediaType); @@ -3945,6 +4071,43 @@ interface AVAssetWriter { [iOS (8,0), Mac (10,10)] [Export ("directoryForTemporaryFiles", ArgumentSemantic.Copy), NullAllowed] NSUrl DirectoryForTemporaryFiles { get; set; } + + // from category AVAssetWriterSegmentation (AVAssetWriter) + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("preferredOutputSegmentInterval", ArgumentSemantic.Assign)] + CMTime PreferredOutputSegmentInterval { get; set; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("initialSegmentStartTime", ArgumentSemantic.Assign)] + CMTime InitialSegmentStartTime { get; set; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("outputFileTypeProfile")] + [NullAllowed] + [BindAs (typeof (AVFileTypeProfile))] + NSString OutputFileTypeProfile { get; set; } + + [Wrap ("WeakDelegate")] + IAVAssetWriterDelegate Delegate { get; set; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("flushSegment")] + void FlushSegment (); + + // from category AVAssetWriterFileTypeSpecificProperties (AVAssetWriter) + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("initialMovieFragmentSequenceNumber")] + nint InitialMovieFragmentSequenceNumber { get; set; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("producesCombinableFragments")] + bool ProducesCombinableFragments { get; set; } } [NoWatch] @@ -4684,6 +4847,10 @@ interface AVMetadata { [Field ("AVMetadataCommonKeySoftware")] NSString CommonKeySoftware { get; } + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("AVMetadataCommonKeyAccessibilityDescription")] + NSString CommonKeyAccessibilityDescription { get; } + #if !XAMCORE_4_0 [Field ("AVMetadataFormatQuickTimeUserData")] [Obsolete ("Use 'AVMetadataFormat' enum values")] @@ -4806,7 +4973,11 @@ interface AVMetadata { [Field ("AVMetadataQuickTimeUserDataKeyTaggedCharacteristic")] NSString QuickTimeUserDataKeyTaggedCharacteristic { get; } - + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("AVMetadataQuickTimeUserDataKeyAccessibilityDescription")] + NSString QuickTimeUserDataKeyAccessibilityDescription { get; } + [Field ("AVMetadataISOUserDataKeyCopyright")] NSString ISOUserDataKeyCopyright { get; } @@ -5002,6 +5173,10 @@ interface AVMetadata { [iOS (9,0), Mac (10,11)] [Field ("AVMetadataQuickTimeMetadataKeyContentIdentifier")] NSString QuickTimeMetadataKeyContentIdentifier { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("AVMetadataQuickTimeMetadataKeyAccessibilityDescription")] + NSString QuickTimeMetadataKeyAccessibilityDescription { get; } #if !XAMCORE_4_0 [Field ("AVMetadataFormatiTunesMetadata")] @@ -5457,6 +5632,14 @@ interface AVMetadata { [Field ("AVMetadataISOUserDataKeyDate")] NSString IsoUserDataKeyDate { get; } + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("AVMetadataISOUserDataKeyAccessibilityDescription")] + NSString IsoUserDataKeyAccessibilityDescription { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("AVMetadataIdentifierISOUserDataAccessibilityDescription")] + NSString IsoUserDataAccessibilityDescription { get; } + [iOS (8,0)][Mac (10,10)] [Field ("AVMetadataKeySpaceIcy")] NSString KeySpaceIcy { get; } @@ -5576,6 +5759,11 @@ interface CommonIdentifier { [Field ("AVMetadataCommonIdentifierSoftware")] NSString Software { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("AVMetadataCommonIdentifierAccessibilityDescription")] + NSString AccessibilityDescription { get; } + } [iOS (8,0)][Mac (10,10)][Watch (6,0)] @@ -5694,6 +5882,10 @@ interface QuickTime { [Field ("AVMetadataIdentifierQuickTimeUserDataTaggedCharacteristic")] NSString UserDataTaggedCharacteristic { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("AVMetadataIdentifierQuickTimeUserDataAccessibilityDescription")] + NSString UserDataAccessibilityDescription { get; } } [Watch (6,0)] @@ -5935,6 +6127,14 @@ interface QuickTimeMetadata { [Watch (6, 0), TV (13, 0), NoMac, iOS (13, 0)] [Field ("AVMetadataIdentifierQuickTimeMetadataAutoLivePhoto")] NSString AutoLivePhoto { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("AVMetadataIdentifierQuickTimeMetadataAccessibilityDescription")] + NSString AccessibilityDescription { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("AVMetadataIdentifierQuickTimeMetadataLocationHorizontalAccuracyInMeters")] + NSString LocationHorizontalAccuracyInMeters { get; } } [iOS (8,0)][Mac (10,10)][Watch (6,0)] @@ -7908,6 +8108,10 @@ interface AVVideoCompositing { [TV (13,0), NoWatch, Mac (10,15), iOS (13,0)] [Export ("prerollForRenderingUsingHint:")] void PrerollForRendering (AVVideoCompositionRenderHint renderHint); + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("supportsHDRSourceFrames")] + bool SupportsHdrSourceFrames { get; } } [NoWatch] @@ -9816,10 +10020,6 @@ interface AVCaptureStillImageOutput { [Export ("prepareToCaptureStillImageBracketFromConnection:withSettingsArray:completionHandler:")] void PrepareToCaptureStillImageBracket (AVCaptureConnection connection, AVCaptureBracketedStillImageSettings [] settings, Action handler); - [iOS (8,0)] - [Export ("highResolutionStillImageOutputEnabled")] - bool HighResolutionStillImageOutputEnabled { [Bind ("isHighResolutionStillImageOutputEnabled")] get; set; } - [iOS (9,0)] [Export ("lensStabilizationDuringBracketedCaptureSupported")] bool LensStabilizationDuringBracketedCaptureSupported { [Bind ("isLensStabilizationDuringBracketedCaptureSupported")] get; } @@ -9828,6 +10028,10 @@ interface AVCaptureStillImageOutput { [Export ("lensStabilizationDuringBracketedCaptureEnabled")] bool LensStabilizationDuringBracketedCaptureEnabled { [Bind ("isLensStabilizationDuringBracketedCaptureEnabled")] get; set; } #endif + + [iOS (8,0), Mac (11, 0)] + [Export ("highResolutionStillImageOutputEnabled")] + bool HighResolutionStillImageOutputEnabled { [Bind ("isHighResolutionStillImageOutputEnabled")] get; set; } } [NoTV, iOS (10,0), Mac (10,15), NoWatch] @@ -10196,7 +10400,7 @@ interface AVCaptureDevice { [Export ("inUseByAnotherApplication")] bool InUseByAnotherApplication { [Bind ("isInUseByAnotherApplication")] get; } - [NoiOS, NoWatch] + [iOS (14, 0), NoWatch] [Export ("suspended")] bool Suspended { [Bind ("isSuspended")] get; } @@ -10204,7 +10408,7 @@ interface AVCaptureDevice { [Export ("linkedDevices")] AVCaptureDevice [] LinkedDevices { get; } - [Mac (10,9), NoiOS, NoWatch] + [Mac (10,9), iOS (14,0), NoWatch] [Export ("manufacturer")] string Manufacturer { get; } @@ -11296,9 +11500,19 @@ interface AVPlayerItem : NSCopying { [Export ("automaticallyPreservesTimeOffsetFromLive")] bool AutomaticallyPreservesTimeOffsetFromLive { get; set; } + [Deprecated (PlatformName.iOS, 14, 0, message : "Use 'AllowedAudioSpatializationFormats' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message : "Use 'AllowedAudioSpatializationFormats' instead.")] [NoWatch, NoTV, Mac (10, 15), iOS (13, 0)] [Export ("audioSpatializationAllowed")] bool AudioSpatializationAllowed { [Bind ("isAudioSpatializationAllowed")] get; set; } + + [NoWatch, NoTV, Mac (11, 0), iOS (14, 0)] + [Export ("allowedAudioSpatializationFormats", ArgumentSemantic.Assign)] + AVAudioSpatializationFormats AllowedAudioSpatializationFormats { get; set; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("startsOnFirstEligibleVariant")] + bool StartsOnFirstEligibleVariant { get; set; } } [NoiOS][NoTV][NoWatch] @@ -12193,6 +12407,16 @@ interface AVSampleBufferDisplayLayer { [TV (13,0), NoWatch, Mac (10,15), iOS (13,0)] [Export ("preventsDisplaySleepDuringVideoPlayback")] bool PreventsDisplaySleepDuringVideoPlayback { get; set; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("requiresFlushToResumeDecoding")] + bool RequiresFlushToResumeDecoding { get; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Field ("AVSampleBufferDisplayLayerRequiresFlushToResumeDecodingDidChangeNotification")] + [Notification] + NSString RequiresFlushToResumeDecodingDidChangeNotification { get; } + } [NoWatch] @@ -12317,6 +12541,10 @@ interface AVSpeechUtterance : NSCopying, NSSecureCoding { [Field ("AVSpeechUtteranceDefaultSpeechRate")] float DefaultSpeechRate { get; } // defined as 'float' + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("prefersAssistiveTechnologySettings")] + bool PrefersAssistiveTechnologySettings { get; set; } } [Mac (10,15)] @@ -12488,6 +12716,14 @@ interface AVAssetDownloadTaskKeys { [NoWatch, NoTV, iOS (13,0)] [Field ("AVAssetDownloadTaskMediaSelectionPrefersMultichannelKey")] NSString MediaSelectionPrefersMultichannelKey { get; } + + [NoWatch, NoTV, iOS (14, 0)] + [Field ("AVAssetDownloadTaskPrefersHDRKey")] + NSString PrefersHdrKey { get; } + + [NoWatch, NoTV, iOS (14, 0)] + [Field ("AVAssetDownloadTaskMinimumRequiredPresentationSizeKey")] + NSString MinimumRequiredPresentationSizeKey { get; } } [NoMac] @@ -12499,6 +12735,10 @@ interface AVAssetDownloadOptions { AVMediaSelection MediaSelection { get; set; } [NoWatch, NoTV, iOS (13,0)] bool MediaSelectionPrefersMultichannel { get; set;} + [NoWatch, NoTV, iOS (14, 0)] + bool PrefersHdr { get; set; } + [NoWatch, NoTV, iOS (14, 0)] + CGSize MinimumRequiredPresentationSize { get; set; } } [NoMac] @@ -13000,7 +13240,7 @@ interface AVContentProposal : NSCopying partial interface IAVContentKeySessionDelegate {} - [TV (10,2), Mac (10,12,4), iOS (10,3), NoWatch] + [TV (10,2), Mac (10,12,4), iOS (10,3), Watch (7, 0)] [Protocol, Model] [BaseType (typeof (NSObject))] interface AVContentKeySessionDelegate @@ -13024,22 +13264,22 @@ interface AVContentKeySessionDelegate [Export ("contentKeySessionContentProtectionSessionIdentifierDidChange:")] void DidChange (AVContentKeySession session); - [NoWatch, NoTV, Mac (10,15), iOS (11,0)] + [NoTV, Mac (10,15), iOS (11,0)] [Export ("contentKeySession:didUpdatePersistableContentKey:forContentKeyIdentifier:")] void DidUpdate (AVContentKeySession session, NSData persistableContentKey, NSObject keyIdentifier); - [TV (12,0), NoWatch, Mac (10,14), iOS (12,0)] + [TV (12,0), Mac (10,14), iOS (12,0)] [Export ("contentKeySession:contentKeyRequestDidSucceed:")] void DidSucceed (AVContentKeySession session, AVContentKeyRequest keyRequest); - [TV (12,0), NoWatch, Mac (10,14), iOS (12,0)] + [TV (12,0), Mac (10,14), iOS (12,0)] [Export ("contentKeySessionDidGenerateExpiredSessionReport:")] void DidGenerateExpiredSessionReport (AVContentKeySession session); } partial interface IAVContentKeyRecipient {} - [TV (10,2), Mac (10,12,4), iOS (10,3), NoWatch] + [TV (10,2), Mac (10,12,4), iOS (10,3), Watch (7,0)] [Protocol] interface AVContentKeyRecipient { [Abstract] @@ -13047,12 +13287,12 @@ interface AVContentKeyRecipient { bool MayRequireContentKeysForMediaDataProcessing { get; } } - [TV (10,2), Mac (10,12,4), iOS (10,3), NoWatch] + [TV (10,2), Mac (10,12,4), iOS (10,3), Watch (7,0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface AVContentKeySession { - [TV (11,0), NoWatch, Mac (10,13), iOS (11,0)] + [TV (11,0), Mac (10,13), iOS (11,0)] [Static] [Export ("contentKeySessionWithKeySystem:")] AVContentKeySession Create (string keySystem); @@ -13098,7 +13338,7 @@ interface AVContentKeySession { void RenewExpiringResponseData (AVContentKeyRequest contentKeyRequest); [Async] - [NoWatch, NoTV, Mac (10,15), iOS (11,0)] + [NoTV, Mac (10,15), iOS (11,0)] [Export ("makeSecureTokenForExpirationDateOfPersistableContentKey:completionHandler:")] void MakeSecureToken (NSData persistableContentKeyData, Action handler); @@ -13137,7 +13377,7 @@ interface AVContentKeySession { } [Static][Internal] - [NoWatch, NoTV, Mac (10,15), iOS (12,2)] + [Watch (7,0), NoTV, Mac (10,15), iOS (12,2)] interface AVContentKeySessionServerPlaybackContextOptionKeys { [Field ("AVContentKeySessionServerPlaybackContextOptionProtocolVersions")] NSString ProtocolVersionsKey { get; } @@ -13147,14 +13387,14 @@ interface AVContentKeySessionServerPlaybackContextOptionKeys { } [StrongDictionary ("AVContentKeySessionServerPlaybackContextOptionKeys")] - [NoWatch, NoTV, NoMac, iOS (12,2)] + [Watch (7,0), NoTV, NoMac, iOS (12,2)] interface AVContentKeySessionServerPlaybackContextOptions { NSNumber[] ProtocolVersions { get; } NSData ServerChallenge { get; } } - [TV (10,2), Mac (10,12,4), iOS (10,3), NoWatch] + [TV (10,2), Mac (10,12,4), iOS (10,3), Watch (7,0)] [Category] [BaseType (typeof(AVContentKeySession))] interface AVContentKeySession_AVContentKeyRecipients @@ -13169,52 +13409,48 @@ interface AVContentKeySession_AVContentKeyRecipients IAVContentKeyRecipient[] GetContentKeyRecipients (); } -#if WATCH - [Static] -#endif [TV (10,2), Mac (10,12,4), iOS (10,3), Watch (6,0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface AVContentKeyRequest { - [NoWatch] + [Watch (7,0)] [Field ("AVContentKeyRequestProtocolVersionsKey")] NSString ProtocolVersions { get; } - [NoWatch] + [Watch (7,0)] [Export ("status")] AVContentKeyRequestStatus Status { get; } - [NoWatch] + [Watch (7, 0)] [NullAllowed, Export ("error")] NSError Error { get; } - [NoWatch] + [Watch (7, 0)] [NullAllowed, Export ("identifier")] NSObject Identifier { get; } - [NoWatch] + [Watch (7, 0)] [NullAllowed, Export ("initializationData")] NSData InitializationData { get; } - [NoWatch] + [Watch (7, 0)] [Export ("canProvidePersistableContentKey")] bool CanProvidePersistableContentKey { get; } - [NoWatch] - [TV (12,2), Mac (10,14,4), iOS (12,2)] + [TV (12,2), Mac (10,14,4), iOS (12,2), Watch (7, 0)] [Export ("options", ArgumentSemantic.Copy)] NSDictionary Options { get; } - [NoWatch] + [Watch (7, 0)] [Async] [Export ("makeStreamingContentKeyRequestDataForApp:contentIdentifier:options:completionHandler:")] void MakeStreamingContentKeyRequestData (NSData appIdentifier, [NullAllowed] NSData contentIdentifier, [NullAllowed] NSDictionary options, Action handler); - [NoWatch] + [Watch (7, 0)] [Export ("processContentKeyResponse:")] void Process (AVContentKeyResponse keyResponse); - [NoWatch] + [Watch (7, 0)] [Export ("processContentKeyResponseError:")] void Process (NSError error); @@ -13223,7 +13459,7 @@ interface AVContentKeyRequest { [Export ("respondByRequestingPersistableContentKeyRequest"), NoWatch, NoTV, NoMac] void RespondByRequestingPersistableContentKeyRequest (); - [NoWatch, NoTV, Mac (10,15), iOS (11,2)] + [Watch (7, 0), NoTV, Mac (10,15), iOS (11,2)] [Export ("respondByRequestingPersistableContentKeyRequestAndReturnError:")] bool RespondByRequestingPersistableContentKeyRequest ([NullAllowed] out NSError error); @@ -13233,7 +13469,7 @@ interface AVContentKeyRequest { } [Category] - [Mac (10, 12, 4), iOS (10,3), TV (10, 2), NoWatch] + [Mac (10, 12, 4), iOS (10,3), TV (10, 2), Watch (7, 0)] [BaseType (typeof(AVContentKeyRequest))] interface AVContentKeyRequest_AVContentKeyRequestRenewal { @@ -13241,7 +13477,7 @@ interface AVContentKeyRequest_AVContentKeyRequestRenewal bool GetRenewsExpiringResponseData (); } - [TV (10,2), Mac (10,12,4), iOS (10,3), NoWatch] + [TV (10,2), Mac (10,12,4), iOS (10,3), Watch (7,0)] [DisableDefaultCtor] [BaseType (typeof (AVContentKeyRequest))] interface AVPersistableContentKeyRequest { @@ -13251,7 +13487,7 @@ interface AVPersistableContentKeyRequest { } - [TV (10,2), Mac (10,12,4), iOS (10,3), NoWatch] + [TV (10,2), Mac (10,12,4), iOS (10,3), Watch (7,0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface AVContentKeyResponse { @@ -13260,13 +13496,13 @@ interface AVContentKeyResponse { [Export ("contentKeyResponseWithFairPlayStreamingKeyResponseData:")] AVContentKeyResponse _InitWithFairPlayStreamingKeyResponseData (NSData fairPlayStreamingKeyResponseData); - [TV (11,0), NoWatch, Mac (10,13), iOS (11,0)] + [TV (11,0), Mac (10,13), iOS (11,0)] [Static] [Export ("contentKeyResponseWithClearKeyData:initializationVector:")] AVContentKeyResponse Create (NSData keyData, [NullAllowed] NSData initializationVector); [Internal] - [TV (13,0), NoWatch, Mac (10,15), iOS (13,0)] + [TV (13,0), Mac (10,15), iOS (13,0)] [Static] [Export ("contentKeyResponseWithAuthorizationTokenData:")] AVContentKeyResponse _InitWithAuthorizationToken (NSData authorizationTokenData); @@ -13609,4 +13845,69 @@ interface AVMetadataSalientObject : NSCopying { nint ObjectId { get; } } + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVAssetSegmentReport { + [Export ("segmentType")] + AVAssetSegmentType SegmentType { get; } + + [Export ("trackReports")] + AVAssetSegmentTrackReport[] TrackReports { get; } + } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVAssetSegmentReportSampleInformation { + [Export ("presentationTimeStamp")] + CMTime PresentationTimeStamp { get; } + + [Export ("offset")] + nint Offset { get; } + + [Export ("length")] + nint Length { get; } + + [Export ("isSyncSample")] + bool IsSyncSample { get; } + } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVAssetSegmentTrackReport { + [Export ("trackID")] + int TrackId { get; } + + [BindAs (typeof (AVMediaTypes))] + [Export ("mediaType")] + NSString MediaType { get; } + + [Export ("earliestPresentationTimeStamp")] + CMTime EarliestPresentationTimeStamp { get; } + + [Export ("duration")] + CMTime Duration { get; } + + [NullAllowed, Export ("firstVideoSampleInformation")] + AVAssetSegmentReportSampleInformation FirstVideoSampleInformation { get; } + } + + [NoWatch, NoTV, NoiOS, Mac (11,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVAudioRoutingArbiter + { + [Static] + [Export ("sharedRoutingArbiter")] + AVAudioRoutingArbiter SharedRoutingArbiter { get; } + + [Export ("beginArbitrationWithCategory:completionHandler:")] + void BeginArbitration (AVAudioRoutingArbitrationCategory category, Action handler); + + [Export ("leaveArbitration")] + void LeaveArbitration (); + } + } diff --git a/src/avkit.cs b/src/avkit.cs index 2e4db00caf28..e588d408477a 100644 --- a/src/avkit.cs +++ b/src/avkit.cs @@ -35,7 +35,7 @@ #endif // !MONOMAC namespace AVKit { - [NoTV] + [TV (14, 0)] [iOS (9,0)] [Mac (10,15)] [BaseType (typeof(NSObject))] @@ -97,12 +97,19 @@ interface AVPictureInPictureController [Static] [Export ("pictureInPictureButtonStopImageCompatibleWithTraitCollection:")] UIImage CreateStopButton ([NullAllowed] UITraitCollection traitCollection); + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("requiresLinearPlayback")] + bool RequiresLinearPlayback { get; set; } + + [TV (14, 0), NoWatch, NoMac, NoiOS] + [Export ("canStopPictureInPicture")] + bool CanStopPictureInPicture { get; } } interface IAVPictureInPictureControllerDelegate {} - [NoTV] - [iOS (9,0), Mac (10,15)] + [iOS (9,0), Mac (10,15), TV (14,0)] [Protocol, Model] [BaseType (typeof(NSObject))] interface AVPictureInPictureControllerDelegate @@ -160,7 +167,7 @@ interface AVPlayerViewController { [Export ("unobscuredContentGuide")] UILayoutGuide UnobscuredContentGuide { get; } - [NoTV] + [TV (14, 0)] [iOS (9,0)] [Export ("allowsPictureInPicturePlayback")] bool AllowsPictureInPicturePlayback { get; set; } @@ -189,8 +196,8 @@ interface AVPlayerViewController { [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] NSObject WeakDelegate { get; set; } - [NoiOS][NoMac] - [TV (9,0)] + [NoMac] + [TV (9,0), iOS (14, 0)] [Export ("requiresLinearPlayback")] bool RequiresLinearPlayback { get; set; } @@ -249,6 +256,10 @@ interface AVPlayerViewController { [NoiOS, TV (13,0), NoWatch] [NullAllowed, Export ("customOverlayViewController", ArgumentSemantic.Strong)] UIViewController CustomOverlayViewController { get; set; } + + [iOS (14, 0), NoTV] + [Export ("showsTimecodes")] + bool ShowsTimecodes { get; set; } } [NoMac] @@ -256,31 +267,31 @@ interface AVPlayerViewController { [BaseType (typeof(NSObject))] interface AVPlayerViewControllerDelegate { - [NoTV] + [TV (14, 0)] [Export ("playerViewControllerWillStartPictureInPicture:")] void WillStartPictureInPicture (AVPlayerViewController playerViewController); - [NoTV] + [TV (14, 0)] [Export ("playerViewControllerDidStartPictureInPicture:")] void DidStartPictureInPicture (AVPlayerViewController playerViewController); - [NoTV] + [TV (14, 0)] [Export ("playerViewController:failedToStartPictureInPictureWithError:")] void FailedToStartPictureInPicture (AVPlayerViewController playerViewController, NSError error); - [NoTV] + [TV (14, 0)] [Export ("playerViewControllerWillStopPictureInPicture:")] void WillStopPictureInPicture (AVPlayerViewController playerViewController); - [NoTV] + [TV (14, 0)] [Export ("playerViewControllerDidStopPictureInPicture:")] void DidStopPictureInPicture (AVPlayerViewController playerViewController); - [NoTV] + [TV (14, 0)] [Export ("playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart:")] bool ShouldAutomaticallyDismissAtPictureInPictureStart (AVPlayerViewController playerViewController); - [NoTV] + [TV (14, 0)] [Export ("playerViewController:restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:")] void RestoreUserInterfaceForPictureInPicture (AVPlayerViewController playerViewController, Action completionHandler); diff --git a/src/bgen/bgen.csproj b/src/bgen/bgen.csproj index e4194faaa723..4aaa9ece984f 100644 --- a/src/bgen/bgen.csproj +++ b/src/bgen/bgen.csproj @@ -4,7 +4,7 @@ net5.0 Exe - DEBUG;BGENERATOR;NET_4_0;NO_AUTHENTICODE;STATIC;NO_SYMBOL_WRITER + DEBUG;BGENERATOR;NET_4_0;NO_AUTHENTICODE;STATIC;NO_SYMBOL_WRITER;NET diff --git a/src/callkit.cs b/src/callkit.cs index 65a22f5db12e..2063bf1bea06 100644 --- a/src/callkit.cs +++ b/src/callkit.cs @@ -15,7 +15,7 @@ namespace CallKit { - [iOS (10, 0)] + [iOS (10, 0), NoMac] [Introduced (PlatformName.UIKitForMac, 13,0)] [Native] public enum CXCallDirectoryEnabledStatus : long { @@ -24,7 +24,7 @@ public enum CXCallDirectoryEnabledStatus : long { Enabled = 2 } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [ErrorDomain ("CXErrorDomain")] [Native] @@ -34,7 +34,7 @@ public enum CXErrorCode : long { InvalidArgument = 2, } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [ErrorDomain ("CXErrorDomainIncomingCall")] [Native] @@ -46,7 +46,7 @@ public enum CXErrorCodeIncomingCallError : long { FilteredByBlockList = 4 } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [ErrorDomain ("CXErrorDomainRequestTransaction")] [Native] @@ -58,10 +58,10 @@ public enum CXErrorCodeRequestTransactionError : long { UnknownCallUuid = 4, CallUuidAlreadyExists = 5, InvalidAction = 6, - MaximumCallGroupsReached = 7 + MaximumCallGroupsReached = 7, } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [ErrorDomain ("CXErrorDomainCallDirectoryManager")] [Native] @@ -78,16 +78,16 @@ public enum CXErrorCodeCallDirectoryManagerError : long { UnexpectedIncrementalRemoval = 8, } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [Native] public enum CXPlayDtmfCallActionType : long { SingleTone = 1, SoftPause = 2, - HardPause = 3 + HardPause = 3, } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [Native] public enum CXCallEndedReason : long { @@ -95,19 +95,19 @@ public enum CXCallEndedReason : long { RemoteEnded = 2, Unanswered = 3, AnsweredElsewhere = 4, - DeclinedElsewhere = 5 + DeclinedElsewhere = 5, } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [Native] public enum CXHandleType : long { Generic = 1, PhoneNumber = 2, - EmailAddress = 3 + EmailAddress = 3, } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -127,7 +127,7 @@ interface CXHandle : NSCopying, NSSecureCoding { bool IsEqual (CXHandle handle); } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // designated @@ -153,7 +153,7 @@ interface CXAction : NSCopying, NSSecureCoding { void Fail (); } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (CXCallAction))] [DisableDefaultCtor] @@ -167,7 +167,7 @@ interface CXAnswerCallAction { void Fulfill (NSDate dateConnected); } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -192,7 +192,7 @@ interface CXCall { bool IsEqual (CXCall call); } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (CXAction))] [DisableDefaultCtor] @@ -206,7 +206,7 @@ interface CXCallAction { IntPtr Constructor (NSUuid callUuid); } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSObject))] interface CXCallController { @@ -233,7 +233,7 @@ interface CXCallController { void RequestTransaction (CXAction action, Action completion); } - [iOS (10, 0)] + [iOS (10, 0), NoMac] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSExtensionContext))] interface CXCallDirectoryExtensionContext { @@ -274,7 +274,7 @@ interface CXCallDirectoryExtensionContext { interface ICXCallDirectoryExtensionContextDelegate {} - [iOS (10, 0)] + [iOS (10, 0), NoMac] [Introduced (PlatformName.UIKitForMac, 13,0)] [Protocol][Model] [BaseType (typeof (NSObject))] @@ -285,7 +285,7 @@ interface CXCallDirectoryExtensionContextDelegate { void RequestFailed (CXCallDirectoryExtensionContext extensionContext, NSError error); } - [iOS (10, 0)] + [iOS (10, 0), NoMac] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSObject))] interface CXCallDirectoryManager { @@ -310,7 +310,7 @@ interface CXCallDirectoryManager { void OpenSettings ([NullAllowed] Action completion); } - [iOS (10, 0)] + [iOS (10, 0), NoMac] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSObject))] interface CXCallDirectoryProvider : NSExtensionRequestHandling { @@ -319,7 +319,7 @@ interface CXCallDirectoryProvider : NSExtensionRequestHandling { interface ICXCallObserverDelegate { } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -330,7 +330,7 @@ interface CXCallObserverDelegate { void CallChanged (CXCallObserver callObserver, CXCall call); } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSObject))] interface CXCallObserver { @@ -342,7 +342,7 @@ interface CXCallObserver { void SetDelegate ([NullAllowed] ICXCallObserverDelegate aDelegate, [NullAllowed] DispatchQueue queue); } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSObject))] interface CXCallUpdate : NSCopying { @@ -369,7 +369,7 @@ interface CXCallUpdate : NSCopying { bool HasVideo { get; set; } } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [DisableDefaultCtor] [BaseType (typeof (CXCallAction))] @@ -383,7 +383,7 @@ interface CXEndCallAction { void Fulfill (NSDate dateEnded); } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [DisableDefaultCtor] [BaseType (typeof (CXCallAction), Name = "CXPlayDTMFCallAction")] @@ -403,7 +403,7 @@ interface CXPlayDtmfCallAction { interface ICXProviderDelegate { } [Protocol, Model] - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSObject))] interface CXProviderDelegate { @@ -442,11 +442,13 @@ interface CXProviderDelegate { [Export ("provider:timedOutPerformingAction:")] void TimedOutPerformingAction (CXProvider provider, CXAction action); +#if !MONOMAC // Xcode 12 beta 1 issue, AVAudioSession does not appear on Mac OS X but this methods do: https://github.com/xamarin/maccore/issues/2257 [Export ("provider:didActivateAudioSession:")] void DidActivateAudioSession (CXProvider provider, AVAudioSession audioSession); [Export ("provider:didDeactivateAudioSession:")] void DidDeactivateAudioSession (CXProvider provider, AVAudioSession audioSession); +#endif } [iOS (10, 0)] @@ -491,13 +493,15 @@ interface CXProvider { CXCallAction [] GetPendingCallActions (Class callActionClass, NSUuid callUuid); } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CXProviderConfiguration : NSCopying { - [Export ("localizedName")] + [NoMac] // deprecated and was never added to Mac OS X before + [Deprecated (PlatformName.iOS, 14, 0)] + [Export ("localizedName"), NullAllowed] string LocalizedName { get; } [NullAllowed, Export ("ringtoneSound", ArgumentSemantic.Strong)] @@ -523,12 +527,18 @@ interface CXProviderConfiguration : NSCopying { [Export ("supportedHandleTypes", ArgumentSemantic.Copy)] NSSet SupportedHandleTypes { get; set; } - [DesignatedInitializer] + [NoMac] // deprecated and was never added to Mac OS X before + [Deprecated (PlatformName.iOS, 14, 0, message: "Use the default constructor instead.")] [Export ("initWithLocalizedName:")] IntPtr Constructor (string localizedName); + + [iOS (14, 0)] + [DesignatedInitializer] + [Export ("init")] + IntPtr Constructor (); } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (CXCallAction))] [DisableDefaultCtor] @@ -542,7 +552,7 @@ interface CXSetGroupCallAction { NSUuid CallUuidToGroupWith { get; set; } } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [DisableDefaultCtor] [BaseType (typeof (CXCallAction))] @@ -556,7 +566,7 @@ interface CXSetHeldCallAction { bool OnHold { [Bind ("isOnHold")] get; set; } } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (CXCallAction))] [DisableDefaultCtor] @@ -570,7 +580,7 @@ interface CXSetMutedCallAction { bool Muted { [Bind ("isMuted")] get; set; } } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [DisableDefaultCtor] [BaseType (typeof (CXCallAction))] @@ -595,7 +605,7 @@ interface CXStartCallAction { void Fulfill (NSDate dateStarted); } - [iOS (10, 0)] + [iOS (10, 0), Mac (11, 0)] [Introduced (PlatformName.UIKitForMac, 13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // there's a designated initializer that does not accept null diff --git a/src/carplay.cs b/src/carplay.cs index 5dd2a63fe464..fc9fb6156b15 100644 --- a/src/carplay.cs +++ b/src/carplay.cs @@ -1,4 +1,4 @@ -// +// // CarPlay bindings // // Authors: @@ -105,6 +105,65 @@ enum CPTripEstimateStyle : ulong { Dark, } + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Native] + public enum CPBarButtonStyle : long + { + None, + Rounded, + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Native] + public enum CPInformationTemplateLayout : long + { + Leading = 0, + TwoColumn, + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Native] + public enum CPListItemAccessoryType : long + { + None = 0, + DisclosureIndicator, + Cloud, + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Native] + public enum CPListItemPlayingIndicatorLocation : long + { + Leading = 0, + Trailing, + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Native] + public enum CPMessageLeadingItem : long + { + None = 0, + Pin, + Star, + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Native] + public enum CPMessageTrailingItem : long + { + None, + Mute, + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Native] + public enum CPTextButtonStyle : long + { + Normal = 0, + Cancel, + Confirm, + } + [NoWatch, NoTV, NoMac, iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -123,18 +182,21 @@ interface CPAlertAction : NSSecureCoding { Action Handler { get; } } + delegate void CPBarButtonHandler (CPBarButton button); + [NoWatch, NoTV, NoMac, iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPBarButton : NSSecureCoding { + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("initWithType:handler:")] - [DesignatedInitializer] IntPtr Constructor (CPBarButtonType type, [NullAllowed] Action handler); [Export ("enabled")] bool Enabled { [Bind ("isEnabled")] get; set; } + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("buttonType", ArgumentSemantic.Assign)] CPBarButtonType ButtonType { get; } @@ -143,6 +205,18 @@ interface CPBarButton : NSSecureCoding { [NullAllowed, Export ("title")] string Title { get; set; } + + [iOS (14,0)] + [Export ("initWithImage:handler:")] + IntPtr Constructor (UIImage image, [NullAllowed] CPBarButtonHandler handler); + + [iOS (14,0)] + [Export ("initWithTitle:handler:")] + IntPtr Constructor (string title, [NullAllowed] CPBarButtonHandler handler); + + [iOS (14, 0)] + [Export ("buttonStyle", ArgumentSemantic.Assign)] + CPBarButtonStyle ButtonStyle { get; set; } } interface ICPBarButtonProviding { } @@ -217,24 +291,31 @@ interface CPInterfaceController { [Export ("prefersDarkUserInterfaceStyle")] bool PrefersDarkUserInterfaceStyle { get; set; } + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("setRootTemplate:animated:")] void SetRootTemplate (CPTemplate rootTemplate, bool animated); + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("pushTemplate:animated:")] void PushTemplate (CPTemplate templateToPush, bool animated); + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("popTemplateAnimated:")] void PopTemplate (bool animated); + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("popToRootTemplateAnimated:")] void PopToRootTemplate (bool animated); + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("popToTemplate:animated:")] void PopToTemplate (CPTemplate targetTemplate, bool animated); + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("presentTemplate:animated:")] void PresentTemplate (CPTemplate templateToPresent, bool animated); + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("dismissTemplateAnimated:")] void DismissTemplate (bool animated); @@ -250,6 +331,45 @@ interface CPInterfaceController { [Export ("templates", ArgumentSemantic.Strong)] CPTemplate [] Templates { get; } + + [iOS (14, 0)] + [Async] + [Export ("setRootTemplate:animated:completion:")] + void SetRootTemplate (CPTemplate rootTemplate, bool animated, [NullAllowed] Action completion); + + [iOS (14, 0)] + [Async] + [Export ("pushTemplate:animated:completion:")] + void PushTemplate (CPTemplate templateToPush, bool animated, [NullAllowed] Action completion); + + [iOS (14, 0)] + [Async] + [Export ("popTemplateAnimated:completion:")] + void PopTemplate (bool animated, [NullAllowed] Action completion); + + [iOS (14, 0)] + [Async] + [Export ("popToRootTemplateAnimated:completion:")] + void PopToRootTemplate (bool animated, [NullAllowed] Action completion); + + [iOS (14, 0)] + [Async] + [Export ("popToTemplate:animated:completion:")] + void PopToTemplate (CPTemplate targetTemplate, bool animated, [NullAllowed] Action completion); + + [iOS (14, 0)] + [Async] + [Export ("presentTemplate:animated:completion:")] + void PresentTemplate (CPTemplate templateToPresent, bool animated, [NullAllowed] Action completion); + + [iOS (14, 0)] + [Async] + [Export ("dismissTemplateAnimated:completion:")] + void DismissTemplate (bool animated, [NullAllowed] Action completion); + + [iOS (14, 0)] + [Export ("carTraitCollection", ArgumentSemantic.Strong)] + UITraitCollection CarTraitCollection { get; } } interface ICPInterfaceControllerDelegate { } @@ -299,11 +419,13 @@ interface CPApplicationDelegate : UIApplicationDelegate { [NoWatch, NoTV, NoMac, iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface CPListItem : NSSecureCoding { + interface CPListItem : CPSelectableListItem, NSSecureCoding { + [Deprecated (PlatformName.iOS, 14, 0, message: "Do not use; this API was removed.")] [Field ("CPMaximumListItemImageSize")] CGSize MaximumListItemImageSize { get; } + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("initWithText:detailText:image:showsDisclosureIndicator:")] IntPtr Constructor ([NullAllowed] string text, [NullAllowed] string detailText, [NullAllowed] UIImage image, bool showsDisclosureIndicator); @@ -313,8 +435,12 @@ interface CPListItem : NSSecureCoding { [Export ("initWithText:detailText:")] IntPtr Constructor ([NullAllowed] string text, [NullAllowed] string detailText); + [iOS (14, 0)] + [Export ("initWithText:detailText:image:accessoryImage:accessoryType:")] + IntPtr Constructor ([NullAllowed] string text, [NullAllowed] string detailText, [NullAllowed] UIImage image, [NullAllowed] UIImage accessoryImage, CPListItemAccessoryType accessoryType); + [NullAllowed, Export ("text")] - string Text { get; } + new string Text { get; } [NullAllowed, Export ("detailText")] string DetailText { get; } @@ -322,11 +448,61 @@ interface CPListItem : NSSecureCoding { [NullAllowed, Export ("image", ArgumentSemantic.Strong)] UIImage Image { get; } + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("showsDisclosureIndicator")] bool ShowsDisclosureIndicator { get; } [NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)] - NSObject UserInfo { get; set; } + new NSObject UserInfo { get; set; } + + [iOS (14, 0)] + [Export ("explicitContent")] + bool IsExplicitContent { [Bind ("isExplicitContent")] get; set; } + + [iOS (14, 0)] + [Export ("playbackProgress")] + nfloat PlaybackProgress { get; set; } + + [iOS (14, 0)] + [Export ("playing")] + bool IsPlaying { [Bind ("isPlaying")] get; set; } + + [iOS (14, 0)] + [Export ("playingIndicatorLocation", ArgumentSemantic.Assign)] + CPListItemPlayingIndicatorLocation PlayingIndicatorLocation { get; set; } + + [iOS (14, 0)] + [Static] + [Export ("maximumImageSize")] + CGSize MaximumImageSize { get; } + + [iOS (14, 0)] + [Export ("setDetailText:")] + void SetDetailText (string detailText); + + [iOS (14, 0)] + [Export ("setImage:")] + void SetImage (UIImage image); + + [iOS (14, 0)] + [Export ("setAccessoryImage:")] + void SetAccessoryImage (UIImage accessoryImage); + + [iOS (14, 0)] + [Export ("accessoryType", ArgumentSemantic.Assign)] + CPListItemAccessoryType AccessoryType { get; set; } + + [iOS (14, 0)] + [NullAllowed, Export ("accessoryImage", ArgumentSemantic.Strong)] + UIImage AccessoryImage { get; } + + [iOS (14,0)] + [Export ("setText:")] + void SetText (string text); + + [NullAllowed, iOS (14, 0)] + [Export ("handler", ArgumentSemantic.Copy)] + new CPSelectableListItemHandler Handler { get; set; } } [NoWatch, NoTV, NoMac, iOS (12,0)] @@ -348,6 +524,14 @@ interface CPListSection : NSSecureCoding { [Export ("items", ArgumentSemantic.Copy)] CPListItem [] Items { get; } + + [iOS (14,0)] + [Export ("indexOfItem:")] + nuint GetIndex (ICPListTemplateItem item); + + [iOS (14,0)] + [Export ("itemAtIndex:")] + ICPListTemplateItem GetItem (nuint index); } [NoWatch, NoTV, NoMac, iOS (12,0)] @@ -362,6 +546,7 @@ interface CPListTemplate : CPBarButtonProviding { [NullAllowed] ICPListTemplateDelegate Delegate { get; set; } + [Deprecated (PlatformName.iOS, 14, 0)] [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] NSObject WeakDelegate { get; set; } @@ -373,6 +558,37 @@ interface CPListTemplate : CPBarButtonProviding { [Export ("updateSections:")] void UpdateSections (CPListSection [] sections); + + [iOS (14, 0)] + [Static] + [Export ("maximumItemCount")] + nuint MaximumItemCount { get; } + + [iOS (14, 0)] + [Static] + [Export ("maximumSectionCount")] + nuint MaximumSectionCount { get; } + + [iOS (14, 0)] + [Export ("sectionCount")] + nuint SectionCount { get; } + + [iOS (14, 0)] + [Export ("itemCount")] + nuint ItemCount { get; } + + [iOS (14,0)] + [Export ("indexPathForItem:")] + [return: NullAllowed] + NSIndexPath GetIndexPath (ICPListTemplateItem item); + + [iOS (14, 0)] + [Export ("emptyViewTitleVariants", ArgumentSemantic.Copy)] + string[] EmptyViewTitleVariants { get; set; } + + [iOS (14, 0)] + [Export ("emptyViewSubtitleVariants", ArgumentSemantic.Copy)] + string[] EmptyViewSubtitleVariants { get; set; } } interface ICPListTemplateDelegate { } @@ -395,7 +611,8 @@ interface CPManeuver : NSCopying, NSSecureCoding { [Deprecated (PlatformName.iOS, 13,0, message: "Use 'CPManeuver.SymbolImage' instead.")] [NullAllowed, Export ("symbolSet", ArgumentSemantic.Strong)] CPImageSet SymbolSet { get; set; } - + + [iOS (13,0)] [NullAllowed, Export ("symbolImage", ArgumentSemantic.Strong)] UIImage SymbolImage { get; set; } @@ -415,6 +632,37 @@ interface CPManeuver : NSCopying, NSSecureCoding { [iOS (12,2)] [NullAllowed, Export ("junctionImage", ArgumentSemantic.Strong)] UIImage JunctionImage { get; set; } + + [iOS (14, 0)] + [NullAllowed] + [Export ("dashboardSymbolImage", ArgumentSemantic.Strong)] + UIImage DashboardSymbolImage { get; set; } + + [iOS (14, 0)] + [NullAllowed] + [Export ("dashboardJunctionImage", ArgumentSemantic.Strong)] + UIImage DashboardJunctionImage { get; set; } + + [iOS (14, 0)] + [Export ("dashboardInstructionVariants", ArgumentSemantic.Copy)] + string[] DashboardInstructionVariants { get; set; } + + [iOS (14, 0)] + [Export ("dashboardAttributedInstructionVariants", ArgumentSemantic.Copy)] + NSAttributedString[] DashboardAttributedInstructionVariants { get; set; } + + [iOS (14, 0)] + [NullAllowed] + [Export ("notificationSymbolImage", ArgumentSemantic.Strong)] + UIImage NotificationSymbolImage { get; set; } + + [iOS (14, 0)] + [Export ("notificationInstructionVariants", ArgumentSemantic.Copy)] + string[] NotificationInstructionVariants { get; set; } + + [iOS (14, 0)] + [Export ("notificationAttributedInstructionVariants", ArgumentSemantic.Copy)] + NSAttributedString[] NotificationAttributedInstructionVariants { get; set; } } [NoWatch, NoTV, NoMac, iOS (12,0)] @@ -502,6 +750,10 @@ interface CPMapTemplate : CPBarButtonProviding { [Async] [Export ("dismissNavigationAlertAnimated:completion:")] void DismissNavigationAlert (bool animated, Action completion); + + [iOS (14,0)] + [Export ("showTripPreviews:selectedTrip:textConfiguration:")] + void ShowTripPreviews (CPTrip[] tripPreviews, [NullAllowed] CPTrip selectedTrip, [NullAllowed] CPTripPreviewTextConfiguration textConfiguration); } interface ICPMapTemplateDelegate { } @@ -715,6 +967,24 @@ interface CPSessionConfigurationDelegate { interface CPTemplate : NSSecureCoding { [NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)] NSObject UserInfo { get; set; } + + [iOS (14, 0)] + [NullAllowed] + [Export ("tabTitle")] + string TabTitle { get; set; } + + [iOS (14, 0)] + [NullAllowed] + [Export ("tabImage", ArgumentSemantic.Strong)] + UIImage TabImage { get; set; } + + [iOS (14, 0)] + [Export ("tabSystemItem", ArgumentSemantic.Assign)] + UITabBarSystemItem TabSystemItem { get; set; } + + [iOS (14, 0)] + [Export ("showsTabBadge")] + bool ShowsTabBadge { get; set; } } [NoWatch, NoTV, NoMac, iOS (12,0)] @@ -834,6 +1104,14 @@ interface CPTemplateApplicationSceneDelegate : UISceneDelegate [Export ("templateApplicationScene:didSelectManeuver:")] void DidSelect (CPTemplateApplicationScene templateApplicationScene, CPManeuver maneuver); + + [iOS (14,0)] + [Export ("templateApplicationScene:didConnectInterfaceController:")] + void DidConnect (CPTemplateApplicationScene templateApplicationScene, CPInterfaceController interfaceController); + + [iOS (14,0)] + [Export ("templateApplicationScene:didDisconnectInterfaceController:")] + void DidDisconnect (CPTemplateApplicationScene templateApplicationScene, CPInterfaceController interfaceController); } [NoWatch, NoTV, NoMac, iOS (13,0)] @@ -940,6 +1218,11 @@ interface CPAlertTemplate { [Export ("actions", ArgumentSemantic.Strong)] CPAlertAction [] Actions { get; } + + [iOS (14, 0)] + [Static] + [Export ("maximumActionCount")] + nuint MaximumActionCount { get; } } [NoWatch, NoTV, NoMac, iOS (13,4)] @@ -1008,4 +1291,552 @@ interface CPTemplateApplicationDashboardScene { [Export ("dashboardWindow", ArgumentSemantic.Strong)] UIWindow DashboardWindow { get; } } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface CPButton + { + [Export ("initWithImage:handler:")] + [DesignatedInitializer] + IntPtr Constructor (UIImage image, [NullAllowed] Action handler); + + [NullAllowed, Export ("image", ArgumentSemantic.Copy)] + UIImage Image { get; } + + [NullAllowed, Export ("title")] + string Title { get; set; } + + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; set; } + + [Field ("CPButtonMaximumImageSize")] + CGSize MaximumImageSize { get; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + interface CPContact : NSSecureCoding + { + [Export ("initWithName:image:")] + IntPtr Constructor (string name, UIImage image); + + [Export ("name")] + string Name { get; set; } + + [Export ("image", ArgumentSemantic.Strong)] + UIImage Image { get; set; } + + [NullAllowed, Export ("actions", ArgumentSemantic.Copy)] + CPButton[] Actions { get; set; } + + [NullAllowed, Export ("subtitle")] + string Subtitle { get; set; } + + [NullAllowed, Export ("informativeText")] + string InformativeText { get; set; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPButton))] + [DisableDefaultCtor] + interface CPContactCallButton + { + [Export ("initWithImage:handler:")] + [DesignatedInitializer] + IntPtr Constructor (UIImage image, [NullAllowed] Action handler); + + [Export ("initWithHandler:")] + IntPtr Constructor ([NullAllowed] Action handler); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPButton))] + [DisableDefaultCtor] + interface CPContactDirectionsButton + { + [Export ("initWithImage:handler:")] + [DesignatedInitializer] + IntPtr Constructor (UIImage image, [NullAllowed] Action handler); + + [Export ("initWithHandler:")] + IntPtr Constructor ([NullAllowed] Action handler); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPTemplate))] + [DisableDefaultCtor] + interface CPContactTemplate : CPBarButtonProviding + { + [Export ("initWithContact:")] + [DesignatedInitializer] + IntPtr Constructor (CPContact contact); + + [Export ("contact", ArgumentSemantic.Strong)] + CPContact Contact { get; set; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface CPInformationItem : NSSecureCoding + { + [Export ("initWithTitle:detail:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] string title, [NullAllowed] string detail); + + [NullAllowed, Export ("title")] + string Title { get; } + + [NullAllowed, Export ("detail")] + string Detail { get; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPTemplate))] + [DisableDefaultCtor] + interface CPInformationTemplate + { + [Export ("initWithTitle:layout:items:actions:")] + [DesignatedInitializer] + IntPtr Constructor (string title, CPInformationTemplateLayout layout, CPInformationItem[] items, CPTextButton[] actions); + + [Export ("layout")] + CPInformationTemplateLayout Layout { get; } + + [Export ("title")] + string Title { get; set; } + + [Export ("items", ArgumentSemantic.Copy)] + CPInformationItem[] Items { get; set; } + + [Export ("actions", ArgumentSemantic.Copy)] + CPTextButton[] Actions { get; set; } + } + + delegate void CPListImageRowItemHandler (CPListImageRowItem item, nint index, [BlockCallback] Action completionBlock); + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface CPListImageRowItem : CPSelectableListItem + { + [Export ("initWithText:images:")] + IntPtr Constructor (string text, UIImage[] images); + + [Export ("gridImages", ArgumentSemantic.Strong)] + UIImage[] GridImages { get; } + + [Export ("updateImages:")] + void UpdateImages (UIImage[] gridImages); + + [NullAllowed, Export ("listImageRowHandler", ArgumentSemantic.Copy)] + CPListImageRowItemHandler ListImageRowHandler { get; set; } + + [Export ("handler", ArgumentSemantic.Copy)] + [NullAllowed] + new CPSelectableListItemHandler Handler { get; set; } + + [Static] + [Export ("maximumImageSize")] + CGSize MaximumImageSize { get; } + + [Field ("CPMaximumNumberOfGridImages")] + nuint MaximumNumberOfGridImages { get; } + + [NullAllowed, Export ("text")] + new string Text { get; set; } + + [NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)] + new NSObject UserInfo { get; set; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface CPTextButton + { + [Export ("initWithTitle:textStyle:handler:")] + [DesignatedInitializer] + IntPtr Constructor (string title, CPTextButtonStyle textStyle, [NullAllowed] Action handler); + + [Export ("title")] + string Title { get; set; } + + [Export ("textStyle", ArgumentSemantic.Assign)] + CPTextButtonStyle TextStyle { get; set; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPBarButton))] + interface CPMessageComposeBarButton + { + [Static] + [Export ("new")] + [return: Release] + CPMessageComposeBarButton Create (); + + [Export ("initWithImage:")] + IntPtr Constructor (UIImage image); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + interface CPMessageListItem : CPListTemplateItem + { + [Internal] + [Export ("initWithConversationIdentifier:text:leadingConfiguration:trailingConfiguration:detailText:trailingText:")] + IntPtr InitWithConversationIdentifier (string conversationIdentifier, string text, CPMessageListItemLeadingConfiguration leadingConfiguration, [NullAllowed] CPMessageListItemTrailingConfiguration trailingConfiguration, [NullAllowed] string detailText, [NullAllowed] string trailingText); + + [Internal] + [Export ("initWithFullName:phoneOrEmailAddress:leadingConfiguration:trailingConfiguration:detailText:trailingText:")] + IntPtr InitWithFullName (string fullName, string phoneOrEmailAddress, CPMessageListItemLeadingConfiguration leadingConfiguration, [NullAllowed] CPMessageListItemTrailingConfiguration trailingConfiguration, [NullAllowed] string detailText, [NullAllowed] string trailingText); + + [NullAllowed, Export ("conversationIdentifier")] + string ConversationIdentifier { get; set; } + + [NullAllowed, Export ("phoneOrEmailAddress")] + string PhoneOrEmailAddress { get; set; } + + [Export ("leadingConfiguration", ArgumentSemantic.Strong)] + CPMessageListItemLeadingConfiguration LeadingConfiguration { get; set; } + + [NullAllowed, Export ("trailingConfiguration", ArgumentSemantic.Strong)] + CPMessageListItemTrailingConfiguration TrailingConfiguration { get; set; } + + [NullAllowed, Export ("detailText")] + string DetailText { get; set; } + + [NullAllowed, Export ("trailingText")] + string TrailingText { get; set; } + + [Field ("CPMaximumMessageItemImageSize")] + CGSize MaximumMessageItemImageSize { get; } + + [NullAllowed, Export ("text")] + new string Text { get; set; } + + [NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)] + new NSObject UserInfo { get; set; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface CPMessageListItemLeadingConfiguration + { + [Export ("unread")] + bool Unread { [Bind ("isUnread")] get; } + + [Export ("leadingItem")] + CPMessageLeadingItem LeadingItem { get; } + + [NullAllowed, Export ("leadingImage")] + UIImage LeadingImage { get; } + + [Export ("initWithLeadingItem:leadingImage:unread:")] + IntPtr Constructor (CPMessageLeadingItem leadingItem, [NullAllowed] UIImage leadingImage, bool unread); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface CPMessageListItemTrailingConfiguration + { + [Export ("trailingItem")] + CPMessageTrailingItem TrailingItem { get; } + + [NullAllowed, Export ("trailingImage")] + UIImage TrailingImage { get; } + + [Export ("initWithTrailingItem:trailingImage:")] + IntPtr Constructor (CPMessageTrailingItem trailingItem, [NullAllowed] UIImage trailingImage); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface CPNowPlayingButton : NSSecureCoding + { + [Export ("initWithHandler:")] + IntPtr Constructor ([NullAllowed] Action handler); + + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; set; } + + [Export ("selected")] + bool Selected { [Bind ("isSelected")] get; set; } + + [Field ("CPNowPlayingButtonMaximumImageSize")] + CGSize MaximumImageSize { get; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPNowPlayingButton))] + [DisableDefaultCtor] + interface CPNowPlayingImageButton + { + [Export ("initWithImage:handler:")] + IntPtr Constructor (UIImage image, [NullAllowed] Action handler); + + [NullAllowed, Export ("image", ArgumentSemantic.Strong)] + UIImage Image { get; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface CPPointOfInterest : NSSecureCoding + { + [Export ("initWithLocation:title:subtitle:summary:detailTitle:detailSubtitle:detailSummary:pinImage:")] + [DesignatedInitializer] + IntPtr Constructor (MKMapItem location, string title, [NullAllowed] string subtitle, [NullAllowed] string summary, [NullAllowed] string detailTitle, [NullAllowed] string detailSubtitle, [NullAllowed] string detailSummary, [NullAllowed] UIImage pinImage); + + [Export ("location", ArgumentSemantic.Strong)] + MKMapItem Location { get; set; } + + [Export ("title")] + string Title { get; set; } + + [NullAllowed, Export ("subtitle")] + string Subtitle { get; set; } + + [NullAllowed, Export ("summary")] + string Summary { get; set; } + + [NullAllowed, Export ("detailTitle")] + string DetailTitle { get; set; } + + [NullAllowed, Export ("detailSubtitle")] + string DetailSubtitle { get; set; } + + [NullAllowed, Export ("detailSummary")] + string DetailSummary { get; set; } + + [NullAllowed, Export ("pinImage", ArgumentSemantic.Strong)] + UIImage PinImage { get; set; } + + [NullAllowed, Export ("primaryButton", ArgumentSemantic.Strong)] + CPTextButton PrimaryButton { get; set; } + + [NullAllowed, Export ("secondaryButton", ArgumentSemantic.Strong)] + CPTextButton SecondaryButton { get; set; } + + [NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)] + NSObject UserInfo { get; set; } + } + + interface ICPPointOfInterestTemplateDelegate { } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof(NSObject))] + interface CPPointOfInterestTemplateDelegate + { + [Abstract] + [Export ("pointOfInterestTemplate:didChangeMapRegion:")] + void DidChangeMapRegion (CPPointOfInterestTemplate pointOfInterestTemplate, MKCoordinateRegion region); + + [Export ("pointOfInterestTemplate:didSelectPointOfInterest:")] + void DidSelectPointOfInterest (CPPointOfInterestTemplate pointOfInterestTemplate, CPPointOfInterest pointOfInterest); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPTemplate))] + [DisableDefaultCtor] + interface CPPointOfInterestTemplate + { + [Export ("initWithTitle:pointsOfInterest:selectedIndex:")] + [DesignatedInitializer] + IntPtr Constructor (string title, CPPointOfInterest[] pointsOfInterest, nint selectedIndex); + + [Export ("title")] + string Title { get; set; } + + [Export ("setPointsOfInterest:selectedIndex:")] + void SetPointsOfInterest (CPPointOfInterest[] pointsOfInterest, nint selectedIndex); + + [Export ("pointsOfInterest")] + CPPointOfInterest[] PointsOfInterest { get; } + + [Export ("selectedIndex")] + nint SelectedIndex { get; set; } + + [Wrap ("WeakPointOfInterestDelegate")] + [NullAllowed] + ICPPointOfInterestTemplateDelegate PointOfInterestDelegate { get; set; } + + [NullAllowed, Export ("pointOfInterestDelegate", ArgumentSemantic.Weak)] + NSObject WeakPointOfInterestDelegate { get; set; } + } + + interface ICPTabBarTemplateDelegate { } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface CPTabBarTemplateDelegate + { + [Abstract] + [Export ("tabBarTemplate:didSelectTemplate:")] + void DidSelectTemplate (CPTabBarTemplate tabBarTemplate, CPTemplate selectedTemplate); + } + + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPTemplate))] + [DisableDefaultCtor] + interface CPTabBarTemplate + { + [Export ("initWithTemplates:")] + IntPtr Constructor (CPTemplate[] templates); + + [Wrap ("WeakDelegate")] + [NullAllowed] + ICPTabBarTemplateDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [Static] + [Export ("maximumTabCount")] + nuint MaximumTabCount { get; } + + [Export ("templates", ArgumentSemantic.Strong)] + CPTemplate[] Templates { get; } + + [NullAllowed, Export ("selectedTemplate", ArgumentSemantic.Strong)] + CPTemplate SelectedTemplate { get; } + + [Export ("updateTemplates:")] + void UpdateTemplates (CPTemplate[] newTemplates); + } + + interface ICPNowPlayingTemplateObserver { } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Protocol] + interface CPNowPlayingTemplateObserver + { + [Export ("nowPlayingTemplateUpNextButtonTapped:")] + void UpNextButtonTapped (CPNowPlayingTemplate nowPlayingTemplate); + + [Export ("nowPlayingTemplateAlbumArtistButtonTapped:")] + void AlbumArtistButtonTapped (CPNowPlayingTemplate nowPlayingTemplate); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPTemplate))] + [DisableDefaultCtor] + interface CPNowPlayingTemplate + { + [Static] + [Export ("sharedTemplate", ArgumentSemantic.Strong)] + CPNowPlayingTemplate SharedTemplate { get; } + + [Export ("addObserver:")] + void AddObserver (ICPNowPlayingTemplateObserver observer); + + [Export ("removeObserver:")] + void RemoveObserver (ICPNowPlayingTemplateObserver observer); + + [Export ("nowPlayingButtons", ArgumentSemantic.Strong)] + CPNowPlayingButton[] NowPlayingButtons { get; } + + [Export ("upNextButtonEnabled")] + bool IsUpNextButtonEnabled { [Bind ("isUpNextButtonEnabled")] get; set; } + + [Export ("upNextTitle")] + string UpNextTitle { get; set; } + + [Export ("albumArtistButtonEnabled")] + bool IsAlbumArtistButtonEnabled { [Bind ("isAlbumArtistButtonEnabled")] get; set; } + + [Export ("updateNowPlayingButtons:")] + void UpdateNowPlayingButtons (CPNowPlayingButton[] nowPlayingButtons); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPButton))] + [DisableDefaultCtor] + interface CPContactMessageButton + { + [Export ("initWithImage:handler:")] + [DesignatedInitializer] + IntPtr Constructor (UIImage image, [NullAllowed] Action handler); + + [Export ("initWithPhoneOrEmail:")] + IntPtr Constructor (string phoneOrEmail); + + [Export ("phoneOrEmail")] + string PhoneOrEmail { get; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + interface CPEntity : NSSecureCoding {} + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPNowPlayingButton))] + interface CPNowPlayingShuffleButton {} + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPNowPlayingButton))] + interface CPNowPlayingAddToLibraryButton {} + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPNowPlayingButton))] + interface CPNowPlayingMoreButton {} + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPNowPlayingButton))] + interface CPNowPlayingPlaybackRateButton {} + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPNowPlayingButton))] + interface CPNowPlayingRepeatButton {} + + interface ICPListTemplateItem { } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Protocol] + interface CPListTemplateItem + { + [Abstract] + [NullAllowed, Export ("text")] + string Text { get; } + + [Abstract] + [NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)] + NSObject UserInfo { get; set; } + } + + interface ICPSelectableListItem { } + + delegate void CPSelectableListItemHandler (ICPSelectableListItem item, [BlockCallback] Action completionBlock); + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Protocol] + interface CPSelectableListItem : CPListTemplateItem + { + [Abstract] + [NullAllowed, Export ("handler", ArgumentSemantic.Copy)] + CPSelectableListItemHandler Handler { get; set; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (CPInformationItem))] + [DisableDefaultCtor] + interface CPInformationRatingItem + { + [Export ("initWithRating:maximumRating:title:detail:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] NSNumber rating, [NullAllowed] NSNumber maximumRating, [NullAllowed] string title, [NullAllowed] string detail); + + [NullAllowed, Export ("rating")] + NSNumber Rating { get; } + + [NullAllowed, Export ("maximumRating")] + NSNumber MaximumRating { get; } + } } diff --git a/src/cfnetwork.cs b/src/cfnetwork.cs index e77ee57271d3..36578a40c606 100644 --- a/src/cfnetwork.cs +++ b/src/cfnetwork.cs @@ -58,14 +58,18 @@ interface CFHTTPStream { interface CFHTTPMessage { [Internal][Field ("kCFHTTPVersion1_0", "CFNetwork")] - NSString _HTTPVersion1_0 { get; } + IntPtr _HTTPVersion1_0 { get; } [Internal][Field ("kCFHTTPVersion1_1", "CFNetwork")] - NSString _HTTPVersion1_1 { get; } + IntPtr _HTTPVersion1_1 { get; } [Mac (10,11)][iOS (9,0)] [Internal][Field ("kCFHTTPVersion2_0", "CFNetwork")] - NSString _HTTPVersion2_0 { get; } + IntPtr _HTTPVersion2_0 { get; } + + [Mac (11, 0), iOS (14,0), TV (14, 0)] + [Internal][Field ("kCFHTTPVersion3_0", "CFNetwork")] + IntPtr _HTTPVersion3_0 { get; } [Internal][Field ("kCFHTTPAuthenticationSchemeBasic", "CFNetwork")] IntPtr _AuthenticationSchemeBasic { get; } diff --git a/src/classkit.cs b/src/classkit.cs index c126bb4983d1..a16feae3d453 100644 --- a/src/classkit.cs +++ b/src/classkit.cs @@ -15,7 +15,8 @@ namespace ClassKit { - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [Native] enum CLSBinaryValueType : long { TrueFalse = 0, @@ -25,7 +26,8 @@ enum CLSBinaryValueType : long { CorrectIncorrect, } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [Native] enum CLSContextType : long { None = 0, @@ -50,7 +52,8 @@ enum CLSContextType : long { Custom, } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [Native] [ErrorDomain ("CLSErrorCodeDomain")] public enum CLSErrorCode : long { @@ -66,7 +69,9 @@ public enum CLSErrorCode : long { PartialFailure, } - [NoWatch, NoTV, NoMac, iOS (11,4)] + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] enum CLSContextTopic { [Field ("CLSContextTopicMath")] Math, @@ -86,7 +91,20 @@ enum CLSContextTopic { HealthAndFitness, } - [NoWatch, NoTV, NoMac, iOS (11,4)] + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (14, 0)] + [Native] + public enum CLSProgressReportingCapabilityKind : long { + Duration = 0, + Percent, + Binary, + Quantity, + Score, + } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [Static] interface CLSErrorUserInfoKeys { @@ -97,7 +115,8 @@ interface CLSErrorUserInfoKeys { NSString UnderlyingErrorsKey { get; } } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [Static] interface CLSPredicateKeyPath { [Field ("CLSPredicateKeyPathDateCreated")] @@ -119,7 +138,8 @@ interface CLSPredicateKeyPath { NSString Parent { get; } } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLSObject : NSSecureCoding { @@ -131,7 +151,8 @@ interface CLSObject : NSSecureCoding { NSDate DateLastModified { get; } } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [BaseType (typeof (CLSObject))] [DisableDefaultCtor] interface CLSActivity { @@ -167,7 +188,8 @@ interface CLSActivity { void Stop (); } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [BaseType (typeof (CLSObject))] [DisableDefaultCtor] interface CLSActivityItem { @@ -179,7 +201,8 @@ interface CLSActivityItem { string Identifier { get; } } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [BaseType (typeof (CLSActivityItem))] [DisableDefaultCtor] interface CLSBinaryItem { @@ -195,7 +218,8 @@ interface CLSBinaryItem { IntPtr Constructor (string identifier, string title, CLSBinaryValueType valueType); } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [BaseType (typeof (CLSObject))] [DisableDefaultCtor] interface CLSContext { @@ -232,7 +256,7 @@ interface CLSContext { CGImage Thumbnail { get; set; } [Protected] - [NullAllowed, Export ("topic")] + [NullAllowed, Export ("topic", ArgumentSemantic.Copy)] NSString WeakTopic { get; set; } [Export ("initWithType:identifier:title:")] @@ -248,6 +272,41 @@ interface CLSContext { [Export ("resignActive")] void ResignActive (); + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (14, 0)] + [Export ("assignable")] + bool Assignable { [Bind ("isAssignable")] get; set; } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (14, 0)] + [Export ("suggestedAge", ArgumentSemantic.Assign)] + NSRange SuggestedAge { get; set; } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (14, 0)] + [Export ("suggestedCompletionTime", ArgumentSemantic.Assign)] + NSRange SuggestedCompletionTime { get; set; } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (14, 0)] + [Export ("progressReportingCapabilities", ArgumentSemantic.Copy)] + NSSet ProgressReportingCapabilities { get; } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (14, 0)] + [Export ("setType:")] + void SetType (CLSContextType type); + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (14, 0)] + [Export ("addProgressReportingCapabilities:")] + void AddProgressReportingCapabilities (NSSet capabilities); + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (14, 0)] + [Export ("resetProgressReportingCapabilities")] + void ResetProgressReportingCapabilities (); + // From CLSContext (Hierarchy) Category [NullAllowed, Export ("parent")] @@ -274,7 +333,8 @@ interface CLSContext { interface ICLSDataStoreDelegate { } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [Protocol, Model] [BaseType (typeof (NSObject))] interface CLSDataStoreDelegate { @@ -285,7 +345,8 @@ interface CLSDataStoreDelegate { CLSContext CreateContext (string identifier, CLSContext parentContext, string [] parentIdentifierPath); } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLSDataStore { @@ -332,7 +393,8 @@ interface CLSDataStore { void Remove (CLSContext context); } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [BaseType (typeof (CLSActivityItem))] [DisableDefaultCtor] interface CLSQuantityItem { @@ -345,7 +407,8 @@ interface CLSQuantityItem { IntPtr Constructor (string identifier, string title); } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,4)] [BaseType (typeof (CLSActivityItem))] [DisableDefaultCtor] interface CLSScoreItem { @@ -361,11 +424,29 @@ interface CLSScoreItem { IntPtr Constructor (string identifier, string title, double score, double maxScore); } - [NoWatch, NoTV, NoMac, iOS (12,2)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (12,2)] [Protocol] interface CLSContextProvider { [Abstract] [Export ("updateDescendantsOfContext:completion:")] void UpdateDescendants (CLSContext context, Action completion); } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11,0), iOS (14,0)] + [BaseType (typeof (CLSObject))] + [DisableDefaultCtor] + interface CLSProgressReportingCapability { + [Export ("kind", ArgumentSemantic.Assign)] + CLSProgressReportingCapabilityKind Kind { get; } + + [NullAllowed] + [Export ("details")] + string Details { get; } + + [Export ("initWithKind:details:")] + IntPtr Constructor (CLSProgressReportingCapabilityKind kind, string details); + } + } diff --git a/src/clockkit.cs b/src/clockkit.cs index 65fe8d308811..f650ed608fe4 100644 --- a/src/clockkit.cs +++ b/src/clockkit.cs @@ -1,4 +1,4 @@ -// +// // ClockKit bindings // // Authors: @@ -13,12 +13,38 @@ using UIKit; namespace ClockKit { + + [Watch (7,0)] + [ErrorDomain ("CLKWatchFaceLibraryErrorDomain")] + [Native] + public enum CLKWatchFaceLibraryErrorCode : long { + NotFileUrl = 1, + InvalidFile = 2, + PermissionDenied = 3, + FaceNotAvailable = 4, + } [BaseType (typeof (NSObject))] interface CLKComplication : NSCopying { [Export ("family")] CLKComplicationFamily Family { get; } + + [Watch (7, 0)] + [Export ("identifier")] + string Identifier { get; } + + [Watch (7, 0)] + [Export ("userInfo"), NullAllowed] + NSDictionary UserInfo { get; } + + [Watch (7, 0)] + [Export ("userActivity"), NullAllowed] + NSUserActivity UserActivity { get; } + + [Watch (7, 0)] + [Field ("CLKDefaultComplicationIdentifier")] + NSString DefaultComplicationIdentifier { get; } } interface ICLKComplicationDataSource { } @@ -28,9 +54,11 @@ interface ICLKComplicationDataSource { } interface CLKComplicationDataSource { [Abstract] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'CLKComplicationDataSource.GetTimelineEndDate' instead.")] [Export ("getSupportedTimeTravelDirectionsForComplication:withHandler:")] void GetSupportedTimeTravelDirections (CLKComplication complication, Action handler); + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Backwards extension and time travel are not longer supported.")] [Export ("getTimelineStartDateForComplication:withHandler:")] void GetTimelineStartDate (CLKComplication complication, Action handler); @@ -51,6 +79,7 @@ interface CLKComplicationDataSource { [Export ("getCurrentTimelineEntryForComplication:withHandler:")] void GetCurrentTimelineEntry (CLKComplication complication, Action handler); + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Backwards extension and time travel are not longer supported.")] [Export ("getTimelineEntriesForComplication:beforeDate:limit:withHandler:")] void GetTimelineEntriesBeforeDate (CLKComplication complication, NSDate beforeDate, nuint limit, Action handler); @@ -77,6 +106,14 @@ interface CLKComplicationDataSource { [Watch (3,0)] [Export ("getLocalizableSampleTemplateForComplication:withHandler:")] void GetLocalizableSampleTemplate (CLKComplication complication, Action handler); + + [Watch (7, 0)] + [Export ("getComplicationDescriptorsWithHandler:")] + void GetComplicationDescriptors (Action handler); + + [Watch (7, 0)] + [Export ("handleSharedComplicationDescriptors:")] + void HandleSharedComplicationDescriptors (CLKComplicationDescriptor[] complicationDescriptors); } [BaseType (typeof (NSObject))] @@ -94,9 +131,11 @@ interface CLKComplicationServer { [Export ("activeComplications"), NullAllowed] CLKComplication [] ActiveComplications { get; } + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Backwards extension and time travel is not longer supported.")] [Export ("earliestTimeTravelDate")] NSDate EarliestTimeTravelDate { get; } + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Backwards extension and time travel is not longer supported.")] [Export ("latestTimeTravelDate")] NSDate LatestTimeTravelDate { get; } @@ -105,13 +144,22 @@ interface CLKComplicationServer { [Export ("extendTimelineForComplication:")] void ExtendTimeline (CLKComplication complication); + + [Watch (7, 0)] + [Export ("reloadComplicationDescriptors")] + void ReloadComplicationDescriptors (); } [BaseType (typeof (NSObject))] + [DisableDefaultCtor] interface CLKComplicationTemplate : NSCopying { [NullAllowed, Export ("tintColor", ArgumentSemantic.Copy)] UIColor TintColor { get; set; } + + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use the provided factories instead.")] + [Export ("init")] + IntPtr Constructor (); } [BaseType (typeof (CLKComplicationTemplate))] @@ -119,6 +167,15 @@ interface CLKComplicationTemplateModularSmallSimpleText { [Export ("textProvider", ArgumentSemantic.Copy)] CLKTextProvider TextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithTextProvider:")] + IntPtr Constructor (CLKTextProvider textProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:")] + CLKComplicationTemplateModularSmallSimpleText Create (CLKTextProvider textProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -126,6 +183,15 @@ interface CLKComplicationTemplateModularSmallSimpleImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithImageProvider:")] + IntPtr Constructor (CLKImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithImageProvider:")] + CLKComplicationTemplateModularSmallSimpleImage Create (CLKImageProvider imageProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -139,6 +205,15 @@ interface CLKComplicationTemplateModularSmallRingText { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } + + [Watch (7, 0)] + [Export ("initWithTextProvider:fillFraction:ringStyle:")] + IntPtr Constructor (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:fillFraction:ringStyle:")] + CLKComplicationTemplateModularSmallRingText Create (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } [BaseType (typeof (CLKComplicationTemplate))] @@ -152,6 +227,15 @@ interface CLKComplicationTemplateModularSmallRingImage { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } + + [Watch (7, 0)] + [Export ("initWithImageProvider:fillFraction:ringStyle:")] + IntPtr Constructor (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); + + [Watch (7, 0)] + [Static] + [Export ("templateWithImageProvider:fillFraction:ringStyle:")] + CLKComplicationTemplateModularSmallRingImage Create (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } [BaseType (typeof (CLKComplicationTemplate))] @@ -165,6 +249,15 @@ interface CLKComplicationTemplateModularSmallStackText { [Export ("highlightLine2")] bool HighlightLine2 { get; set; } + + [Watch (7, 0)] + [Export ("initWithLine1TextProvider:line2TextProvider:")] + IntPtr Constructor (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithLine1TextProvider:line2TextProvider:")] + CLKComplicationTemplateModularSmallStackText Create (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -178,6 +271,15 @@ interface CLKComplicationTemplateModularSmallStackImage { [Export ("highlightLine2")] bool HighlightLine2 { get; set; } + + [Watch (7, 0)] + [Export ("initWithLine1ImageProvider:line2TextProvider:")] + IntPtr Constructor (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithLine1ImageProvider:line2TextProvider:")] + CLKComplicationTemplateModularSmallStackImage Create (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -200,6 +302,15 @@ interface CLKComplicationTemplateModularSmallColumnsText { [Export ("highlightColumn2")] bool HighlightColumn2 { get; set; } + + [Watch (7, 0)] + [Export ("initWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] + IntPtr Constructor (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] + CLKComplicationTemplateModularSmallColumnsText Create (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -218,6 +329,42 @@ interface CLKComplicationTemplateModularLargeStandardBody { [NullAllowed] [Export ("headerImageProvider", ArgumentSemantic.Copy)] CLKImageProvider HeaderImageProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithHeaderTextProvider:body1TextProvider:")] + IntPtr Constructor (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); + + [Watch (7, 0)] + [Export ("initWithHeaderTextProvider:body1TextProvider:body2TextProvider:")] + IntPtr Constructor (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); + + [Watch (7, 0)] + [Export ("initWithHeaderImageProvider:headerTextProvider:body1TextProvider:")] + IntPtr Constructor ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); + + [Watch (7, 0)] + [Export ("initWithHeaderImageProvider:headerTextProvider:body1TextProvider:body2TextProvider:")] + IntPtr Constructor ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderTextProvider:body1TextProvider:")] + CLKComplicationTemplateModularLargeStandardBody Create (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderTextProvider:body1TextProvider:body2TextProvider:")] + CLKComplicationTemplateModularLargeStandardBody Create (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderImageProvider:headerTextProvider:body1TextProvider:")] + CLKComplicationTemplateModularLargeStandardBody Create ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderImageProvider:headerTextProvider:body1TextProvider:body2TextProvider:")] + CLKComplicationTemplateModularLargeStandardBody Create ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -228,6 +375,15 @@ interface CLKComplicationTemplateModularLargeTallBody { [Export ("bodyTextProvider", ArgumentSemantic.Copy)] CLKTextProvider BodyTextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithHeaderTextProvider:bodyTextProvider:")] + IntPtr Constructor (CLKTextProvider headerTextProvider, CLKTextProvider bodyTextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderTextProvider:bodyTextProvider:")] + CLKComplicationTemplateModularLargeTallBody Create (CLKTextProvider headerTextProvider, CLKTextProvider bodyTextProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -254,6 +410,24 @@ interface CLKComplicationTemplateModularLargeTable { [Export ("column2Alignment")] CLKComplicationColumnAlignment Column2Alignment { get; set; } + + [Watch (7, 0)] + [Export ("initWithHeaderTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] + IntPtr Constructor (CLKTextProvider headerTextProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); + + [Watch (7, 0)] + [Export ("initWithHeaderImageProvider:headerTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] + IntPtr Constructor ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] + CLKComplicationTemplateModularLargeTable Create (CLKTextProvider headerTextProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderImageProvider:headerTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] + CLKComplicationTemplateModularLargeTable Create ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -291,6 +465,24 @@ interface CLKComplicationTemplateModularLargeColumns { [Export ("column2Alignment")] CLKComplicationColumnAlignment Column2Alignment { get; set; } + + [Watch (7, 0)] + [Export ("initWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:row3Column1TextProvider:row3Column2TextProvider:")] + IntPtr Constructor (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider, CLKTextProvider row3Column1TextProvider, CLKTextProvider row3Column2TextProvider); + + [Watch (7, 0)] + [Export ("initWithRow1ImageProvider:row1Column1TextProvider:row1Column2TextProvider:row2ImageProvider:row2Column1TextProvider:row2Column2TextProvider:row3ImageProvider:row3Column1TextProvider:row3Column2TextProvider:")] + IntPtr Constructor ([NullAllowed] CLKImageProvider row1ImageProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, [NullAllowed] CLKImageProvider row2ImageProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider, [NullAllowed] CLKImageProvider row3ImageProvider, CLKTextProvider row3Column1TextProvider, CLKTextProvider row3Column2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:row3Column1TextProvider:row3Column2TextProvider:")] + CLKComplicationTemplateModularLargeColumns Create (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider, CLKTextProvider row3Column1TextProvider, CLKTextProvider row3Column2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithRow1ImageProvider:row1Column1TextProvider:row1Column2TextProvider:row2ImageProvider:row2Column1TextProvider:row2Column2TextProvider:row3ImageProvider:row3Column1TextProvider:row3Column2TextProvider:")] + CLKComplicationTemplateModularLargeColumns Create ([NullAllowed] CLKImageProvider row1ImageProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, [NullAllowed] CLKImageProvider row2ImageProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider, [NullAllowed] CLKImageProvider row3ImageProvider, CLKTextProvider row3Column1TextProvider, CLKTextProvider row3Column2TextProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -302,6 +494,24 @@ interface CLKComplicationTemplateUtilitarianSmallFlat { [NullAllowed] [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithTextProvider:")] + IntPtr Constructor (CLKTextProvider textProvider); + + [Watch (7, 0)] + [Export ("initWithTextProvider:imageProvider:")] + IntPtr Constructor (CLKTextProvider textProvider, [NullAllowed] CLKImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:")] + CLKComplicationTemplateUtilitarianSmallFlat Create (CLKTextProvider textProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:imageProvider:")] + CLKComplicationTemplateUtilitarianSmallFlat Create (CLKTextProvider textProvider, [NullAllowed] CLKImageProvider imageProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -309,6 +519,15 @@ interface CLKComplicationTemplateUtilitarianSmallSquare { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithImageProvider:")] + IntPtr Constructor (CLKImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithImageProvider:")] + CLKComplicationTemplateUtilitarianSmallSquare Create (CLKImageProvider imageProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -322,6 +541,15 @@ interface CLKComplicationTemplateUtilitarianSmallRingText { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } + + [Watch (7, 0)] + [Export ("initWithTextProvider:fillFraction:ringStyle:")] + IntPtr Constructor (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:fillFraction:ringStyle:")] + CLKComplicationTemplateUtilitarianSmallRingText Create (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } [BaseType (typeof (CLKComplicationTemplate))] @@ -335,6 +563,15 @@ interface CLKComplicationTemplateUtilitarianSmallRingImage { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } + + [Watch (7, 0)] + [Export ("initWithImageProvider:fillFraction:ringStyle:")] + IntPtr Constructor (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); + + [Watch (7, 0)] + [Static] + [Export ("templateWithImageProvider:fillFraction:ringStyle:")] + CLKComplicationTemplateUtilitarianSmallRingImage Create (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } [BaseType (typeof (CLKComplicationTemplate))] @@ -346,6 +583,24 @@ interface CLKComplicationTemplateUtilitarianLargeFlat { [NullAllowed] [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithTextProvider:")] + IntPtr Constructor (CLKTextProvider textProvider); + + [Watch (7, 0)] + [Export ("initWithTextProvider:imageProvider:")] + IntPtr Constructor (CLKTextProvider textProvider, [NullAllowed] CLKImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:")] + CLKComplicationTemplateUtilitarianLargeFlat Create (CLKTextProvider textProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:imageProvider:")] + CLKComplicationTemplateUtilitarianLargeFlat Create (CLKTextProvider textProvider, [NullAllowed] CLKImageProvider imageProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -353,6 +608,15 @@ interface CLKComplicationTemplateCircularSmallSimpleText { [Export ("textProvider", ArgumentSemantic.Copy)] CLKTextProvider TextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithTextProvider:")] + IntPtr Constructor (CLKTextProvider textProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:")] + CLKComplicationTemplateCircularSmallSimpleText Create (CLKTextProvider textProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -360,6 +624,15 @@ interface CLKComplicationTemplateCircularSmallSimpleImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } + + [Watch (7,0)] + [Export ("initWithImageProvider:")] + IntPtr Constructor (CLKImageProvider imageProvider); + + [Watch (7,0)] + [Static] + [Export ("templateWithImageProvider:")] + CLKComplicationTemplateCircularSmallSimpleImage Create (CLKImageProvider imageProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -373,6 +646,15 @@ interface CLKComplicationTemplateCircularSmallRingText { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } + + [Watch (7, 0)] + [Export ("initWithTextProvider:fillFraction:ringStyle:")] + IntPtr Constructor (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:fillFraction:ringStyle:")] + CLKComplicationTemplateCircularSmallRingText Create (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } [BaseType (typeof (CLKComplicationTemplate))] @@ -386,6 +668,15 @@ interface CLKComplicationTemplateCircularSmallRingImage { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } + + [Watch (7, 0)] + [Export ("initWithImageProvider:fillFraction:ringStyle:")] + IntPtr Constructor (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); + + [Watch (7, 0)] + [Static] + [Export ("templateWithImageProvider:fillFraction:ringStyle:")] + CLKComplicationTemplateCircularSmallRingImage Create (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } [BaseType (typeof (CLKComplicationTemplate))] @@ -396,6 +687,15 @@ interface CLKComplicationTemplateCircularSmallStackText { [Export ("line2TextProvider", ArgumentSemantic.Copy)] CLKTextProvider Line2TextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithLine1TextProvider:line2TextProvider:")] + IntPtr Constructor (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithLine1TextProvider:line2TextProvider:")] + CLKComplicationTemplateCircularSmallStackText Create (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); } [BaseType (typeof (CLKComplicationTemplate))] @@ -406,6 +706,15 @@ interface CLKComplicationTemplateCircularSmallStackImage { [Export ("line2TextProvider", ArgumentSemantic.Copy)] CLKTextProvider Line2TextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithLine1ImageProvider:line2TextProvider:")] + IntPtr Constructor (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithLine1ImageProvider:line2TextProvider:")] + CLKComplicationTemplateCircularSmallStackImage Create (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); } [Watch (3,0)] @@ -414,6 +723,15 @@ interface CLKComplicationTemplateExtraLargeSimpleText { [Export ("textProvider", ArgumentSemantic.Copy)] CLKTextProvider TextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithTextProvider:")] + IntPtr Constructor (CLKTextProvider textProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:")] + CLKComplicationTemplateExtraLargeSimpleText Create (CLKTextProvider textProvider); } [Watch (3,0)] @@ -422,6 +740,15 @@ interface CLKComplicationTemplateExtraLargeSimpleImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithImageProvider:")] + IntPtr Constructor (CLKImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithImageProvider:")] + CLKComplicationTemplateExtraLargeSimpleImage Create (CLKImageProvider imageProvider); } [Watch (3,0)] @@ -436,6 +763,15 @@ interface CLKComplicationTemplateExtraLargeRingText { [Export ("ringStyle", ArgumentSemantic.Assign)] CLKComplicationRingStyle RingStyle { get; set; } + + [Watch (7, 0)] + [Export ("initWithTextProvider:fillFraction:ringStyle:")] + IntPtr Constructor (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:fillFraction:ringStyle:")] + CLKComplicationTemplateExtraLargeRingText Create (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } [Watch (3,0)] @@ -450,6 +786,15 @@ interface CLKComplicationTemplateExtraLargeRingImage { [Export ("ringStyle", ArgumentSemantic.Assign)] CLKComplicationRingStyle RingStyle { get; set; } + + [Watch (7, 0)] + [Export ("initWithImageProvider:fillFraction:ringStyle:")] + IntPtr Constructor (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); + + [Watch (7, 0)] + [Static] + [Export ("templateWithImageProvider:fillFraction:ringStyle:")] + CLKComplicationTemplateExtraLargeRingImage Create (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } [Watch (3,0)] @@ -464,6 +809,15 @@ interface CLKComplicationTemplateExtraLargeStackText { [Export ("highlightLine2")] bool HighlightLine2 { get; set; } + + [Watch (7, 0)] + [Export ("initWithLine1TextProvider:line2TextProvider:")] + IntPtr Constructor (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithLine1TextProvider:line2TextProvider:")] + CLKComplicationTemplateExtraLargeStackText Create (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); } [Watch (3,0)] @@ -478,6 +832,15 @@ interface CLKComplicationTemplateExtraLargeStackImage { [Export ("highlightLine2")] bool HighlightLine2 { get; set; } + + [Watch (7, 0)] + [Export ("initWithLine1ImageProvider:line2TextProvider:")] + IntPtr Constructor (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithLine1ImageProvider:line2TextProvider:")] + CLKComplicationTemplateExtraLargeStackImage Create (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); } [Watch (3,0)] @@ -501,6 +864,15 @@ interface CLKComplicationTemplateExtraLargeColumnsText { [Export ("highlightColumn2")] bool HighlightColumn2 { get; set; } + + [Watch (7, 0)] + [Export ("initWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] + IntPtr Constructor (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] + CLKComplicationTemplateExtraLargeColumnsText Create (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); } [BaseType (typeof (NSObject))] @@ -525,8 +897,13 @@ interface CLKComplicationTimelineEntry { } [BaseType (typeof (NSObject))] + [DisableDefaultCtor] interface CLKImageProvider : NSCopying { + [Deprecated (PlatformName.WatchOS, 7, 0)] + [Export ("init")] + IntPtr Constructor (); + [Static] [Export ("imageProviderWithOnePieceImage:")] CLKImageProvider Create (UIImage onePieceImage); @@ -550,10 +927,23 @@ interface CLKImageProvider : NSCopying { [NullAllowed, Export ("twoPieceImageForeground", ArgumentSemantic.Retain)] UIImage TwoPieceImageForeground { get; set; } + + [Watch (7, 0)] + [Export ("initWithOnePieceImage:")] + IntPtr Constructor (UIImage onePieceImage); + + [Watch (7, 0)] + [Export ("initWithOnePieceImage:twoPieceImageBackground:twoPieceImageForeground:")] + IntPtr Constructor (UIImage onePieceImage, [NullAllowed] UIImage twoPieceImageBackground, [NullAllowed] UIImage twoPieceImageForeground); } [BaseType (typeof (NSObject))] + [DisableDefaultCtor] interface CLKTextProvider : NSCopying { + + [Deprecated (PlatformName.iOS, 14, 0, message: "Use overloaded constructors.")] + [Export ("init")] + IntPtr Constructor (); // FIXME: expose gracefully [Static, Internal] @@ -608,6 +998,18 @@ interface CLKSimpleTextProvider { [NullAllowed] [Export ("shortText")] string ShortText { get; set; } + + [Watch (7, 0)] + [Export ("initWithText:")] + IntPtr Constructor (string text); + + [Watch (7, 0)] + [Export ("initWithText:shortText:")] + IntPtr Constructor (string text, [NullAllowed] string shortText); + + [Watch (7, 0)] + [Export ("initWithText:shortText:accessibilityLabel:")] + IntPtr Constructor (string text, [NullAllowed] string shortText, [NullAllowed] string accessibilityLabel); } [BaseType (typeof (CLKTextProvider))] @@ -634,6 +1036,14 @@ interface CLKDateTextProvider { [Watch (6,0)] [Export ("uppercase")] bool Uppercase { get; set; } + + [Watch (7, 0)] + [Export ("initWithDate:units:")] + IntPtr Constructor (NSDate date, NSCalendarUnit calendarUnits); + + [Watch (7, 0)] + [Export ("initWithDate:units:timeZone:")] + IntPtr Constructor (NSDate date, NSCalendarUnit calendarUnits, [NullAllowed] NSTimeZone timeZone); } [BaseType (typeof (CLKTextProvider))] @@ -653,6 +1063,14 @@ interface CLKTimeTextProvider { [NullAllowed] [Export ("timeZone", ArgumentSemantic.Retain)] NSTimeZone TimeZone { get; set; } + + [Watch (7, 0)] + [Export ("initWithDate:")] + IntPtr Constructor (NSDate date); + + [Watch (7, 0)] + [Export ("initWithDate:timeZone:")] + IntPtr Constructor (NSDate date, [NullAllowed] NSTimeZone timeZone); } [BaseType (typeof (CLKTextProvider))] @@ -675,6 +1093,14 @@ interface CLKTimeIntervalTextProvider { [NullAllowed] [Export ("timeZone", ArgumentSemantic.Retain)] NSTimeZone TimeZone { get; set; } + + [Watch (7, 0)] + [Export ("initWithStartDate:endDate:")] + IntPtr Constructor (NSDate startDate, NSDate endDate); + + [Watch (7, 0)] + [Export ("initWithStartDate:endDate:timeZone:")] + IntPtr Constructor (NSDate startDate, NSDate endDate, [NullAllowed] NSTimeZone timeZone); } [BaseType (typeof (CLKTextProvider))] @@ -692,6 +1118,23 @@ interface CLKRelativeDateTextProvider { [Export ("calendarUnits")] NSCalendarUnit CalendarUnits { get; set; } + + [Watch (7, 0)] + [Export ("initWithDate:style:units:")] + IntPtr Constructor (NSDate date, CLKRelativeDateStyle style, NSCalendarUnit calendarUnits); + + [Watch (7, 0)] + [Export ("initWithDate:relativeToDate:style:units:")] + IntPtr Constructor (NSDate date, [NullAllowed] NSDate relativeDate, CLKRelativeDateStyle style, NSCalendarUnit calendarUnits); + + [Watch (7, 0)] + [Static] + [Export ("textProviderWithDate:relativeToDate:style:units:")] + CLKRelativeDateTextProvider Create (NSDate date, [NullAllowed] NSDate relativeToDate, CLKRelativeDateStyle style, NSCalendarUnit calendarUnits); + + [Watch (7, 0)] + [Export ("relativeToDate", ArgumentSemantic.Retain), NullAllowed] + NSDate RelativeToDate { get; set; } } [Static] @@ -699,6 +1142,10 @@ interface CLKLaunchOptionsKeys { [Field ("CLKLaunchedTimelineEntryDateKey")] NSString LaunchedTimelineEntryDate { get; } + + [Watch (7, 0)] + [Field ("CLKLaunchedComplicationIdentifierKey")] + NSString LaunchedComplicationIdentifierKey { get; } } [Watch (5,0)] @@ -709,6 +1156,24 @@ interface CLKComplicationTemplateGraphicBezelCircularText { [NullAllowed, Export ("textProvider", ArgumentSemantic.Copy)] CLKTextProvider TextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithCircularTemplate:")] + IntPtr Constructor (CLKComplicationTemplateGraphicCircular circularTemplate); + + [Watch (7, 0)] + [Export ("initWithCircularTemplate:textProvider:")] + IntPtr Constructor (CLKComplicationTemplateGraphicCircular circularTemplate, [NullAllowed] CLKTextProvider textProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithCircularTemplate:")] + CLKComplicationTemplateGraphicBezelCircularText Create (CLKComplicationTemplateGraphicCircular circularTemplate); + + [Watch (7, 0)] + [Static] + [Export ("templateWithCircularTemplate:textProvider:")] + CLKComplicationTemplateGraphicBezelCircularText Create (CLKComplicationTemplateGraphicCircular circularTemplate, [NullAllowed] CLKTextProvider textProvider); } [Watch (5,0)] @@ -726,6 +1191,15 @@ interface CLKComplicationTemplateGraphicCircularClosedGaugeImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKFullColorImageProvider ImageProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithGaugeProvider:imageProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithGaugeProvider:imageProvider:")] + CLKComplicationTemplateGraphicCircularClosedGaugeImage Create (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider imageProvider); } [Watch (5,0)] @@ -736,6 +1210,15 @@ interface CLKComplicationTemplateGraphicCircularClosedGaugeText { [Export ("centerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider CenterTextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithGaugeProvider:centerTextProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKTextProvider centerTextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithGaugeProvider:centerTextProvider:")] + CLKComplicationTemplateGraphicCircularClosedGaugeText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider centerTextProvider); } [Watch (5,0)] @@ -743,6 +1226,15 @@ interface CLKComplicationTemplateGraphicCircularClosedGaugeText { interface CLKComplicationTemplateGraphicCircularImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKFullColorImageProvider ImageProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithImageProvider:")] + IntPtr Constructor (CLKFullColorImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithImageProvider:")] + CLKComplicationTemplateGraphicCircularImage Create (CLKFullColorImageProvider imageProvider); } [Watch (5,0)] @@ -756,6 +1248,15 @@ interface CLKComplicationTemplateGraphicCircularOpenGaugeImage { [Export ("centerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider CenterTextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithGaugeProvider:bottomImageProvider:centerTextProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider bottomImageProvider, CLKTextProvider centerTextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithGaugeProvider:bottomImageProvider:centerTextProvider:")] + CLKComplicationTemplateGraphicCircularOpenGaugeImage Create (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider bottomImageProvider, CLKTextProvider centerTextProvider); } [Watch (5,0)] @@ -772,6 +1273,15 @@ interface CLKComplicationTemplateGraphicCircularOpenGaugeRangeText { [Export ("centerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider CenterTextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithGaugeProvider:leadingTextProvider:trailingTextProvider:centerTextProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKTextProvider leadingTextProvider, CLKTextProvider trailingTextProvider, CLKTextProvider centerTextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithGaugeProvider:leadingTextProvider:trailingTextProvider:centerTextProvider:")] + CLKComplicationTemplateGraphicCircularOpenGaugeRangeText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider leadingTextProvider, CLKTextProvider trailingTextProvider, CLKTextProvider centerTextProvider); } [Watch (5,0)] @@ -785,6 +1295,15 @@ interface CLKComplicationTemplateGraphicCircularOpenGaugeSimpleText { [Export ("centerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider CenterTextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithGaugeProvider:bottomTextProvider:centerTextProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKTextProvider bottomTextProvider, CLKTextProvider centerTextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithGaugeProvider:bottomTextProvider:centerTextProvider:")] + CLKComplicationTemplateGraphicCircularOpenGaugeSimpleText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider bottomTextProvider, CLKTextProvider centerTextProvider); } [Watch (5,0)] @@ -792,6 +1311,15 @@ interface CLKComplicationTemplateGraphicCircularOpenGaugeSimpleText { interface CLKComplicationTemplateGraphicCornerCircularImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKFullColorImageProvider ImageProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithImageProvider:")] + IntPtr Constructor (CLKFullColorImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithImageProvider:")] + CLKComplicationTemplateGraphicCornerCircularImage Create (CLKFullColorImageProvider imageProvider); } [Watch (5,0)] @@ -808,6 +1336,24 @@ interface CLKComplicationTemplateGraphicCornerGaugeImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKFullColorImageProvider ImageProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithGaugeProvider:imageProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider imageProvider); + + [Watch (7, 0)] + [Export ("initWithGaugeProvider:leadingTextProvider:trailingTextProvider:imageProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, [NullAllowed] CLKTextProvider leadingTextProvider, [NullAllowed] CLKTextProvider trailingTextProvider, CLKFullColorImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithGaugeProvider:imageProvider:")] + CLKComplicationTemplateGraphicCornerGaugeImage Create (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithGaugeProvider:leadingTextProvider:trailingTextProvider:imageProvider:")] + CLKComplicationTemplateGraphicCornerGaugeImage Create (CLKGaugeProvider gaugeProvider, [NullAllowed] CLKTextProvider leadingTextProvider, [NullAllowed] CLKTextProvider trailingTextProvider, CLKFullColorImageProvider imageProvider); } [Watch (5,0)] @@ -824,6 +1370,24 @@ interface CLKComplicationTemplateGraphicCornerGaugeText { [Export ("outerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider OuterTextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithGaugeProvider:outerTextProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKTextProvider outerTextProvider); + + [Watch (7, 0)] + [Export ("initWithGaugeProvider:leadingTextProvider:trailingTextProvider:outerTextProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, [NullAllowed] CLKTextProvider leadingTextProvider, [NullAllowed] CLKTextProvider trailingTextProvider, CLKTextProvider outerTextProvider); + + [Watch (7,0)] + [Static] + [Export ("templateWithGaugeProvider:outerTextProvider:")] + CLKComplicationTemplateGraphicCornerGaugeText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider outerTextProvider); + + [Watch (7,0)] + [Static] + [Export ("templateWithGaugeProvider:leadingTextProvider:trailingTextProvider:outerTextProvider:")] + CLKComplicationTemplateGraphicCornerGaugeText Create (CLKGaugeProvider gaugeProvider, [NullAllowed] CLKTextProvider leadingTextProvider, [NullAllowed] CLKTextProvider trailingTextProvider, CLKTextProvider outerTextProvider); } [Watch (5,0)] @@ -834,6 +1398,15 @@ interface CLKComplicationTemplateGraphicCornerStackText { [Export ("outerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider OuterTextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithInnerTextProvider:outerTextProvider:")] + IntPtr Constructor (CLKTextProvider innerTextProvider, CLKTextProvider outerTextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithInnerTextProvider:outerTextProvider:")] + CLKComplicationTemplateGraphicCornerStackText Create (CLKTextProvider innerTextProvider, CLKTextProvider outerTextProvider); } [Watch (5,0)] @@ -844,6 +1417,15 @@ interface CLKComplicationTemplateGraphicCornerTextImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKFullColorImageProvider ImageProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithTextProvider:imageProvider:")] + IntPtr Constructor (CLKTextProvider textProvider, CLKFullColorImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:imageProvider:")] + CLKComplicationTemplateGraphicCornerTextImage Create (CLKTextProvider textProvider, CLKFullColorImageProvider imageProvider); } [Watch (5,0)] @@ -854,6 +1436,15 @@ interface CLKComplicationTemplateGraphicRectangularLargeImage { [Export ("textProvider", ArgumentSemantic.Copy)] CLKTextProvider TextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithTextProvider:imageProvider:")] + IntPtr Constructor (CLKTextProvider textProvider, CLKFullColorImageProvider imageProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithTextProvider:imageProvider:")] + CLKComplicationTemplateGraphicRectangularLargeImage Create (CLKTextProvider textProvider, CLKFullColorImageProvider imageProvider); } [Watch (5,0)] @@ -870,6 +1461,42 @@ interface CLKComplicationTemplateGraphicRectangularStandardBody { [NullAllowed, Export ("body2TextProvider", ArgumentSemantic.Copy)] CLKTextProvider Body2TextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithHeaderTextProvider:body1TextProvider:")] + IntPtr Constructor (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); + + [Watch (7, 0)] + [Export ("initWithHeaderTextProvider:body1TextProvider:body2TextProvider:")] + IntPtr Constructor (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); + + [Watch (7, 0)] + [Export ("initWithHeaderImageProvider:headerTextProvider:body1TextProvider:")] + IntPtr Constructor ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); + + [Watch (7, 0)] + [Export ("initWithHeaderImageProvider:headerTextProvider:body1TextProvider:body2TextProvider:")] + IntPtr Constructor ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderTextProvider:body1TextProvider:")] + CLKComplicationTemplateGraphicRectangularStandardBody Create (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderTextProvider:body1TextProvider:body2TextProvider:")] + CLKComplicationTemplateGraphicRectangularStandardBody Create (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderImageProvider:headerTextProvider:body1TextProvider:")] + CLKComplicationTemplateGraphicRectangularStandardBody Create ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderImageProvider:headerTextProvider:body1TextProvider:body2TextProvider:")] + CLKComplicationTemplateGraphicRectangularStandardBody Create ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); } [Watch (5,0)] @@ -886,6 +1513,24 @@ interface CLKComplicationTemplateGraphicRectangularTextGauge { [Export ("gaugeProvider", ArgumentSemantic.Copy)] CLKGaugeProvider GaugeProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithHeaderTextProvider:body1TextProvider:gaugeProvider:")] + IntPtr Constructor (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, CLKGaugeProvider gaugeProvider); + + [Watch (7, 0)] + [Export ("initWithHeaderImageProvider:headerTextProvider:body1TextProvider:gaugeProvider:")] + IntPtr Constructor ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, CLKGaugeProvider gaugeProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderTextProvider:body1TextProvider:gaugeProvider:")] + CLKComplicationTemplateGraphicRectangularTextGauge Create (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, CLKGaugeProvider gaugeProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithHeaderImageProvider:headerTextProvider:body1TextProvider:gaugeProvider:")] + CLKComplicationTemplateGraphicRectangularTextGauge Create ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, CLKGaugeProvider gaugeProvider); } [Watch (5,0)] @@ -910,6 +1555,18 @@ interface CLKFullColorImageProvider : NSCopying { [NullAllowed, Export ("accessibilityLabel", ArgumentSemantic.Retain)] string AccessibilityLabel { get; set; } + + [Watch (7, 0)] + [Export ("init")] + IntPtr Constructor (); + + [Watch (7, 0)] + [Export ("initWithFullColorImage:")] + IntPtr Constructor (UIImage fullColorImage); + + [Watch (7, 0)] + [Export ("initWithFullColorImage:tintedImageProvider:")] + IntPtr Constructor (UIImage fullColorImage, [NullAllowed] CLKImageProvider tintedImageProvider); } [Watch (5,0)] @@ -985,6 +1642,15 @@ interface CLKComplicationTemplateGraphicCircularStackText { [Export ("line2TextProvider", ArgumentSemantic.Copy)] CLKTextProvider Line2TextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithLine1TextProvider:line2TextProvider:")] + IntPtr Constructor (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithLine1TextProvider:line2TextProvider:")] + CLKComplicationTemplateGraphicCircularStackText Create (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); } [Watch (6,0)] @@ -996,6 +1662,220 @@ interface CLKComplicationTemplateGraphicCircularStackImage { [Export ("line2TextProvider", ArgumentSemantic.Copy)] CLKTextProvider Line2TextProvider { get; set; } + + [Watch (7, 0)] + [Export ("initWithLine1ImageProvider:line2TextProvider:")] + IntPtr Constructor (CLKFullColorImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); + + [Watch (7, 0)] + [Static] + [Export ("templateWithLine1ImageProvider:line2TextProvider:")] + CLKComplicationTemplateGraphicCircularStackImage Create (CLKFullColorImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); + } + + [Watch (7, 0), iOS (14, 0)] + [BaseType (typeof (NSObject))] + interface CLKWatchFaceLibrary { + [Async] + [Export ("addWatchFaceAtURL:completionHandler:")] + void AddWatchFace (NSUrl fileUrl, Action handler); } + + [Watch (7, 0)] + [BaseType (typeof (CLKComplicationTemplate))] + interface CLKComplicationTemplateGraphicRectangularFullImage : NSSecureCoding { + [Export ("imageProvider", ArgumentSemantic.Copy)] + CLKFullColorImageProvider ImageProvider { get; set; } + + [Export ("initWithImageProvider:")] + IntPtr Constructor (CLKFullColorImageProvider imageProvider); + + [Static] + [Export ("templateWithImageProvider:")] + CLKComplicationTemplateGraphicRectangularFullImage Create (CLKFullColorImageProvider imageProvider); + } + + [Advice ("This class is an abstract super class in the runtime. Do use one of its children.")] + [Watch (7, 0)] + [BaseType (typeof (CLKComplicationTemplate))] + interface CLKComplicationTemplateGraphicExtraLargeCircular : NSSecureCoding { + } + + [Watch (7, 0)] + [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] + interface CLKComplicationTemplateGraphicExtraLargeCircularStackText { + [Export ("line1TextProvider", ArgumentSemantic.Copy)] + CLKTextProvider Line1TextProvider { get; set; } + + [Export ("line2TextProvider", ArgumentSemantic.Copy)] + CLKTextProvider Line2TextProvider { get; set; } + + [Export ("initWithLine1TextProvider:line2TextProvider:")] + IntPtr Constructor (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); + + [Static] + [Export ("templateWithLine1TextProvider:line2TextProvider:")] + CLKComplicationTemplateGraphicExtraLargeCircularStackText Create (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); + } + + [Watch (7, 0)] + [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] + interface CLKComplicationTemplateGraphicExtraLargeCircularStackImage { + [Export ("line1ImageProvider", ArgumentSemantic.Copy)] + CLKFullColorImageProvider Line1ImageProvider { get; set; } + + [Export ("line2TextProvider", ArgumentSemantic.Copy)] + CLKTextProvider Line2TextProvider { get; set; } + + [Export ("initWithLine1ImageProvider:line2TextProvider:")] + IntPtr Constructor (CLKFullColorImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); + + [Static] + [Export ("templateWithLine1ImageProvider:line2TextProvider:")] + CLKComplicationTemplateGraphicExtraLargeCircularStackImage Create (CLKFullColorImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); + } + + [Watch (7, 0)] + [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] + interface CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeSimpleText { + [Export ("gaugeProvider", ArgumentSemantic.Copy)] + CLKGaugeProvider GaugeProvider { get; set; } + + [Export ("bottomTextProvider", ArgumentSemantic.Copy)] + CLKTextProvider BottomTextProvider { get; set; } + + [Export ("centerTextProvider", ArgumentSemantic.Copy)] + CLKTextProvider CenterTextProvider { get; set; } + + [Export ("initWithGaugeProvider:bottomTextProvider:centerTextProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKTextProvider bottomTextProvider, CLKTextProvider centerTextProvider); + + [Static] + [Export ("templateWithGaugeProvider:bottomTextProvider:centerTextProvider:")] + CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeSimpleText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider bottomTextProvider, CLKTextProvider centerTextProvider); + } + + [Watch (7, 0)] + [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] + interface CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeRangeText { + [Export ("gaugeProvider", ArgumentSemantic.Copy)] + CLKGaugeProvider GaugeProvider { get; set; } + + [Export ("leadingTextProvider", ArgumentSemantic.Copy)] + CLKTextProvider LeadingTextProvider { get; set; } + + [Export ("trailingTextProvider", ArgumentSemantic.Copy)] + CLKTextProvider TrailingTextProvider { get; set; } + + [Export ("centerTextProvider", ArgumentSemantic.Copy)] + CLKTextProvider CenterTextProvider { get; set; } + + [Export ("initWithGaugeProvider:leadingTextProvider:trailingTextProvider:centerTextProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKTextProvider leadingTextProvider, CLKTextProvider trailingTextProvider, CLKTextProvider centerTextProvider); + + [Static] + [Export ("templateWithGaugeProvider:leadingTextProvider:trailingTextProvider:centerTextProvider:")] + CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeRangeText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider leadingTextProvider, CLKTextProvider trailingTextProvider, CLKTextProvider centerTextProvider); + } + + [Watch (7, 0)] + [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] + interface CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeImage { + [Export ("gaugeProvider", ArgumentSemantic.Copy)] + CLKGaugeProvider GaugeProvider { get; set; } + + [Export ("bottomImageProvider", ArgumentSemantic.Copy)] + CLKFullColorImageProvider BottomImageProvider { get; set; } + + [Export ("centerTextProvider", ArgumentSemantic.Copy)] + CLKTextProvider CenterTextProvider { get; set; } + + [Export ("initWithGaugeProvider:bottomImageProvider:centerTextProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider bottomImageProvider, CLKTextProvider centerTextProvider); + + [Static] + [Export ("templateWithGaugeProvider:bottomImageProvider:centerTextProvider:")] + CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeImage Create (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider bottomImageProvider, CLKTextProvider centerTextProvider); + } + + [Watch (7, 0)] + [BaseType (typeof(CLKComplicationTemplateGraphicExtraLargeCircular))] + interface CLKComplicationTemplateGraphicExtraLargeCircularImage { + [Export ("imageProvider", ArgumentSemantic.Copy)] + CLKFullColorImageProvider ImageProvider { get; set; } + + [Export ("initWithImageProvider:")] + IntPtr Constructor (CLKFullColorImageProvider imageProvider); + + [Static] + [Export ("templateWithImageProvider:")] + CLKComplicationTemplateGraphicExtraLargeCircularImage Create (CLKFullColorImageProvider imageProvider); + } + + [Watch (7, 0)] + [BaseType (typeof(CLKComplicationTemplateGraphicExtraLargeCircular))] + interface CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeText { + [Export ("gaugeProvider", ArgumentSemantic.Copy)] + CLKGaugeProvider GaugeProvider { get; set; } + + [Export ("centerTextProvider", ArgumentSemantic.Copy)] + CLKTextProvider CenterTextProvider { get; set; } + + [Export ("initWithGaugeProvider:centerTextProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKTextProvider centerTextProvider); + + [Static] + [Export ("templateWithGaugeProvider:centerTextProvider:")] + CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider centerTextProvider); + } + + [Watch (7, 0)] + [BaseType (typeof(CLKComplicationTemplateGraphicExtraLargeCircular))] + interface CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeImage { + [Export ("gaugeProvider", ArgumentSemantic.Copy)] + CLKGaugeProvider GaugeProvider { get; set; } + + [Export ("imageProvider", ArgumentSemantic.Copy)] + CLKFullColorImageProvider ImageProvider { get; set; } + + [Export ("initWithGaugeProvider:imageProvider:")] + IntPtr Constructor (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider imageProvider); + + [Static] + [Export ("templateWithGaugeProvider:imageProvider:")] + CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeImage Create (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider imageProvider); + } + + [Watch (7, 0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface CLKComplicationDescriptor : NSCopying, NSSecureCoding { + [Export ("identifier")] + string Identifier { get; } + + [Export ("displayName")] + string DisplayName { get; } + + [Export ("supportedFamilies")] + [BindAs ( typeof (CLKComplicationFamily []))] + NSNumber[] SupportedFamilies { get; } + + [NullAllowed, Export ("userInfo")] + NSDictionary UserInfo { get; } + + [NullAllowed, Export ("userActivity")] + NSUserActivity UserActivity { get; } + + [Export ("initWithIdentifier:displayName:supportedFamilies:")] + IntPtr Constructor (string identifier, string displayName, [BindAs (typeof (CLKComplicationFamily []))] NSNumber[] supportedFamilies); + + [Export ("initWithIdentifier:displayName:supportedFamilies:userInfo:")] + IntPtr Constructor (string identifier, string displayName, [BindAs (typeof (CLKComplicationFamily []))] NSNumber[] supportedFamilies, NSDictionary userInfo); + + [Export ("initWithIdentifier:displayName:supportedFamilies:userActivity:")] + IntPtr Constructor (string identifier, string displayName, [BindAs (typeof (CLKComplicationFamily []))] NSNumber[] supportedFamilies, NSUserActivity userActivity); + } + + } diff --git a/src/cloudkit.cs b/src/cloudkit.cs index 3cd67274d2d8..1a6c11877825 100644 --- a/src/cloudkit.cs +++ b/src/cloudkit.cs @@ -400,7 +400,9 @@ interface CKDatabaseOperation { [NoWatch] [NoTV] + [Obsoleted (PlatformName.iOS, 14, 0, message : "Use 'CKDiscoverAllUserIdentitiesOperation' instead.")] [Deprecated (PlatformName.iOS, 10, 0, message : "Use 'CKDiscoverAllUserIdentitiesOperation' instead.")] + [Obsoleted (PlatformName.MacOSX, 10, 16, message : "Use 'CKDiscoverAllUserIdentitiesOperation' instead.")] [Deprecated (PlatformName.MacOSX, 10, 12, message : "Use 'CKDiscoverAllUserIdentitiesOperation' instead.")] [iOS (8,0), Mac (10,10)] [BaseType (typeof (CKOperation))] @@ -413,7 +415,9 @@ interface CKDiscoverAllContactsOperation { } + [Obsoleted (PlatformName.iOS, 14, 0, message : "Use 'CKUserIdentity' instead.")] [Deprecated (PlatformName.iOS, 10, 0, message : "Use 'CKUserIdentity' instead.")] + [Obsoleted (PlatformName.MacOSX, 10, 16, message : "Use 'CKUserIdentity' instead.")] [Deprecated (PlatformName.MacOSX, 10, 12, message : "Use 'CKUserIdentity' instead.")] [iOS (8,0), Mac (10,10)] [NoWatch] @@ -1072,6 +1076,10 @@ interface CKNotification : NSSecureCoding { [Watch (4, 0), NoTV, Mac (10, 13), iOS (11, 0)] [NullAllowed, Export ("subtitleLocalizationArgs", ArgumentSemantic.Copy)] string[] SubtitleLocalizationArgs { get; } + + [Watch (7, 0), TV (14, 0), Mac (10, 16), iOS (14, 0)] + [NullAllowed, Export ("subscriptionOwnerUserRecordID", ArgumentSemantic.Copy)] + CKRecordID SubscriptionOwnerUserRecordId { get; } } [Watch (3,0)] diff --git a/src/contacts.cs b/src/contacts.cs index 9381b6116bf3..7e3f439cac64 100644 --- a/src/contacts.cs +++ b/src/contacts.cs @@ -356,6 +356,16 @@ interface CNContactFormatter : NSSecureCoding { [Field ("CNContactPropertyAttribute")] NSString ContactPropertyAttribute { get; } + + [Static] + [iOS (14, 0), Mac (11, 0), Watch (7, 0)] + [Export ("descriptorForRequiredKeysForDelimiter")] + ICNKeyDescriptor RequiredKeysForDelimiter { get; } + + [Static] + [iOS (14, 0), Mac (11, 0), Watch (7, 0)] + [Export ("descriptorForRequiredKeysForNameOrder")] + ICNKeyDescriptor RequiredKeysForNameOrder { get; } } [iOS (9,0), Mac (10,11)] @@ -1248,6 +1258,14 @@ interface CNLabelContactRelationKey { [Field ("CNLabelContactRelationSonInLawOrBrotherInLaw")] NSString SonInLawOrBrotherInLaw { get; } + [iOS (14, 0), Mac (11, 0), Watch (7, 0)] + [Field ("CNLabelContactRelationGranddaughterOrNiece")] + NSString GranddaughterOrNiece { get; } + + [iOS (14, 0), Mac (11, 0), Watch (7, 0)] + [Field ("CNLabelContactRelationGrandsonOrNephew")] + NSString GrandsonOrNephew { get; } + } delegate void CNContactStoreRequestAccessHandler (bool granted, NSError error); diff --git a/src/coredata.cs b/src/coredata.cs index 112669ea2d59..564412fd6deb 100644 --- a/src/coredata.cs +++ b/src/coredata.cs @@ -136,7 +136,7 @@ interface NSAtomicStore { [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] [BaseType (typeof(NSObject))] - interface NSFetchIndexElementDescription : NSCoding + interface NSFetchIndexElementDescription : NSCoding, NSCopying { [Export ("initWithProperty:collationType:")] IntPtr Constructor (NSPropertyDescription property, NSFetchIndexElementType collationType); @@ -159,7 +159,7 @@ interface NSFetchIndexElementDescription : NSCoding [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] [BaseType (typeof(NSObject))] - interface NSFetchIndexDescription : NSCoding + interface NSFetchIndexDescription : NSCoding, NSCopying { [Export ("initWithName:elements:")] IntPtr Constructor (string name, [NullAllowed] NSFetchIndexElementDescription[] elements); @@ -1136,6 +1136,34 @@ interface NSManagedObjectContext : NSCoding [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] [NullAllowed, Export ("transactionAuthor")] string TransactionAuthor { get; set; } + + [Notification (typeof (NSManagedObjectsIdsChangedEventArgs))] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Field ("NSManagedObjectContextDidMergeChangesObjectIDsNotification")] + NSString DidMergeChangesObjectIdsNotification { get; } + + [Notification (typeof (NSManagedObjectsIdsChangedEventArgs))] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Field ("NSManagedObjectContextDidSaveObjectIDsNotification")] + NSString DidSaveObjectIdsNotification { get; } + } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + interface NSManagedObjectsIdsChangedEventArgs { + [Export ("NSDeletedObjectIDsKey")] + NSSet DeletedObjectIds { get; } + + [Export ("NSInsertedObjectIDsKey")] + NSSet InsertedObjectIdsKey { get; } + + [Export ("NSInvalidatedObjectIDsKey")] + NSSet InvalidatedObjectIdsKey { get; } + + [Export ("NSRefreshedObjectIDsKey")] + NSSet RefreshedObjectIdsKey { get; } + + [Export ("NSUpdatedObjectIDsKey")] + NSSet UpdatedObjectIdsKey { get; } } interface NSManagedObjectChangeEventArgs { @@ -1623,6 +1651,7 @@ interface NSPersistentHistoryTransaction : NSCopying #if !WATCH [NoWatch, NoTV, Mac (10,13), iOS (11,0)] [BaseType (typeof(NSObject))] + [DisableDefaultCtor] // NSInternalInconsistencyException Reason: NSCoreDataCoreSpotlightDelegate requires the use of the initializer initForStoreWithDescription:model: interface NSCoreDataCoreSpotlightDelegate { [Export ("domainIdentifier")] @@ -2491,11 +2520,41 @@ interface NSConstraintConflict NSDictionary[] ConflictingSnapshots { get; } } +#if XAMCORE_4_0 + delegate bool NSBatchInsertRequestDictionaryHandler (NSMutableDictionary dictionary); +#else + delegate bool NSBatchInsertRequestDictionaryHandler (NSMutableDictionary dictionary); +#endif + delegate bool NSBatchInsertRequestManagedObjectHandler (NSManagedObject managedObject); + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] [BaseType (typeof(NSPersistentStoreRequest))] - [DesignatedDefaultCtor] + [DisableDefaultCtor] // NSInternalInconsistencyException Reason: -init results in undefined behavior for NSBatchInsertRequest interface NSBatchInsertRequest { + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'no yet bound' instead.")] + [Deprecated (PlatformName.TvOS, 14,0, message: "Use 'no yet bound' instead.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'no yet bound' instead.")] + [Deprecated (PlatformName.MacOSX, 10,16, message: "Use 'no yet bound' instead.")] + [Export ("init")] + IntPtr Constructor (); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("initWithEntity:dictionaryHandler:")] + IntPtr Constructor (NSEntityDescription entity, NSBatchInsertRequestDictionaryHandler handler); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("initWithEntity:managedObjectHandler:")] + IntPtr Constructor (NSEntityDescription entity, NSBatchInsertRequestManagedObjectHandler handler); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("initWithEntityName:dictionaryHandler:")] + IntPtr Constructor (string entityName, NSBatchInsertRequestDictionaryHandler handler); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("initWithEntityName:managedObjectHandler:")] + IntPtr Constructor (string entityName, NSBatchInsertRequestManagedObjectHandler handler); + [Export ("entityName")] string EntityName { get; } @@ -2512,11 +2571,31 @@ interface NSBatchInsertRequest { [Export ("batchInsertRequestWithEntityName:objects:")] NSBatchInsertRequest BatchInsertRequest (string entityName, NSDictionary[] dictionaries); + [DesignatedInitializer] [Export ("initWithEntityName:objects:")] IntPtr Constructor (string entityName, NSDictionary[] dictionaries); + [DesignatedInitializer] [Export ("initWithEntity:objects:")] IntPtr Constructor (NSEntityDescription entity, NSDictionary[] dictionaries); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("dictionaryHandler", ArgumentSemantic.Copy)] + NSBatchInsertRequestDictionaryHandler DictionaryHandler { get; set; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("managedObjectHandler", ArgumentSemantic.Copy)] + NSBatchInsertRequestManagedObjectHandler ManagedObjectHandler { get; set; } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("batchInsertRequestWithEntityName:dictionaryHandler:")] + NSBatchInsertRequest CreateBatchInsertRequest (string entityName, NSBatchInsertRequestDictionaryHandler handler); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("batchInsertRequestWithEntityName:managedObjectHandler:")] + NSBatchInsertRequest CreateBatchInsertRequest (string entityName, NSBatchInsertRequestManagedObjectHandler handler); } [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] @@ -2561,6 +2640,18 @@ interface NSPersistentCloudKitContainer { [Export ("recordIDsForManagedObjectIDs:")] NSDictionary GetRecordIds (NSManagedObjectID[] managedObjectIds); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("canUpdateRecordForManagedObjectWithID:")] + bool CanUpdateRecord (NSManagedObjectID objectID); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("canDeleteRecordForManagedObjectWithID:")] + bool CanDeleteRecord (NSManagedObjectID objectID); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("canModifyManagedObjectsInStore:")] + bool CanModifyManagedObjects (NSPersistentStore store); } [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] @@ -2573,5 +2664,79 @@ interface NSPersistentCloudKitContainerOptions { [Export ("initWithContainerIdentifier:")] [DesignatedInitializer] IntPtr Constructor (string containerIdentifier); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("databaseScope", ArgumentSemantic.Assign)] + CKDatabaseScope DatabaseScope { get; set; } + } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface NSPersistentCloudKitContainerEvent : NSCopying { + [Export ("identifier", ArgumentSemantic.Strong)] + NSUuid Identifier { get; } + + [Export ("storeIdentifier", ArgumentSemantic.Strong)] + string StoreIdentifier { get; } + + [Export ("type")] + NSPersistentCloudKitContainerEventType Type { get; } + + [Export ("startDate", ArgumentSemantic.Strong)] + NSDate StartDate { get; } + + [NullAllowed, Export ("endDate", ArgumentSemantic.Strong)] + NSDate EndDate { get; } + + [Export ("succeeded")] + bool Succeeded { get; } + + [NullAllowed, Export ("error", ArgumentSemantic.Strong)] + NSError Error { get; } + + [Notification] + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("NSPersistentCloudKitContainerEventChangedNotification")] + NSString ChangedNotification { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("NSPersistentCloudKitContainerEventUserInfoKey")] + NSString UserInfoKey { get; } } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSPersistentStoreRequest))] + interface NSPersistentCloudKitContainerEventRequest { + [Export ("resultType", ArgumentSemantic.Assign)] + NSPersistentCloudKitContainerEventResultType ResultType { get; set; } + + [Static] + [Export ("fetchEventsAfterDate:")] + NSPersistentCloudKitContainerEventRequest FetchEventsAfter (NSDate date); + + [Static] + [Export ("fetchEventsAfterEvent:")] + NSPersistentCloudKitContainerEventRequest FetchEventsAfter ([NullAllowed] NSPersistentCloudKitContainerEvent @event); + + [Static] + [Export ("fetchEventsMatchingFetchRequest:")] + NSPersistentCloudKitContainerEventRequest FetchEvents (NSFetchRequest fetchRequest); + + [Static] + [Export ("fetchRequestForEvents")] + NSFetchRequest FetchRequest (); + } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof(NSPersistentStoreResult))] + [DisableDefaultCtor] + interface NSPersistentCloudKitContainerEventResult { + [NullAllowed, Export ("result", ArgumentSemantic.Strong)] + NSObject Result { get; } + + [Export ("resultType")] + NSPersistentCloudKitContainerEventResultType ResultType { get; } + } + } diff --git a/src/coregraphics.cs b/src/coregraphics.cs index 81a0125d7010..98b2f122d8c2 100644 --- a/src/coregraphics.cs +++ b/src/coregraphics.cs @@ -76,6 +76,14 @@ interface CGPDFInfo { [Mac (10,13)][iOS (11,0)][TV (11,0)][Watch (4,0)] [Internal][Field ("kCGPDFContextAccessPermissions")] IntPtr kCGPDFContextAccessPermissions { get; } + + [Mac (11,0)][iOS (14,0)][TV (14,0)][Watch (7,0)] + [Internal][Field ("kCGPDFContextCreateLinearizedPDF")] + IntPtr kCGPDFContextCreateLinearizedPDF { get; } + + [Mac (11,0)][iOS (14,0)][TV (14,0)][Watch (7,0)] + [Internal][Field ("kCGPDFContextCreatePDFA")] + IntPtr kCGPDFContextCreatePDFA { get; } } [Static] @@ -207,14 +215,18 @@ interface CGColorSpaceNames { [Mac (10,14)][iOS (12,0)] [TV (12,0)][Watch (5,0)] - [Deprecated (PlatformName.MacOSX, 10,15,4)] - [Deprecated (PlatformName.iOS, 13,4)] - [Deprecated (PlatformName.TvOS, 13,4)] - [Deprecated (PlatformName.WatchOS, 6,2)] + [Deprecated (PlatformName.MacOSX, 10,15,4, message: "Use 'Itur_2100_PQ' instead.")] + [Deprecated (PlatformName.iOS, 13,4, message: "Use 'Itur_2100_PQ' instead.")] + [Deprecated (PlatformName.TvOS, 13,4, message: "Use 'Itur_2100_PQ' instead.")] + [Deprecated (PlatformName.WatchOS, 6,2, message: "Use 'Itur_2100_PQ' instead.")] [Field ("kCGColorSpaceITUR_2020_PQ_EOTF")] NSString Itur_2020_PQ_Eotf { get; } [Mac (10,15,4), iOS (13,4), TV (13,4), Watch (6,2)] + [Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'Itur_2100_PQ' instead.")] + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'Itur_2100_PQ' instead.")] + [Deprecated (PlatformName.TvOS, 14,0, message: "Use 'Itur_2100_PQ' instead.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'Itur_2100_PQ' instead.")] [Field ("kCGColorSpaceITUR_2020_PQ")] NSString Itur_2020_PQ { get; } @@ -238,8 +250,20 @@ interface CGColorSpaceNames { [Mac (10,15)][iOS (13,0)] [TV (13,0)][Watch (6,0)] + [Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'Itur_2100_PQ' instead.")] + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'Itur_2100_PQ' instead.")] + [Deprecated (PlatformName.TvOS, 14,0, message: "Use 'Itur_2100_PQ' instead.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'Itur_2100_PQ' instead.")] [Field ("kCGColorSpaceITUR_2020_HLG")] NSString Itur_2020_Hlg { get; } + + [iOS (14,0)][TV (14,0)][Watch (7,0)][Mac (11,0)] + [Field ("kCGColorSpaceITUR_2100_HLG")] + NSString Itur_2100_Hlg { get; } + + [iOS (14,0)][TV (14,0)][Watch (7,0)][Mac (11,0)] + [Field ("kCGColorSpaceITUR_2100_PQ")] + NSString Itur_2100_PQ { get; } } [Partial] @@ -330,4 +354,15 @@ interface CGPdfTagProperties { string TitleText { get; set; } string LanguageText { get; set; } } + + // macOS 10.5 + [iOS (14,0)][TV (14,0)][Watch (7,0)] + enum CGConstantColor { + [Field ("kCGColorWhite")] + White, + [Field ("kCGColorBlack")] + Black, + [Field ("kCGColorClear")] + Clear, + } } diff --git a/src/corehaptics.cs b/src/corehaptics.cs index bf7ccae73dff..797f43963216 100644 --- a/src/corehaptics.cs +++ b/src/corehaptics.cs @@ -17,11 +17,11 @@ namespace CoreHaptics { // we are not binding the API on Mac OS X yet due to an issue on Apples side: https://github.com/xamarin/maccore/issues/1951 -#if MONOMAC +#if MONOMAC || TV interface AVAudioSession {} #endif - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface CHHapticEventParameter { @@ -37,7 +37,7 @@ interface CHHapticEventParameter { IntPtr Constructor ([BindAs (typeof (CHHapticEventParameterId))] NSString parameterId, float value); } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface CHHapticDynamicParameter { @@ -56,7 +56,7 @@ interface CHHapticDynamicParameter { IntPtr Constructor ([BindAs (typeof (CHHapticDynamicParameterId))] NSString parameterId, float value, double time); } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface CHHapticParameterCurveControlPoint { @@ -71,7 +71,7 @@ interface CHHapticParameterCurveControlPoint { IntPtr Constructor (double time, float value); } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface CHHapticParameterCurve { @@ -90,7 +90,7 @@ interface CHHapticParameterCurve { IntPtr Constructor ([BindAs (typeof (CHHapticDynamicParameterId))]NSString parameterId, CHHapticParameterCurveControlPoint[] controlPoints, double relativeTime); } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface CHHapticEvent { @@ -122,7 +122,7 @@ interface CHHapticEvent { interface ICHHapticParameterAttributes { } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14,0)] [Protocol] interface CHHapticParameterAttributes { [Abstract] @@ -140,7 +140,7 @@ interface CHHapticParameterAttributes { interface ICHHapticDeviceCapability { } - [iOS (13,0)][NoMac] + [iOS (13,0)][Mac (11,0), TV (14,0)] [Protocol] interface CHHapticDeviceCapability { [Abstract] @@ -166,7 +166,7 @@ interface CHHapticDeviceCapability { interface ICHHapticPatternPlayer { } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14,0)] [Protocol] interface CHHapticPatternPlayer { [Abstract] @@ -196,7 +196,7 @@ interface CHHapticPatternPlayer { interface ICHHapticAdvancedPatternPlayer {} - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14,0)] [Protocol] interface CHHapticAdvancedPatternPlayer : CHHapticPatternPlayer { [Abstract] @@ -232,7 +232,7 @@ interface CHHapticAdvancedPatternPlayer : CHHapticPatternPlayer { new bool IsMuted { get; set; } } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14, 0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface CHHapticEngine @@ -266,7 +266,7 @@ interface CHHapticEngine [DesignatedInitializer] IntPtr Constructor ([NullAllowed] out NSError error); - [NoMac] + [NoMac, NoTV] [Export ("initWithAudioSession:error:")] [DesignatedInitializer] IntPtr Constructor ([NullAllowed] AVAudioSession audioSession, [NullAllowed] out NSError error); @@ -309,7 +309,7 @@ interface CHHapticEngine [Static] [Internal] - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14, 0)] partial interface CHHapticPatternDefinitionKeys { [Field ("CHHapticPatternKeyVersion")] NSString VersionKey { get; } @@ -351,7 +351,7 @@ partial interface CHHapticPatternDefinitionKeys { NSString ParameterCurveControlPointsKey { get; } } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14, 0)] [StrongDictionary ("CHHapticPatternDefinitionKeys")] partial interface CHHapticPatternDefinition { double Version { get; set; } @@ -375,7 +375,7 @@ partial interface CHHapticPatternDefinition { NSObject WeakParameterCurveControlPoints { get; set; } } - [Mac (10,15), iOS (13,0)] + [Mac (10,15), iOS (13,0), TV (14, 0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface CHHapticPattern { diff --git a/src/coreimage.cs b/src/coreimage.cs index a4b0cd6df17b..9bb9c10130a6 100644 --- a/src/coreimage.cs +++ b/src/coreimage.cs @@ -353,6 +353,10 @@ interface CIContext { [Field ("kCIContextAllowLowPower")] NSString AllowLowPower { get; } + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [Internal] + [Field ("kCIContextName")] + NSString Name { get; } #if MONOMAC [Mac(10,11)] @@ -2220,6 +2224,13 @@ interface CIKernel { [return: NullAllowed] CIKernel FromFunction (string name, NSData data, CIFormat format, [NullAllowed] out NSError error); + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Static] + [Export ("kernelNamesFromMetalLibraryData:")] + string[] GetKernelNamesFromMetalLibrary (NSData data); + [Export ("name")] string Name { get; } @@ -2826,6 +2837,13 @@ interface CIAffineTransform { CGAffineTransform Transform { get; set; } } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIAreaAverage")] + interface CIAreaAverageProtocol : CIFilterProtocol { + } + [CoreImageFilter] [iOS (9,0)] [BaseType (typeof (CIReductionFilter))] @@ -2839,19 +2857,46 @@ interface CIAreaAverage { CIImage OutputImageMps { get; } } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIAreaReductionFilter")] + interface CIAreaReductionFilterProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("extent", ArgumentSemantic.Assign)] + CGRect InputExtent { get; set; } + } + + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIAreaHistogram")] + interface CIAreaHistogramProtocol : CIAreaReductionFilterProtocol { + + [Abstract] + [Export ("scale")] + float Scale { get; set; } + + [Abstract] + [Export ("count")] + nint InputCount { get; set; } + } + [CoreImageFilter] [iOS (8,0)] [BaseType (typeof (CIFilter))] - interface CIAreaHistogram { - - [CoreImageFilterProperty ("inputImage")] - CIImage InputImage { get; set; } + interface CIAreaHistogram : CIAreaHistogramProtocol { +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputCount' instead.")] [CoreImageFilterProperty ("inputCount")] float Count { get; set; } - - [CoreImageFilterProperty ("inputScale")] - float Scale { get; set; } +#endif [CoreImageFilterProperty ("inputExtent")] CIVector Extent { get; set; } @@ -2881,28 +2926,56 @@ interface CIReductionFilter { CIVector Extent { get; set; } } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIAreaMaximum")] + interface CIAreaMaximumProtocol : CIAreaReductionFilterProtocol { + } + [CoreImageFilter (StringCtorVisibility = MethodAttributes.Public)] [iOS (9,0)] [BaseType (typeof (CIReductionFilter))] - interface CIAreaMaximum { + interface CIAreaMaximum : CIAreaMaximumProtocol { + } + + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIAreaMaximumAlpha")] + interface CIAreaMaximumAlphaProtocol : CIAreaReductionFilterProtocol { } [CoreImageFilter] [iOS (9,0)] [BaseType (typeof (CIReductionFilter))] - interface CIAreaMaximumAlpha { + interface CIAreaMaximumAlpha : CIAreaMaximumAlphaProtocol { + } + + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIAreaMinimum")] + interface CIAreaMinimumProtocol : CIAreaReductionFilterProtocol { } [CoreImageFilter] [iOS (9,0)] [BaseType (typeof (CIReductionFilter))] - interface CIAreaMinimum { + interface CIAreaMinimum : CIAreaReductionFilterProtocol { + } + + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIAreaMinimumAlpha")] + interface CIAreaMinimumAlphaProtocol : CIAreaReductionFilterProtocol { } [CoreImageFilter] [iOS (9,0)] [BaseType (typeof (CIReductionFilter))] - interface CIAreaMinimumAlpha { + interface CIAreaMinimumAlpha : CIAreaReductionFilterProtocol { } [CoreImageFilter (StringCtorVisibility = MethodAttributes.Public)] @@ -2994,29 +3067,73 @@ interface CIDistortionFilter { [CoreImageFilterProperty ("inputRadius")] float Radius { get; set; } +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputCenter' instead.")] [CoreImageFilterProperty ("inputCenter")] CIVector Center { get; set; } +#endif } - [CoreImageFilter] - [BaseType (typeof (CIDistortionFilter ))] - interface CIBumpDistortion { + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIBumpDistortion")] + interface CIBumpDistortionProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint InputCenter { get; set; } + + [Abstract] + [Export ("radius")] + float Radius { get; set; } - [CoreImageFilterProperty ("inputScale")] + [Abstract] + [Export ("scale")] float Scale { get; set; } } [CoreImageFilter] [BaseType (typeof (CIDistortionFilter))] - interface CIBumpDistortionLinear { + interface CIBumpDistortion : CIBumpDistortionProtocol { + } - [CoreImageFilterProperty ("inputAngle")] + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIBumpDistortionLinear")] + interface CIBumpDistortionLinearProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint InputCenter { get; set; } + + [Abstract] + [Export ("radius")] + float Radius { get; set; } + + [Abstract] + [Export ("angle")] float Angle { get; set; } - [CoreImageFilterProperty ("inputScale")] + [Abstract] + [Export ("scale")] float Scale { get; set; } } + [CoreImageFilter] + [BaseType (typeof (CIDistortionFilter))] + interface CIBumpDistortionLinear : CIBumpDistortionLinearProtocol { + } + [CoreImageFilter] [BaseType (typeof (CIFilter))] interface CICheckerboardGenerator : CICheckerboardGeneratorProtocol { @@ -3028,9 +3145,28 @@ interface CICheckerboardGenerator : CICheckerboardGeneratorProtocol { #endif } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CICircleSplashDistortion")] + interface CICircleSplashDistortionProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint InputCenter { get; set; } + + [Abstract] + [Export ("radius")] + float Radius { get; set; } + } + [CoreImageFilter] [BaseType (typeof (CIDistortionFilter))] - interface CICircleSplashDistortion { + interface CICircleSplashDistortion : CICircleSplashDistortionProtocol { } [CoreImageFilter (IntPtrCtorVisibility = MethodAttributes.Family)] // was already protected in classic @@ -3059,22 +3195,39 @@ interface CIScreenFilter { interface CICircularScreen : CICircularScreenProtocol { } - [CoreImageFilter] - [iOS (9,0)] - [BaseType (typeof (CIFilter))] - interface CICircularWrap { + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CICircularWrap")] + interface CICircularWrapProtocol : CIFilterProtocol { - [CoreImageFilterProperty ("inputImage")] + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] CIImage InputImage { get; set; } - [CoreImageFilterProperty ("inputRadius")] + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint InputCenter { get; set; } + + [Abstract] + [Export ("radius")] float Radius { get; set; } - [CoreImageFilterProperty ("inputAngle")] + [Abstract] + [Export ("angle")] float Angle { get; set; } + } + + [CoreImageFilter] + [iOS (9,0)] + [BaseType (typeof (CIFilter))] + interface CICircularWrap : CICircularWrapProtocol { +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputCenter' instead.")] [CoreImageFilterProperty ("inputCenter")] CIVector Center { get; set; } +#endif } [CoreImageFilter] @@ -3206,11 +3359,18 @@ interface CIColorPolynomial : CIColorPolynomialProtocol { interface CIColorPosterize : CIColorPosterizeProtocol { } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIColumnAverage")] + interface CIColumnAverageProtocol : CIAreaReductionFilterProtocol { + } + [CoreImageFilter] [iOS (9,0)] [Mac (10,9)] [BaseType (typeof (CIReductionFilter))] - interface CIColumnAverage { + interface CIColumnAverage : CIColumnAverageProtocol { } [CoreImageFilter] @@ -3351,21 +3511,31 @@ interface CIDisintegrateWithMaskTransition : CIDisintegrateWithMaskTransitionPro #endif } - [CoreImageFilter] - [iOS (9,0)] - [BaseType (typeof (CIFilter))] - interface CIDisplacementDistortion { + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIDisplacementDistortion")] + interface CIDisplacementDistortionProtocol : CIFilterProtocol { - [CoreImageFilterProperty ("inputImage")] + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] CIImage InputImage { get; set; } - [CoreImageFilterProperty ("inputDisplacementImage")] + [Abstract] + [NullAllowed, Export ("displacementImage", ArgumentSemantic.Retain)] CIImage DisplacementImage { get; set; } - [CoreImageFilterProperty ("inputScale")] + [Abstract] + [Export ("scale")] float Scale { get; set; } } + [CoreImageFilter] + [iOS (9,0)] + [BaseType (typeof (CIFilter))] + interface CIDisplacementDistortion : CIDisplacementDistortionProtocol { + } + [CoreImageFilter] [BaseType (typeof (CITransitionFilter))] interface CIDissolveTransition { @@ -3383,31 +3553,55 @@ interface CIDivideBlendMode { interface CIDotScreen : CIDotScreenProtocol { } - [CoreImageFilter] - [iOS (9,0)] - [BaseType (typeof (CIFilter))] - interface CIDroste { + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIDroste")] + interface CIDrosteProtocol : CIFilterProtocol { - [CoreImageFilterProperty ("inputImage")] + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] CIImage InputImage { get; set; } - [CoreImageFilterProperty ("inputStrands")] + [Abstract] + [Export ("insetPoint0", ArgumentSemantic.Assign)] + CGPoint InputInsetPoint0 { get; set; } + + [Abstract] + [Export ("insetPoint1", ArgumentSemantic.Assign)] + CGPoint InputInsetPoint1 { get; set; } + + [Abstract] + [Export ("strands")] float Strands { get; set; } - [CoreImageFilterProperty ("inputInsetPoint0")] - CIVector InsetPoint0 { get; set; } + [Abstract] + [Export ("periodicity")] + float Periodicity { get; set; } - [CoreImageFilterProperty ("inputRotation")] + [Abstract] + [Export ("rotation")] float Rotation { get; set; } - [CoreImageFilterProperty ("inputInsetPoint1")] - CIVector InsetPoint1 { get; set; } - - [CoreImageFilterProperty ("inputZoom")] + [Abstract] + [Export ("zoom")] float Zoom { get; set; } + } - [CoreImageFilterProperty ("inputPeriodicity")] - float Periodicity { get; set; } + [CoreImageFilter] + [iOS (9,0)] + [BaseType (typeof (CIFilter))] + interface CIDroste : CIDrosteProtocol { + +#if !XAMCORE_4_0 + [Obsolete ("use 'InputInsetPoint0' instead.")] + [CoreImageFilterProperty ("inputInsetPoint0")] + CIVector InsetPoint0 { get; set; } + + [Obsolete ("use 'InputInsetPoint0' instead.")] + [CoreImageFilterProperty ("inputInsetPoint1")] + CIVector InsetPoint1 { get; set; } +#endif } [CoreImageFilter] @@ -3524,43 +3718,82 @@ interface CIGaussianGradient : CIGaussianGradientProtocol { #endif } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIGlassDistortion")] + interface CIGlassDistortionProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [NullAllowed, Export ("textureImage", ArgumentSemantic.Retain)] + CIImage Texture { get; set; } + + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint InputCenter { get; set; } + + [Abstract] + [Export ("scale")] + float Scale { get; set; } + } + [CoreImageFilter] [iOS (8,0)] [BaseType (typeof (CIFilter))] - interface CIGlassDistortion { - - [CoreImageFilterProperty ("inputImage")] - CIImage InputImage { get; set; } + interface CIGlassDistortion : CIGlassDistortionProtocol { +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputCenter' instead.")] [CoreImageFilterProperty ("inputCenter")] CIVector Center { get; set; } +#endif + } - [CoreImageFilterProperty ("inputScale")] - float Scale { get; set; } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIGlassLozenge")] + interface CIGlassLozengeProtocol : CIFilterProtocol { - [CoreImageFilterProperty ("inputTexture")] - CIImage Texture { get; set; } + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("point0", ArgumentSemantic.Assign)] + CGPoint InputPoint0 { get; set; } + + [Abstract] + [Export ("point1", ArgumentSemantic.Assign)] + CGPoint InputPoint1 { get; set; } + + [Abstract] + [Export ("radius")] + float Radius { get; set; } + + [Abstract] + [Export ("refraction")] + float Refraction { get; set; } } [CoreImageFilter] [iOS (9,0)] [BaseType (typeof (CIFilter))] - interface CIGlassLozenge { - - [CoreImageFilterProperty ("inputImage")] - CIImage InputImage { get; set; } + interface CIGlassLozenge : CIGlassLozengeProtocol { +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputPoint1' instead.")] [CoreImageFilterProperty ("inputPoint1")] CIVector Point1 { get; set; } + [Obsolete ("Use 'InputPoint0' instead.")] [CoreImageFilterProperty ("inputPoint0")] CIVector Point0 { get; set; } - - [CoreImageFilterProperty ("inputRadius")] - float Radius { get; set; } - - [CoreImageFilterProperty ("inputRefraction")] - float Refraction { get; set; } +#endif } [CoreImageFilter] @@ -3606,28 +3839,70 @@ interface CIHexagonalPixellate : CIHexagonalPixellateProtocol { interface CIHighlightShadowAdjust : CIHighlightShadowAdjustProtocol { } - [CoreImageFilter] - [iOS (8,0)] - // incorrect version string for OSX: '10.?' Double-check documentation - [BaseType (typeof (CIFilter))] - interface CIHistogramDisplayFilter { + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIHistogramDisplay")] + interface CIHistogramDisplayProtocol : CIFilterProtocol { - [CoreImageFilterProperty ("inputImage")] + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] CIImage InputImage { get; set; } - [CoreImageFilterProperty ("inputHeight")] + [Abstract] + [Export ("height")] float Height { get; set; } - [CoreImageFilterProperty ("inputHighLimit")] + [Abstract] + [Export ("highLimit")] float HighLimit { get; set; } - [CoreImageFilterProperty ("inputLowLimit")] + [Abstract] + [Export ("lowLimit")] float LowLimit { get; set; } } + [CoreImageFilter] + [iOS (8,0)] + // incorrect version string for OSX: '10.?' Double-check documentation + [BaseType (typeof (CIFilter))] + interface CIHistogramDisplayFilter : CIHistogramDisplayProtocol { + + // [CoreImageFilterProperty ("inputImage")] + // CIImage InputImage { get; set; } + + // [CoreImageFilterProperty ("inputHeight")] + // float Height { get; set; } + + // [CoreImageFilterProperty ("inputHighLimit")] + // float HighLimit { get; set; } + + // [CoreImageFilterProperty ("inputLowLimit")] + // float LowLimit { get; set; } + } + + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIHoleDistortion")] + interface CIHoleDistortionProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint InputCenter { get; set; } + + [Abstract] + [Export ("radius")] + float Radius { get; set; } + } + [CoreImageFilter] [BaseType (typeof (CIDistortionFilter))] - interface CIHoleDistortion { + interface CIHoleDistortion : CIHoleDistortionProtocol { } [CoreImageFilter] @@ -3678,22 +3953,39 @@ interface CILenticularHaloGenerator : CILenticularHaloGeneratorProtocol { interface CILightenBlendMode { } - [CoreImageFilter] - [Mac (10,11)] - [BaseType (typeof (CIFilter))] - interface CILightTunnel { + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CILightTunnel")] + interface CILightTunnelProtocol : CIFilterProtocol { - [CoreImageFilterProperty ("inputImage")] + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] CIImage InputImage { get; set; } - [CoreImageFilterProperty ("inputRotation")] + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint InputCenter { get; set; } + + [Abstract] + [Export ("rotation")] float Rotation { get; set; } - [CoreImageFilterProperty ("inputRadius")] + [Abstract] + [Export ("radius")] float Radius { get; set; } + } + + [CoreImageFilter] + [Mac (10,11)] + [BaseType (typeof (CIFilter))] + interface CILightTunnel : CILightTunnelProtocol { +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputCenter' instead.")] [CoreImageFilterProperty ("inputCenter")] CIVector Center { get; set; } +#endif } [CoreImageFilter] @@ -4024,12 +4316,35 @@ interface CIPhotoEffectTonal { interface CIPhotoEffectTransfer { } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIPinchDistortion")] + interface CIPinchDistortionProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint InputCenter { get; set; } + + [Abstract] + [Export ("radius")] + float Radius { get; set; } + + [Abstract] + [Export ("scale")] + float Scale { get; set; } + } + [CoreImageFilter] [BaseType (typeof (CIDistortionFilter))] - interface CIPinchDistortion { + interface CIPinchDistortion : CIPinchDistortionProtocol { - [CoreImageFilterProperty ("inputScale")] - float Scale { get; set; } + // [CoreImageFilterProperty ("inputScale")] + // float Scale { get; set; } } [CoreImageFilter] @@ -4101,16 +4416,23 @@ interface CIRippleTransition : CIRippleTransitionProtocol { #endif } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIRowAverage")] + interface CIRowAverageProtocol : CIAreaReductionFilterProtocol { + } + [CoreImageFilter] [iOS (9,0)] [BaseType (typeof (CIFilter))] - interface CIRowAverage { - - [CoreImageFilterProperty ("inputImage")] - CIImage InputImage { get; set; } + interface CIRowAverage : CIRowAverageProtocol { +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputExtent' instead.")] [CoreImageFilterProperty ("inputExtent")] CIVector Extent { get; set; } +#endif } [CoreImageFilter] @@ -4223,22 +4545,39 @@ interface CIStarShineGenerator : CIStarShineGeneratorProtocol { interface CIStraightenFilter : CIStraightenProtocol { } - [CoreImageFilter] - [iOS (9,0)] - [BaseType (typeof (CIFilter))] - interface CIStretchCrop { + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIStretchCrop")] + interface CIStretchCropProtocol : CIFilterProtocol { - [CoreImageFilterProperty ("inputImage")] + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] CIImage InputImage { get; set; } - [CoreImageFilterProperty ("inputCropAmount")] + [Abstract] + [Export ("size", ArgumentSemantic.Assign)] + CGPoint InputSize { get; set; } + + [Abstract] + [Export ("cropAmount")] float CropAmount { get; set; } - [CoreImageFilterProperty ("inputCenterStretchAmount")] + [Abstract] + [Export ("centerStretchAmount")] float CenterStretchAmount { get; set; } + } + [CoreImageFilter] + [iOS (9,0)] + [BaseType (typeof (CIFilter))] + interface CIStretchCrop : CIStretchCropProtocol { + +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputSize' instead.")] [CoreImageFilterProperty ("inputSize")] CIVector Size { get; set; } +#endif } [CoreImageFilter] @@ -4309,25 +4648,43 @@ interface CIToneCurve : CIToneCurveProtocol { #endif } - [CoreImageFilter] - [iOS (9,0)] - [BaseType (typeof (CIFilter))] - interface CITorusLensDistortion { + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CITorusLensDistortion")] + interface CITorusLensDistortionProtocol : CIFilterProtocol { - [CoreImageFilterProperty ("inputImage")] + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] CIImage InputImage { get; set; } - [CoreImageFilterProperty ("inputRefraction")] + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint InputCenter { get; set; } + + [Abstract] + [Export ("radius")] + float Radius { get; set; } + + [Abstract] + [Export ("width")] + float Width { get; set; } + + [Abstract] + [Export ("refraction")] float Refraction { get; set; } + } - [CoreImageFilterProperty ("inputRadius")] - float Radius { get; set; } + [CoreImageFilter] + [iOS (9,0)] + [BaseType (typeof (CIFilter))] + interface CITorusLensDistortion : CITorusLensDistortionProtocol { +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputCenter' instead.")] [CoreImageFilterProperty ("inputCenter")] CIVector Center { get; set; } - - [CoreImageFilterProperty ("inputWidth")] - float Width { get; set; } +#endif } [CoreImageFilter] @@ -4352,12 +4709,35 @@ interface CITriangleTile : CITriangleTileProtocol { interface CITwelvefoldReflectedTile : CITwelvefoldReflectedTileProtocol { } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CITwirlDistortion")] + interface CITwirlDistortionProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint InputCenter { get; set; } + + [Abstract] + [Export ("radius")] + float Radius { get; set; } + + [Abstract] + [Export ("angle")] + float Angle { get; set; } + } + [CoreImageFilter] [BaseType (typeof (CIDistortionFilter))] - interface CITwirlDistortion { + interface CITwirlDistortion : CITwirlDistortionProtocol { - [CoreImageFilterProperty ("inputAngle")] - float Angle { get; set; } + // [CoreImageFilterProperty ("inputAngle")] + // float Angle { get; set; } } [CoreImageFilter] @@ -4389,12 +4769,35 @@ interface CIVignetteEffect : CIVignetteEffectProtocol { #endif } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIVortexDistortion")] + interface CIVortexDistortionProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint InputCenter { get; set; } + + [Abstract] + [Export ("radius")] + float Radius { get; set; } + + [Abstract] + [Export ("angle")] + float Angle { get; set; } + } + [CoreImageFilter] [BaseType (typeof (CIDistortionFilter))] - interface CIVortexDistortion { + interface CIVortexDistortion : CIVortexDistortionProtocol { - [CoreImageFilterProperty ("inputAngle")] - float Angle { get; set; } + // [CoreImageFilterProperty ("inputAngle")] + // float Angle { get; set; } } [CoreImageFilter] @@ -4483,24 +4886,79 @@ interface CIClamp { interface CIHueSaturationValueGradient : CIHueSaturationValueGradientProtocol { } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CINinePartStretched")] + interface CINinePartStretchedProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("breakpoint0", ArgumentSemantic.Assign)] + CGPoint InputBreakpoint0 { get; set; } + + [Abstract] + [Export ("breakpoint1", ArgumentSemantic.Assign)] + CGPoint InputBreakpoint1 { get; set; } + + [Abstract] + [Export ("growAmount", ArgumentSemantic.Assign)] + CGPoint InputGrowAmount { get; set; } + } + [CoreImageFilter] [iOS (10,0)] [Mac (10,12)] [TV (10,0)] [BaseType (typeof (CIFilter))] - interface CINinePartStretched { - - [CoreImageFilterProperty ("inputImage")] - CIImage InputImage { get; set; } + interface CINinePartStretched : CINinePartStretchedProtocol { +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputGrowAmount' instead.")] [CoreImageFilterProperty ("inputGrowAmount")] CIVector GrowAmount { get; set; } + [Obsolete ("Use 'InputBreakpoint0' instead.")] [CoreImageFilterProperty ("inputBreakpoint0")] CIVector Breakpoint0 { get; set; } + [Obsolete ("Use 'InputBreakpoint1' instead.")] [CoreImageFilterProperty ("inputBreakpoint1")] CIVector Breakpoint1 { get; set; } +#endif + } + + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CINinePartTiled")] + interface CINinePartTiledProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + + [Abstract] + [Export ("breakpoint0", ArgumentSemantic.Assign)] + CGPoint InputBreakpoint0 { get; set; } + + + [Abstract] + [Export ("breakpoint1", ArgumentSemantic.Assign)] + CGPoint InputBreakpoint1 { get; set; } + + + [Abstract] + [Export ("growAmount", ArgumentSemantic.Assign)] + CGPoint InputGrowAmount { get; set; } + + [Abstract] + [Export ("flipYTiles")] + bool FlipYTiles { get; set; } } [CoreImageFilter] @@ -4508,22 +4966,21 @@ interface CINinePartStretched { [Mac (10,12)] [TV (10,0)] [BaseType (typeof (CIFilter))] - interface CINinePartTiled { - - [CoreImageFilterProperty ("inputImage")] - CIImage InputImage { get; set; } + interface CINinePartTiled : CINinePartTiledProtocol { +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputGrowAmount' instead.")] [CoreImageFilterProperty ("inputGrowAmount")] CIVector GrowAmount { get; set; } + [Obsolete ("Use 'InputBreakpoint0' instead.")] [CoreImageFilterProperty ("inputBreakpoint0")] CIVector Breakpoint0 { get; set; } - [CoreImageFilterProperty ("inputFlipYTiles")] - bool FlipYTiles { get; set; } - + [Obsolete ("Use 'InputBreakpoint1' instead.")] [CoreImageFilterProperty ("inputBreakpoint1")] CIVector Breakpoint1 { get; set; } +#endif } [CoreImageFilter] @@ -4542,12 +4999,19 @@ interface CIThermal : CIThermalProtocol { interface CIXRay : CIXRayProtocol { } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIAreaMinMaxRed")] + interface CIAreaMinMaxRedProtocol : CIAreaReductionFilterProtocol { + } + [CoreImageFilter] [iOS (11,0)] [Mac (10,13)] [TV (11,0)] [BaseType (typeof (CIAreaMaximum))] - interface CIAreaMinMaxRed { + interface CIAreaMinMaxRed : CIAreaMinMaxRedProtocol { [CoreImageFilterProperty ("inputExtent")] CIVector Extent { get; set; } } @@ -5289,12 +5753,19 @@ interface CIImageRepresentationOptions { CIImage SemanticSegmentationTeethMatteImage { get; set; } } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIAreaMinMax")] + interface CIAreaMinMaxProtocol : CIAreaReductionFilterProtocol { + } + [CoreImageFilter] [iOS (12,0)] [TV (12,0)] [Mac (10,14)] [BaseType (typeof (CIReductionFilter))] - interface CIAreaMinMax { + interface CIAreaMinMax : CIAreaReductionFilterProtocol { [CoreImageFilterProperty ("outputImageNonMPS")] CIImage OutputImageNonMps { get; } @@ -5412,24 +5883,45 @@ interface CISaliencyMapFilter : CISaliencyMapProtocol { interface CIDocumentEnhancer : CIDocumentEnhancerProtocol { } + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name = "CIKMeans")] + interface CIKMeansProtocol : CIAreaReductionFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputMeans", ArgumentSemantic.Retain)] + CIImage Means { get; set; } + + [Abstract] + [Export ("count")] + nint InputCount { get; set; } + + [Abstract] + [Export ("passes")] + float InputPasses { get; set; } + + [Abstract] + [Export ("perceptual")] + bool Perceptual { get; set; } + } + [CoreImageFilter] [iOS (13,0)] [TV (13,0)] [Mac (10,15)] [BaseType (typeof (CIReductionFilter))] - interface CIKMeans { - - [CoreImageFilterProperty ("inputMeans")] - CIImage Means { get; set; } + interface CIKMeans : CIKMeansProtocol { +#if !XAMCORE_4_0 + [Obsolete ("Use 'InputCount' instead.")] [CoreImageFilterProperty ("inputCount")] float Count { get; set; } + [Obsolete ("Use 'InputPasses' instead.")] [CoreImageFilterProperty ("inputPasses")] int Passes { get; set; } - - [CoreImageFilterProperty ("inputPerceptual")] - bool Perceptual { get; set; } +#endif } [CoreImageFilter] @@ -8579,5 +9071,70 @@ interface CIZoomBlurProtocol : CIFilterProtocol { [Export ("amount")] float Amount { get; set; } } + + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIColorAbsoluteDifference")] + interface CIColorAbsoluteDifferenceProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("inputImage2")] + CIImage Image2 { get; set; } + } + + [CoreImageFilter] + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [BaseType (typeof (CIFilter))] + interface CIColorAbsoluteDifference : CIColorAbsoluteDifferenceProtocol { + } + + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIColorThreshold")] + interface CIColorThresholdProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + + [Abstract] + [Export ("threshold")] + float Threshold { get; set; } + } + + [CoreImageFilter] + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [BaseType (typeof (CIFilter))] + interface CIColorThreshold : CIColorThresholdProtocol { + } + + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [Protocol (Name="CIColorThresholdOtsu")] + interface CIColorThresholdOtsuProtocol : CIFilterProtocol { + + [Abstract] + [NullAllowed, Export ("inputImage", ArgumentSemantic.Retain)] + CIImage InputImage { get; set; } + } + + [CoreImageFilter] + [iOS (14,0)] + [TV (14,0)] + [Mac (11,0)] + [BaseType (typeof (CIFilter))] + interface CIColorThresholdOtsu : CIColorThresholdOtsuProtocol { + } #endregion } diff --git a/src/corelocation.cs b/src/corelocation.cs index 8eccdbb20c68..28ddb189eae0 100644 --- a/src/corelocation.cs +++ b/src/corelocation.cs @@ -149,6 +149,10 @@ partial interface CLLocation : NSSecureCoding, NSCopying, CKRecordValue { [Field ("kCLLocationAccuracyThreeKilometers")] double AccuracyThreeKilometers { get; } + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("kCLLocationAccuracyReduced")] + double AccuracyReduced { get; } + [Mac (10,15)] [iOS (8,0)] [NullAllowed, Export ("floor", ArgumentSemantic.Copy)] @@ -193,36 +197,35 @@ partial interface CLLocationManager { [Export ("locationServicesEnabled"), Static] bool LocationServicesEnabled { get; } -#if !MONOMAC [NoTV] - [Watch (6,0)] + [Watch (6,0), Mac (11,0)] [Export ("headingFilter", ArgumentSemantic.Assign)] double HeadingFilter { get; set; } [NoTV] - [Watch (6,0)] + [Watch (6,0), Mac (11,0)] [Export ("startUpdatingHeading")] void StartUpdatingHeading (); [NoTV] - [Watch (6,0)] + [Watch (6,0), Mac (11,0)] [Export ("stopUpdatingHeading")] void StopUpdatingHeading (); [NoTV] - [Watch (6,0)] + [Watch (6,0), Mac (11,0)] [Export ("dismissHeadingCalibrationDisplay")] void DismissHeadingCalibrationDisplay (); -#endif [NoWatch][NoTV] [Availability (Deprecated = Platform.iOS_6_0)] + [Deprecated (PlatformName.MacOSX, 11, 0, message : "Set the purpose using the NSLocationUsageDescription key in the Info.plist instead.")] // Default property value is null but it cannot be set to that value // it crash when a null is provided [NullAllowed, Export ("purpose")] string Purpose { get; set; } - [NoTV] + [NoTV][Mac (11,0)] [Watch (6,0)] [Export ("headingAvailable"), Static] bool HeadingAvailable { get; } @@ -243,17 +246,15 @@ partial interface CLLocationManager { [Export ("regionMonitoringEnabled"), Static] bool RegionMonitoringEnabled { get; } -#if !MONOMAC [NoTV] - [Watch (6,0)] + [Watch (6,0), Mac (11,0)] [Export ("headingOrientation", ArgumentSemantic.Assign)] CLDeviceOrientation HeadingOrientation { get; set; } [NoTV] - [Watch (6,0)] + [Watch (6,0), Mac (11,0)] [NullAllowed, Export ("heading", ArgumentSemantic.Copy)] CLHeading Heading { get; } -#endif [NoWatch][NoTV] [Export ("maximumRegionMonitoringDistance")] @@ -271,17 +272,23 @@ partial interface CLLocationManager { [Export ("stopMonitoringSignificantLocationChanges")] void StopMonitoringSignificantLocationChanges (); -#if !MONOMAC - [NoWatch][NoTV] + [NoWatch][NoTV][NoMac] [Availability (Deprecated = Platform.iOS_6_0)] [Export ("startMonitoringForRegion:desiredAccuracy:")] void StartMonitoring (CLRegion region, double desiredAccuracy); -#endif [NoWatch][NoTV] [Export ("stopMonitoringForRegion:")] void StopMonitoring (CLRegion region); + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("authorizationStatus")] + CLAuthorizationStatus AuthorizationStatus { get; } + + [Deprecated (PlatformName.iOS, 14, 0, message: "Use the instance property 'AuthorizationStatus' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use the instance 'AuthorizationStatus' property instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use the instance property AuthorizationStatus' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use instance property 'AuthorizationStatus' instead.")] [Export ("authorizationStatus")][Static] CLAuthorizationStatus Status { get; } @@ -289,28 +296,26 @@ partial interface CLLocationManager { [Export ("startMonitoringForRegion:")] void StartMonitoring (CLRegion region); -#if !MONOMAC [NoTV] - [Watch (4,0)] + [Watch (4,0), Mac (11,0)] [Export ("activityType", ArgumentSemantic.Assign)] CLActivityType ActivityType { get; set; } - [NoWatch][NoTV] + [NoWatch][NoTV][Mac (11,0)] [Export ("pausesLocationUpdatesAutomatically", ArgumentSemantic.Assign)] bool PausesLocationUpdatesAutomatically { get; set; } - [NoWatch][NoTV] + [NoWatch][NoTV][NoMac] [Deprecated (PlatformName.iOS, 13,0, message: "Not used anymore. Call will not have any effect.")] [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] [Export ("allowDeferredLocationUpdatesUntilTraveled:timeout:")] void AllowDeferredLocationUpdatesUntil (double distance, double timeout); - [NoWatch][NoTV] + [NoWatch][NoTV][NoMac] [Deprecated (PlatformName.iOS, 13,0, message: "Not used anymore. Call will not have any effect.")] [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] [Export ("disallowDeferredLocationUpdates")] void DisallowDeferredLocationUpdates (); -#endif [NoWatch][NoTV] [Mac (10,9)] @@ -329,53 +334,49 @@ partial interface CLLocationManager { [iOS (7,0), Static, Export ("isMonitoringAvailableForClass:")] bool IsMonitoringAvailable (Class regionClass); -#if !MONOMAC - [NoWatch][NoTV] + [NoWatch][NoTV][NoMac] [Deprecated (PlatformName.iOS, 13,0, message: "Use 'RangedBeaconConstraints' instead.")] [iOS (7,0), Export ("rangedRegions", ArgumentSemantic.Copy)] NSSet RangedRegions { get; } - [NoWatch, NoTV, NoMac, iOS (13,0)] + [NoWatch, NoTV, Mac (11,0), iOS (13,0)] [Export ("rangedBeaconConstraints", ArgumentSemantic.Copy)] NSSet RangedBeaconConstraints { get; } -#endif [Mac (10,10)] [NoWatch][NoTV] [iOS (7,0), Export ("requestStateForRegion:")] void RequestState (CLRegion region); -#if !MONOMAC - [NoWatch][NoTV] + [NoWatch][NoTV][NoMac] [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] [Deprecated (PlatformName.iOS, 13,0, message: "Use 'StartRangingBeacons(CLBeaconIdentityConstraint)' instead.")] [iOS (7,0), Export ("startRangingBeaconsInRegion:")] void StartRangingBeacons (CLBeaconRegion region); - [NoWatch, NoTV, NoMac, iOS (13,0)] + [NoWatch, NoTV, Mac (11,0), iOS (13,0)] [Export ("startRangingBeaconsSatisfyingConstraint:")] void StartRangingBeacons (CLBeaconIdentityConstraint constraint); - [NoWatch][NoTV] + [NoWatch][NoTV][NoMac] [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] [Deprecated (PlatformName.iOS, 13,0, message: "Use 'StopRangingBeacons(CLBeaconIdentityConstraint)' instead.")] [iOS (7,0), Export ("stopRangingBeaconsInRegion:")] void StopRangingBeacons (CLBeaconRegion region); - [NoWatch, NoTV, NoMac, iOS (13,0)] + [NoWatch, NoTV, Mac (11,0), iOS (13,0)] [Export ("stopRangingBeaconsSatisfyingConstraint:")] void StopRangingBeacons (CLBeaconIdentityConstraint constraint); [NoWatch][NoTV] - [iOS (7,0)] + [iOS (7,0), Mac (11,0)] [Static] [Export ("isRangingAvailable")] bool IsRangingAvailable { get; } - - [iOS (8,0)] + + [iOS (8,0), Mac (11,0)] [Export ("requestWhenInUseAuthorization")] void RequestWhenInUseAuthorization (); -#endif [NoTV] [iOS (8,0)] @@ -383,30 +384,47 @@ partial interface CLLocationManager { [Export ("requestAlwaysAuthorization")] void RequestAlwaysAuthorization (); -#if !MONOMAC [NoWatch][NoTV] - [iOS (8,0)] + [iOS (8,0), Mac (11,0)] [Export ("startMonitoringVisits")] void StartMonitoringVisits (); [NoWatch][NoTV] - [iOS (8,0)] + [iOS (8,0), Mac (11,0)] [Export ("stopMonitoringVisits")] void StopMonitoringVisits (); [NoTV] - [iOS (9,0), Watch (4,0)] + [iOS (9,0), Watch (4,0), Mac (11,0)] [Export ("allowsBackgroundLocationUpdates")] bool AllowsBackgroundLocationUpdates { get; set; } - [NoWatch, NoTV, NoMac, iOS (11,0)] + [NoWatch, NoTV, Mac (11,0), iOS (11,0)] [Export ("showsBackgroundLocationIndicator")] bool ShowsBackgroundLocationIndicator { get; set; } -#endif + [iOS (9,0)] [Mac (10,14)] [Export ("requestLocation")] void RequestLocation (); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("accuracyAuthorization")] + CLAccuracyAuthorization AccuracyAuthorization { get; } + + [Async] + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("requestTemporaryFullAccuracyAuthorizationWithPurposeKey:completion:")] + void RequestTemporaryFullAccuracyAuthorization (string purposeKey, [NullAllowed] Action completion); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("requestTemporaryFullAccuracyAuthorizationWithPurposeKey:")] + void RequestTemporaryFullAccuracyAuthorization (string purposeKey); + + [NoWatch, NoTV, Mac (11, 0), iOS (14, 0)] + [Export ("authorizedForWidgetUpdates")] + bool IsAuthorizedForWidgetUpdates { [Bind ("isAuthorizedForWidgetUpdates")] get; } + } [BaseType (typeof (NSObject))] @@ -419,12 +437,10 @@ partial interface CLLocationManagerDelegate [Export ("locationManager:didUpdateToLocation:fromLocation:"), EventArgs ("CLLocationUpdated")] void UpdatedLocation (CLLocationManager manager, CLLocation newLocation, CLLocation oldLocation); -#if !MONOMAC [NoTV] - [Watch (6,0)] + [Watch (6,0), Mac (11,0)] [Export ("locationManager:didUpdateHeading:"), EventArgs ("CLHeadingUpdated")] void UpdatedHeading (CLLocationManager manager, CLHeading newHeading); -#endif #if XAMCORE_4_0 // Unavailable on macOS [NoMac] @@ -458,33 +474,35 @@ partial interface CLLocationManagerDelegate [iOS (7,0), Export ("locationManager:didDetermineState:forRegion:"), EventArgs ("CLRegionStateDetermined")] void DidDetermineState (CLLocationManager manager, CLRegionState state, CLRegion region); -#if !MONOMAC - [NoWatch][NoTV] + [NoWatch][NoTV][NoMac] [Deprecated (PlatformName.iOS, 13,0, message: "Use 'DidRangeBeaconsSatisfyingConstraint' instead.")] [iOS (7,0), Export ("locationManager:didRangeBeacons:inRegion:"), EventArgs ("CLRegionBeaconsRanged")] void DidRangeBeacons (CLLocationManager manager, CLBeacon [] beacons, CLBeaconRegion region); - [NoWatch, NoTV, NoMac, iOS (13,0)] + [NoWatch, NoTV, Mac (11,0), iOS (13,0)] [Export ("locationManager:didRangeBeacons:satisfyingConstraint:")] [EventArgs ("CLRegionBeaconsConstraintRanged")] void DidRangeBeaconsSatisfyingConstraint (CLLocationManager manager, CLBeacon[] beacons, CLBeaconIdentityConstraint beaconConstraint); - [NoWatch][NoTV] + [NoWatch][NoTV][NoMac] [Deprecated (PlatformName.iOS, 13,0, message: "Use 'DidFailRangingBeacons' instead.")] [iOS (7,0), Export ("locationManager:rangingBeaconsDidFailForRegion:withError:"), EventArgs ("CLRegionBeaconsFailed")] void RangingBeaconsDidFailForRegion (CLLocationManager manager, CLBeaconRegion region, NSError error); - [NoWatch, NoTV, NoMac, iOS (13,0)] + [NoWatch, NoTV, Mac (11,0), iOS (13,0)] [Export ("locationManager:didFailRangingBeaconsForConstraint:error:")] [EventArgs ("CLRegionBeaconsConstraintFailed")] void DidFailRangingBeacons (CLLocationManager manager, CLBeaconIdentityConstraint beaconConstraint, NSError error); [NoWatch][NoTV] - [iOS (8,0)] + [iOS (8,0), Mac (11,0)] [Export ("locationManager:didVisit:"), EventArgs ("CLVisited")] void DidVisit (CLLocationManager manager, CLVisit visit); -#endif + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'DidChangeAuthorization' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'DidChangeAuthorization' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'DidChangeAuthorization' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'DidChangeAuthorization' instead.")] [Export ("locationManager:didChangeAuthorizationStatus:"), EventArgs ("CLAuthorizationChanged")] void AuthorizationChanged (CLLocationManager manager, CLAuthorizationStatus status); @@ -508,6 +526,11 @@ partial interface CLLocationManagerDelegate [NoWatch][NoTV] [Export ("locationManager:didFinishDeferredUpdatesWithError:"), EventArgs ("NSError", true)] void DeferredUpdatesFinished (CLLocationManager manager, [NullAllowed] NSError error); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("locationManagerDidChangeAuthorization:")] + void DidChangeAuthorization (CLLocationManager manager); + } [Static] @@ -648,21 +671,23 @@ partial interface CLCircularRegion { bool ContainsCoordinate (CLLocationCoordinate2D coordinate); } -#if !MONOMAC - [NoWatch][NoMac][NoTV] + [NoWatch][Mac (11,0)][NoTV] [iOS (7,0), BaseType (typeof (CLRegion))] [DisableDefaultCtor] // nil-Handle on iOS8 if 'init' is used partial interface CLBeaconRegion { + [NoMac] [Deprecated (PlatformName.iOS, 13,0, message: "Use the 'Create' method or the constructor using 'CLBeaconIdentityConstraint' instead.")] [Export ("initWithProximityUUID:identifier:")] IntPtr Constructor (NSUuid proximityUuid, string identifier); + [NoMac] [iOS (13,0)] [Internal] // signature conflict with deprecated API [Export ("initWithUUID:identifier:")] IntPtr _Constructor (NSUuid uuid, string identifier); + [NoMac] [Deprecated (PlatformName.iOS, 13,0, message: "Use the 'Create' method or the constructor using 'CLBeaconIdentityConstraint' instead.")] [Export ("initWithProximityUUID:major:identifier:")] IntPtr Constructor (NSUuid proximityUuid, ushort major, string identifier); @@ -672,6 +697,7 @@ partial interface CLBeaconRegion { [Export ("initWithUUID:major:identifier:")] IntPtr _Constructor (NSUuid uuid, ushort major, string identifier); + [NoMac] [Deprecated (PlatformName.iOS, 13,0, message: "Use the 'Create' method or the constructor using 'CLBeaconIdentityConstraint' instead.")] [Export ("initWithProximityUUID:major:minor:identifier:")] IntPtr Constructor (NSUuid proximityUuid, ushort major, ushort minor, string identifier); @@ -688,6 +714,7 @@ partial interface CLBeaconRegion { [Export ("peripheralDataWithMeasuredPower:")] NSMutableDictionary GetPeripheralData ([NullAllowed] NSNumber measuredPower); + [NoMac] [Deprecated (PlatformName.iOS, 13,0, message: "Use 'Uuid' instead.")] [Export ("proximityUUID", ArgumentSemantic.Copy)] NSUuid ProximityUuid { get; } @@ -710,10 +737,11 @@ partial interface CLBeaconRegion { CLBeaconIdentityConstraint BeaconIdentityConstraint { get; } } - [NoWatch][NoMac][NoTV] + [NoWatch][Mac (11,0)][NoTV] [iOS (7,0), BaseType (typeof (NSObject))] partial interface CLBeacon : NSCopying, NSSecureCoding { + [NoMac] [Deprecated (PlatformName.iOS, 13,0, message: "Use 'Uuid' instead.")] [Export ("proximityUUID", ArgumentSemantic.Copy)] NSUuid ProximityUuid { get; } @@ -742,8 +770,6 @@ partial interface CLBeacon : NSCopying, NSSecureCoding { NSDate Timestamp { get; } } -#endif - delegate void CLGeocodeCompletionHandler (CLPlacemark [] placemarks, NSError error); [BaseType (typeof (NSObject))] @@ -796,9 +822,8 @@ interface CLGeocoder { #endif } -#if !MONOMAC [NoWatch][NoTV] - [iOS (8,0)] + [iOS (8,0), Mac (11,0)] [BaseType (typeof (NSObject))] interface CLVisit : NSSecureCoding, NSCopying { @@ -814,9 +839,8 @@ interface CLVisit : NSSecureCoding, NSCopying { [Export ("horizontalAccuracy")] double HorizontalAccuracy { get; } } -#endif - [NoWatch, NoTV, NoMac, iOS (13,0)] + [NoWatch, NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: -[CLBeaconIdentityConstraint init]: unrecognized selector sent to instance 0x600001930300 interface CLBeaconIdentityConstraint : NSCopying, NSSecureCoding { diff --git a/src/coremidi.cs b/src/coremidi.cs index c68c67d58a06..7190014581bc 100644 --- a/src/coremidi.cs +++ b/src/coremidi.cs @@ -31,8 +31,72 @@ using CoreGraphics; using ObjCRuntime; +using MidiObjectRef = System.Int32; + namespace CoreMidi { - + + [Mac (11, 0), iOS (14, 0)] + public enum MidiProtocolId { + Protocol_1_0 = 1, + Protocol_2_0 = 2, + } + + [Mac (11, 0), iOS (14, 0)] + public enum MidiCVStatus : uint { + RegisteredPnc = 0, + AssignablePnc = 1, + RegisteredControl = 2, + AssignableControl = 3, + RelRegisteredControl = 4, + RelAssignableControl = 5, + PerNotePitchBend = 6, + // 7 is not present in the headers.. + NoteOff = 8, + NoteOn = 9, + PolyPressure = 10, + ControlChange = 11, + ProgramChange = 12, + ChannelPressure = 13, + PitchBend = 14, + PerNoteMgmt = 15, + } + + [Mac (11, 0), iOS (14, 0)] + public enum MidiMessageType : uint { + Utility = 0, + System = 1, + ChannelVoice1 = 2, + SysEx = 3, + ChannelVoice2 = 4, + Data128 = 5, + } + + [Mac (11, 0), iOS (14, 0)] + public enum MidiSysExStatus : uint { + Complete = 0, + Start = 1, + Continue = 2, + End = 3, + } + + [Mac (11, 0), iOS (14, 0)] + public enum MidiSystemStatus : uint { + StartOfExclusive = 240, + EndOfExclusive = 247, + Mtc = 241, + SongPosPointer = 242, + SongSelect = 243, + TuneRequest = 246, + TimingClock = 248, + Start = 250, + Continue = 251, + Stop = 252, + ActiveSending = 254, + SystemReset = 255, + } + + + #if !MONOMAC [NoMac][NoTV][NoWatch] [BaseType (typeof (NSObject), Name="MIDINetworkHost")] @@ -140,14 +204,25 @@ interface MidiNetworkSession { [Export ("sourceEndpoint")] [Internal] int /* MIDIObjectRef = UInt32 */ _SourceEndpoint { get; } +#if XAMCORE_4_0 + [Wrap ("new MidiEndpoint (_SourceEndpoint)")] + MidiEndpoint GetSourceEndpoint (); +#else [Wrap ("new MidiEndpoint (_SourceEndpoint)")] MidiEndpoint SourceEndpoint { get; } +#endif [Export ("destinationEndpoint")] [Internal] int /* MIDIObjectRef = UInt32 */ _DestinationEndpoint { get; } +#if XAMCORE_4_0 + [Wrap ("new MidiEndpoint (_DestinationEndpoint)")] + MidiEndpoint GetDestinationEndPoint (); +#else [Wrap ("new MidiEndpoint (_DestinationEndpoint)")] MidiEndpoint DestinationEndPoint { get; } +#endif + } #endif @@ -164,6 +239,10 @@ interface MidiCIProfile : NSSecureCoding [Export ("initWithData:name:")] IntPtr Constructor (NSData data, string inName); + + [Mac (11, 0), iOS (14,0)] + [Export ("initWithData:")] + IntPtr Constructor (NSData data); } [NoWatch, NoTV, Mac (10,14), iOS (12,0)] @@ -177,11 +256,25 @@ interface MidiCIProfileState : NSSecureCoding [Export ("disabledProfiles")] MidiCIProfile[] DisabledProfiles { get; } + [Deprecated (PlatformName.iOS, 14, 0, message : "Use the '(byte midiChannel, MidiCIProfile[] enabled, MidiCIProfile[] disabled)' constructor instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message : "Use the '(byte midiChannel, MidiCIProfile[] enabled, MidiCIProfile[] disabled)' constructor instead.")] [Export ("initWithEnabledProfiles:disabledProfiles:")] IntPtr Constructor (MidiCIProfile[] enabled, MidiCIProfile[] disabled); + + [Mac (11, 0), iOS (14, 0)] + [Export ("initWithChannel:enabledProfiles:disabledProfiles:")] + IntPtr Constructor (byte midiChannelNumber, MidiCIProfile[] enabled, MidiCIProfile[] disabled); + + [Mac (11, 0), iOS (14, 0)] + [Export ("midiChannel")] + byte MidiChannel { get; } } delegate void MidiCIProfileChangedHandler (MidiCISession session, byte channel, MidiCIProfile profile, bool enabled); + delegate void MidiCIPropertyResponseHandler (MidiCISession session, byte channel, NSData response, NSError error); + delegate void MidiCIPropertyChangedHandler (MidiCISession session, byte channel, NSData data); + delegate void MidiCIProfileSpecificDataHandler (MidiCISession session, byte channel, MidiCIProfile profile, NSData data); + delegate void MidiCISessionDisconnectHandler (MidiCISession session, NSError error); [NoWatch, NoTV, Mac (10,14), iOS (12,0)] [BaseType (typeof(NSObject), Name="MIDICISession")] @@ -214,5 +307,166 @@ interface MidiCISession [NullAllowed, Export ("profileChangedCallback", ArgumentSemantic.Assign)] MidiCIProfileChangedHandler ProfileChangedCallback { get; set; } + + [Mac (11, 0), iOS (14, 0)] + [Export ("initWithDiscoveredNode:dataReadyHandler:disconnectHandler:")] + IntPtr Constructor (MidiCIDiscoveredNode discoveredNode, Action dataReadyHandler, MidiCISessionDisconnectHandler disconnectHandler); + + [Mac (11, 0), iOS (14, 0)] + [Export ("sendProfile:onChannel:profileData:")] + bool SendProfile (MidiCIProfile profile, byte channel, NSData profileSpecificData); + + [Mac (11, 0), iOS (14, 0)] + [Export ("deviceInfo")] + MidiCIDeviceInfo DeviceInfo { get; } + + [Mac (11, 0), iOS (14, 0)] + [BindAs (typeof (ulong))] + [Export ("maxSysExSize")] + NSNumber MaxSysExSize { get; } + + [Mac (11, 0), iOS (14, 0)] + [BindAs (typeof (int))] + [Export ("maxPropertyRequests")] + NSNumber MaxPropertyRequests { get; } + + [Internal] + [Mac (11, 0), iOS (14, 0)] + [Export ("midiDestination")] + MidiObjectRef _MidiDestination { get; } + + [Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("profileSpecificDataHandler", ArgumentSemantic.Copy)] + MidiCIProfileSpecificDataHandler ProfileSpecificDataHandler { get; set; } } + + [Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (NSObject), Name="MIDICIDeviceInfo")] + [DisableDefaultCtor] + interface MidiCIDeviceInfo : NSSecureCoding + { + [Export ("manufacturerID")] + NSData ManufacturerId { get; } + + [Export ("family")] + NSData Family { get; } + + [Export ("modelNumber")] + NSData ModelNumber { get; } + + [Export ("revisionLevel")] + NSData RevisionLevel { get; } + + [Internal] + [Export ("midiDestination")] + MidiObjectRef _MidiDestination { get; } + + [Wrap ("new MidiEndpoint (_MidiDestination)")] + MidiEndpoint GetMidiDestination (); + + [Internal] + [Export ("initWithDestination:manufacturer:family:model:revision:")] + IntPtr Constructor (MidiObjectRef midiDestination, NSData manufacturer, NSData family, NSData modelNumber, NSData revisionLevel); + + [Wrap ("this (midiDestination?.Handle ?? throw new ArgumentNullException (nameof (midiDestination)), manufacturer, family, modelNumber, revisionLevel)")] + IntPtr Constructor (MidiEndpoint midiDestination, NSData manufacturer, NSData family, NSData modelNumber, NSData revisionLevel); + } + + [Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (NSObject), Name="MIDICIDiscoveredNode")] + [DisableDefaultCtor] + interface MidiCIDiscoveredNode + { + [Internal] + [Export ("destination")] + MidiObjectRef _Destination { get; } + + [Wrap ("new MidiEndpoint (_Destination)")] + MidiEndpoint GetDestination (); + + [Export ("deviceInfo")] + MidiCIDeviceInfo DeviceInfo { get; } + + [Export ("supportsProfiles")] + bool SupportsProfiles { get; } + + [Export ("supportsProperties")] + bool SupportsProperties { get; } + + [Export ("maximumSysExSize")] + [BindAs (typeof (ulong))] + NSNumber MaximumSysExSize { get; } + } + + delegate void MidiCIDiscoveryResponseDelegate (MidiCIDiscoveredNode[] discoveredNodes); + + [Mac (11, 0), iOS (14, 0)] + [DisableDefaultCtor] + [BaseType (typeof (NSObject), Name="MIDICIDiscoveryManager")] + interface MidiCIDiscoveryManager + { + [Static] + [Export ("sharedInstance")] + MidiCIDiscoveryManager SharedInstance { get; } + + [Export ("discoverWithHandler:")] + void Discover (MidiCIDiscoveryResponseDelegate completedHandler); + } + + interface IMidiCIProfileResponderDelegate {} + + [Mac (11, 0), iOS (14,0)] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject), Name="MIDICIProfileResponderDelegate")] + interface MidiCIProfileResponderDelegate + { + [Abstract] + [Export ("connectInitiator:withDeviceInfo:")] + bool ConnectInitiator (NSNumber initiatorMuid, MidiCIDeviceInfo deviceInfo); + + [Abstract] + [Export ("initiatorDisconnected:")] + void InitiatorDisconnected (NSNumber initiatorMuid); + + [Export ("willSetProfile:onChannel:enabled:")] + bool WillSetProfile (MidiCIProfile profile, byte channel, bool shouldEnable); + + [Export ("handleDataForProfile:onChannel:data:")] + void HandleData (MidiCIProfile profile, byte channel, NSData inData); + } + + [Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (NSObject), Name="MIDICIResponder")] + [DisableDefaultCtor] + interface MidiCIResponder + { + [BindAs (typeof (int[]))] + [Export ("initiators")] + NSNumber[] Initiators { get; } + + [Wrap ("WeakProfileDelegate")] + IMidiCIProfileResponderDelegate ProfileDelegate { get; } + + [Export ("profileDelegate", ArgumentSemantic.Retain)] + NSObject WeakProfileDelegate { get; } + + [Export ("deviceInfo")] + MidiCIDeviceInfo DeviceInfo { get; } + + [Export ("initWithDeviceInfo:profileDelegate:profileStates:supportProperties:")] + IntPtr Constructor (MidiCIDeviceInfo deviceInfo, IMidiCIProfileResponderDelegate @delegate, MidiCIProfileState[] profileList, bool propertiesSupported); + + [Export ("notifyProfile:onChannel:isEnabled:")] + bool NotifyProfile (MidiCIProfile profile, byte channel, bool enabledState); + + [Export ("sendProfile:onChannel:profileData:")] + bool SendProfile (MidiCIProfile profile, byte channel, NSData profileSpecificData); + + [Export ("start")] + bool Start (); + + [Export ("stop")] + void Stop (); + } + } diff --git a/src/coreml.cs b/src/coreml.cs index 43c205a6b4d7..177ceab7ac6f 100644 --- a/src/coreml.cs +++ b/src/coreml.cs @@ -54,14 +54,21 @@ public enum MLModelError : long { CustomModel = 5, Update = 6, Parameters = 7, + ModelDecryptionKeyFetch = 8, + ModelDecryption = 9, + ModelCollection = 10, } [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] [Native] public enum MLMultiArrayDataType : long { - Double = 65536 | 64, - Float32 = 65536 | 32, - Int32 = 131072 | 32, + Double = 0x10000 | 64, + // added in xcode12 but it's the same a `Double` and can be used in earlier versions + Float64 = 0x10000 | 64, + Float32 = 0x10000 | 32, + // added in xcode12 but it's the same a `Float32` and can be used in earlier versions + Float = 0x10000 | 32, + Int32 = 0x20000 | 32, } [Watch (5,0), TV (12,0), Mac (10,14), iOS (12,0)] @@ -109,7 +116,7 @@ public enum MLUpdateProgressEvent : ulong { [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] [BaseType (typeof (NSObject))] - interface MLDictionaryFeatureProvider : MLFeatureProvider { + interface MLDictionaryFeatureProvider : MLFeatureProvider, NSSecureCoding { [Export ("dictionary")] NSDictionary Dictionary { get; } @@ -168,7 +175,7 @@ interface MLFeatureProvider { [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] [BaseType (typeof (NSObject))] - interface MLFeatureValue : NSCopying { + interface MLFeatureValue : NSCopying, NSSecureCoding { [Export ("type")] MLFeatureType Type { get; } @@ -398,6 +405,12 @@ interface MLModel { [return: NullAllowed] NSObject GetParameterValue (MLParameterKey key, [NullAllowed] out NSError error); + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Async] + [Export ("loadContentsOfURL:configuration:completionHandler:")] + void LoadContents (NSUrl url, MLModelConfiguration configuration, Action handler); + // Category MLModel (MLModelCompilation) [Static] @@ -429,6 +442,10 @@ interface MLModelDescription : NSSecureCoding { [Wrap ("_Metadata")] MLModelMetadata Metadata { get; } + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [NullAllowed, Export ("classLabels", ArgumentSemantic.Copy)] + NSObject[] ClassLabels { get; } + // From MLModelDescription (MLUpdateAdditions) [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] @@ -480,7 +497,7 @@ interface MLModelMetadata { [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] - interface MLMultiArray { + interface MLMultiArray : NSSecureCoding { [Export ("dataPointer")] IntPtr DataPointer { get; } @@ -532,6 +549,13 @@ interface MLMultiArray { [Internal] // Bind 'key' as IntPtr to avoid multiple conversions (nint[] -> NSNumber[] -> NSArray) void SetObject (NSNumber obj, IntPtr key); + + // @interface Concatenating (MLMultiArray) + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("multiArrayByConcatenatingMultiArrays:alongAxis:dataType:")] + MLMultiArray Concat (MLMultiArray[] multiArrays, nint axis, MLMultiArrayDataType dataType); } [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] @@ -710,7 +734,7 @@ interface MLMultiArrayShapeConstraint : NSSecureCoding { [Watch (5,0), TV (12,0), Mac (10,14), iOS (12,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] - interface MLSequence { + interface MLSequence : NSSecureCoding { [Export ("type")] MLFeatureType Type { get; } @@ -968,6 +992,18 @@ interface MLUpdateTask { [return: NullAllowed] MLUpdateTask Create (NSUrl modelUrl, IMLBatchProvider trainingData, [NullAllowed] MLModelConfiguration configuration, MLUpdateProgressHandlers progressHandlers, [NullAllowed] out NSError error); + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("updateTaskForModelAtURL:trainingData:completionHandler:error:")] + [return: NullAllowed] + MLUpdateTask Create (NSUrl modelUrl, IMLBatchProvider trainingData, Action completionHandler, [NullAllowed] out NSError error); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("updateTaskForModelAtURL:trainingData:progressHandlers:error:")] + [return: NullAllowed] + MLUpdateTask Create (NSUrl modelUrl, IMLBatchProvider trainingData, MLUpdateProgressHandlers progressHandlers, [NullAllowed] out NSError error); + [Export ("resumeWithParameters:")] void Resume (NSDictionary updateParameters); } @@ -982,4 +1018,50 @@ interface MLWritable { [Export ("writeToURL:error:")] bool Write (NSUrl url, [NullAllowed] out NSError error); } + + [Mac (11,0), iOS (14,0)] + [NoTV][NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLModelCollection { + + [Export ("identifier")] + string Identifier { get; } + + [Export ("deploymentID")] + string DeploymentId { get; } + + [Export ("entries", ArgumentSemantic.Copy)] + NSDictionary Entries { get; } + + [Static] + [Async] + [Export ("beginAccessingModelCollectionWithIdentifier:completionHandler:")] + NSProgress BeginAccessingModelCollection (string identifier, Action completionHandler); + + [Static] + [Async] + [Export ("endAccessingModelCollectionWithIdentifier:completionHandler:")] + void EndAccessingModelCollection (string identifier, Action completionHandler); + + [Notification] + [Field ("MLModelCollectionDidChangeNotification")] + NSString DidChangeNotification { get; } + } + + [Mac (11,0), iOS (14,0)] + [NoTV][NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLModelCollectionEntry { + + [Export ("modelIdentifier")] + string ModelIdentifier { get; } + + [Export ("modelURL")] + NSUrl ModelUrl { get; } + + [Export ("isEqualToModelCollectionEntry:")] + bool IsEqual (MLModelCollectionEntry entry); + } } diff --git a/src/coremotion.cs b/src/coremotion.cs index 9458ea1b7076..4a95fc292d43 100644 --- a/src/coremotion.cs +++ b/src/coremotion.cs @@ -203,6 +203,10 @@ interface CMDeviceMotion : NSSecureCoding { [Watch (4,0), iOS (11,0)] [Export ("heading")] double Heading { get; } + + [iOS (14,0)][Watch (7,0)][Mac (11,0)] + [Export ("sensorLocation")] + CMDeviceMotionSensorLocation SensorLocation { get; } } [Mac (10,15)] @@ -621,6 +625,8 @@ public enum CMError { NotAvailable, NotEntitled, NotAuthorized, + NilData, + Size, } [NoMac] @@ -643,4 +649,84 @@ public enum CMMotionActivityConfidence : long { Medium, High, } + + [iOS (14,0)][Watch (7,0)][Mac (11,0)] + [Native] + public enum CMDeviceMotionSensorLocation : long { + Default, + HeadphoneLeft, + HeadphoneRight, + } + + [iOS (14,0)][Watch (7,0)] + [NoMac] + delegate void CMHeadphoneDeviceMotionHandler ([NullAllowed] CMDeviceMotion motion, [NullAllowed] NSError error); + + [iOS (14,0)][Watch (7,0)] + [NoMac] + [BaseType (typeof(NSObject))] + interface CMHeadphoneMotionManager { + + [Static] + [Export ("authorizationStatus")] + CMAuthorizationStatus AuthorizationStatus { get; } + + [Wrap ("WeakDelegate")] + [NullAllowed] + ICMHeadphoneMotionManagerDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [Export ("deviceMotionAvailable")] + bool DeviceMotionAvailable { [Bind ("isDeviceMotionAvailable")] get; } + + [Export ("deviceMotionActive")] + bool DeviceMotionActive { [Bind ("isDeviceMotionActive")] get; } + + [NullAllowed, Export ("deviceMotion")] + CMDeviceMotion DeviceMotion { get; } + + [Export ("startDeviceMotionUpdates")] + void StartDeviceMotionUpdates (); + + [Export ("startDeviceMotionUpdatesToQueue:withHandler:")] + void StartDeviceMotionUpdates (NSOperationQueue queue, CMHeadphoneDeviceMotionHandler handler); + + [Export ("stopDeviceMotionUpdates")] + void StopDeviceMotionUpdates (); + } + + interface ICMHeadphoneMotionManagerDelegate {} + + [iOS (14,0)][Watch (7,0)] + [NoMac] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface CMHeadphoneMotionManagerDelegate { + + [Export ("headphoneMotionManagerDidConnect:")] + void DidConnect (CMHeadphoneMotionManager manager); + + [Export ("headphoneMotionManagerDidDisconnect:")] + void DidDisconnect (CMHeadphoneMotionManager manager); + } + + [Watch (7,0), NoMac, iOS (14,0)] + [BaseType (typeof (CMLogItem))] + [DisableDefaultCtor] + interface CMRotationRateData { + + [Export ("rotationRate")] + CMRotationRate RotationRate { get; } + } + + [Watch (7,0), NoMac, iOS (14,0)] + [BaseType (typeof (CMRotationRateData))] + [DisableDefaultCtor] + interface CMRecordedRotationRateData { + + [Export ("startDate")] + NSDate StartDate { get; } + } } diff --git a/src/corenfc.cs b/src/corenfc.cs index 0a4e0e86266a..183941a9984a 100644 --- a/src/corenfc.cs +++ b/src/corenfc.cs @@ -132,10 +132,15 @@ interface NFCIso15693ReadMultipleBlocksConfiguration { interface INFCIso15693Tag { } + delegate void NFCIso15693TagReadMultipleBlocksCallback (NSData[] dataBlocks, NSError error); + delegate void NFCIso15693TagResponseCallback (NFCIso15693ResponseFlag responseFlag, NSData response, NSError error); + delegate void NFCIso15693TagGetMultipleBlockSecurityStatusCallback (NSNumber [] securityStatus, NSError error); + delegate void NFCIso15693TagGetSystemInfoAndUidCallback (NSData uid, nint dsfid, nint afi, nint blockSize, nint blockCount, nint icReference, NSError error); + //[iOS (11,0), NoTV, NoWatch, NoMac] [iOS (11,0)] [Protocol (Name = "NFCISO15693Tag")] - interface NFCIso15693Tag : NFCTag { + interface NFCIso15693Tag : NFCTag, NFCNdefTag { [Abstract] [Export ("identifier", ArgumentSemantic.Copy)] @@ -289,6 +294,84 @@ interface NFCIso15693Tag : NFCTag { #endif [Export ("extendedReadMultipleBlocksWithRequestFlags:blockRange:completionHandler:")] void ExtendedReadMultipleBlocks (RequestFlag flags, NSRange blockRange, Action completionHandler); + + [iOS (14, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("extendedWriteMultipleBlocksWithRequestFlags:blockRange:dataBlocks:completionHandler:")] + void ExtendedWriteMultipleBlocks (RequestFlag flags, NSRange blockRange, NSData[] dataBlocks, Action completionHandler); + + [iOS (14, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("authenticateWithRequestFlags:cryptoSuiteIdentifier:message:completionHandler:")] + void Authenticate (RequestFlag flags, nint cryptoSuiteIdentifier, NSData message, NFCIso15693TagResponseCallback completionHandler); + + [iOS (14, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("keyUpdateWithRequestFlags:keyIdentifier:message:completionHandler:")] + void KeyUpdate (RequestFlag flags, nint keyIdentifier, NSData message, NFCIso15693TagResponseCallback completionHandler); + + [iOS (14, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("challengeWithRequestFlags:cryptoSuiteIdentifier:message:completionHandler:")] + void Challenge (RequestFlag flags, nint cryptoSuiteIdentifier, NSData message, Action completionHandler); + + [iOS (14, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("readBufferWithRequestFlags:completionHandler:")] + void ReadBuffer (RequestFlag flags, NFCIso15693TagResponseCallback completionHandler); + + [iOS (14, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("extendedGetMultipleBlockSecurityStatusWithRequestFlag:blockRange:completionHandler:")] + void ExtendedGetMultipleBlockSecurityStatus (RequestFlag flags, NSRange blockRange, NFCIso15693TagGetMultipleBlockSecurityStatusCallback completionHandler); + + [iOS (14, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("extendedFastReadMultipleBlocksWithRequestFlag:blockRange:completionHandler:")] + void ExtendedFastReadMultipleBlocks (RequestFlag flags, NSRange blockRange, NFCIso15693TagReadMultipleBlocksCallback completionHandler); + + [iOS (14, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("sendRequestWithFlag:commandCode:data:completionHandler:")] + void SendRequest (nint flags, nint commandCode, [NullAllowed] NSData data, NFCIso15693TagResponseCallback completionHandler); + + [iOS (14, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("getSystemInfoAndUIDWithRequestFlag:completionHandler:")] + void GetSystemInfoAndUid (RequestFlag flags, NFCIso15693TagGetSystemInfoAndUidCallback completionHandler); + + [iOS (14, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("fastReadMultipleBlocksWithRequestFlag:blockRange:completionHandler:")] + void FastReadMultipleBlocks (RequestFlag flags, NSRange blockRange, NFCIso15693TagReadMultipleBlocksCallback completionHandler); + + [iOS (14, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("lockDSFIDWithRequestFlag:completionHandler:")] + void LockDsfId (RequestFlag flags, Action completionHandler); + } [iOS (11,0)] @@ -568,7 +651,13 @@ interface NSUserActivity_CoreNFC { [iOS (13,0)] [Native] - enum EncryptionId : long { +#if XAMCORE_4_0 + enum NFCFeliCaEncryptionId +#else + [Advice ("The native name of this enum is 'NFCFeliCaEncryptionId'.")] + enum EncryptionId +#endif + : long { Aes = 79, Des = 65, } @@ -601,7 +690,13 @@ enum NFCPollingOption : ulong { [iOS (13,0)] [Native] - enum PollingRequestCode : long { +#if XAMCORE_4_0 + enum NFCFeliCaPollingRequestCode +#else + [Advice ("The native name of this enum is 'NFCFeliCaPollingRequestCode'.")] + enum PollingRequestCode +#endif + : long { NoRequest = 0, SystemCode = 1, CommunicationPerformance = 2, @@ -609,7 +704,13 @@ enum PollingRequestCode : long { [iOS (13,0)] [Native] - enum PollingTimeSlot : long { +#if XAMCORE_4_0 + enum NFCFeliCaPollingTimeSlot +#else + [Advice ("The native name of this enum is 'NFCFeliCaPollingTimeSlot'.")] + enum PollingTimeSlot +#endif + : long { Max1 = 0, Max2 = 1, Max4 = 3, @@ -619,18 +720,44 @@ enum PollingTimeSlot : long { [iOS (13,0)] [Flags] - enum RequestFlag : byte { +#if XAMCORE_4_0 + enum NFCIso15693RequestFlag +#else + [Advice ("The native name of this enum is 'NFCIso15693RequestFlag'.")] + enum RequestFlag +#endif + : byte { DualSubCarriers = (1 << 0), HighDataRate = (1 << 1), ProtocolExtension = (1 << 3), Select = (1 << 4), Address = (1 << 5), Option = (1 << 6), + [iOS (14,0)] + CommandSpecificBit8 = (1 << 7), + } + + [Flags, iOS (14, 0)] + public enum NFCIso15693ResponseFlag : byte + { + Error = (1 << 0), + ResponseBufferValid = (1 << 1), + FinalResponse = (1 << 2), + ProtocolExtension = (1 << 3), + BlockSecurityStatusBit5 = (1 << 4), + BlockSecurityStatusBit6 = (1 << 5), + WaitTimeExtension = (1 << 6), } [iOS (13,0)] [Native] - enum VasErrorCode : long { +#if XAMCORE_4_0 + enum NFCVasErrorCode +#else + [Advice ("The native name of this enum is 'NFCVasErrorCode'.")] + enum VasErrorCode +#endif + : long { Success = 36864, DataNotFound = 27267, DataNotActivated = 25223, @@ -643,7 +770,13 @@ enum VasErrorCode : long { [iOS (13,0)] [Native] - enum VasMode : long { +#if XAMCORE_4_0 + enum NFCVasMode +#else + [Advice ("The native name of this enum is 'NFCVasMode'.")] + enum VasMode +#endif + : long { UrlOnly = 0, Normal = 1, } diff --git a/src/corespotlight.cs b/src/corespotlight.cs index 71e5e0aaa39a..64d78dc457b2 100644 --- a/src/corespotlight.cs +++ b/src/corespotlight.cs @@ -11,6 +11,7 @@ using System.ComponentModel; using ObjCRuntime; using Foundation; +using UniformTypeIdentifiers; namespace CoreSpotlight { @@ -257,9 +258,15 @@ interface CSMailboxKey { [BaseType (typeof (NSObject))] interface CSSearchableItemAttributeSet : NSCopying, NSSecureCoding { + [Deprecated (PlatformName.iOS, 14,0, message: "Use '.ctor(UTType)' instead.")] + [Deprecated (PlatformName.MacOSX, 11,0, message: "Use '.ctor(UTType)' instead.")] [Export ("initWithItemContentType:")] IntPtr Constructor (string itemContentType); + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [Export ("initWithContentType:")] + IntPtr Constructor (UTType contentType); + // FIXME: Should we keep all the following Categories inline? or should we make them actual [Category] interfaces // There are no methods on any of the following categories, just properties diff --git a/src/coretelephony.cs b/src/coretelephony.cs index 39a9e01f8921..6882448942fd 100644 --- a/src/coretelephony.cs +++ b/src/coretelephony.cs @@ -3,6 +3,7 @@ using System; namespace CoreTelephony { + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [BaseType (typeof (NSObject))] interface CTCall { [Availability (Deprecated = Platform.iOS_10_0, Message = "Use 'CallKit' instead.")] @@ -15,6 +16,7 @@ interface CTCall { } + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [iOS (9,0)] [BaseType (typeof (NSObject))] interface CTCellularData { @@ -26,6 +28,7 @@ interface CTCellularData { } + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [Static] [iOS (7,0)] interface CTRadioAccessTechnology { @@ -65,6 +68,7 @@ interface CTRadioAccessTechnology { interface ICTTelephonyNetworkInfoDelegate {} + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [iOS (13,0)] [Protocol, Model (AutoGeneratedName = true)] [BaseType (typeof (NSObject))] @@ -74,6 +78,7 @@ interface CTTelephonyNetworkInfoDelegate { void DataServiceIdentifierDidChange (string identifier); } + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [BaseType (typeof (NSObject))] interface CTTelephonyNetworkInfo { [Deprecated (PlatformName.iOS, 12,0, message: "Use 'ServiceSubscriberCellularProviders' instead.")] @@ -106,6 +111,7 @@ interface CTTelephonyNetworkInfo { [Export ("serviceSubscriberCellularProvidersDidUpdateNotifier", ArgumentSemantic.Copy)] Action ServiceSubscriberCellularProvidersDidUpdateNotifier { get; set; } + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [iOS (12,0)] [Notification] [Field ("CTServiceRadioAccessTechnologyDidChangeNotification")] @@ -125,6 +131,7 @@ interface CTTelephonyNetworkInfo { NSObject WeakDelegate { get; set; } } + [Obsoleted (PlatformName.iOS, 14,0, message: "Replaced by 'CXCallObserver' from 'CallKit'.")] [Deprecated (PlatformName.iOS, 10, 0, message: "Replaced by 'CXCallObserver' from 'CallKit'.")] [BaseType (typeof (NSObject))] interface CTCallCenter { @@ -140,6 +147,7 @@ interface CTCallCenter { } + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [BaseType (typeof (NSObject))] interface CTCarrier { [NullAllowed] @@ -164,6 +172,7 @@ interface CTCarrier { interface ICTSubscriberDelegate {} + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [Protocol] [iOS (12,1)] interface CTSubscriberDelegate { @@ -172,6 +181,7 @@ interface CTSubscriberDelegate { void SubscriberTokenRefreshed (CTSubscriber subscriber); } + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [BaseType (typeof (NSObject))] [iOS (7,0)] partial interface CTSubscriber { @@ -194,6 +204,7 @@ partial interface CTSubscriber { ICTSubscriberDelegate Delegate { get; set; } } + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [BaseType (typeof (NSObject))] partial interface CTSubscriberInfo { [Deprecated (PlatformName.iOS, 12, 1, message : "Use 'Subscribers' instead.")] @@ -207,6 +218,7 @@ partial interface CTSubscriberInfo { CTSubscriber[] Subscribers { get; } } + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [iOS (12,0)] [BaseType (typeof (NSObject))] interface CTCellularPlanProvisioningRequest : NSSecureCoding { @@ -229,6 +241,7 @@ interface CTCellularPlanProvisioningRequest : NSSecureCoding { string Eid { get; set; } } + [Obsoleted (PlatformName.iOS, 14,0, message: "Use the 'CallKit' API instead.")] [iOS (12,0)] [BaseType (typeof (NSObject))] interface CTCellularPlanProvisioning { diff --git a/src/corevideo.cs b/src/corevideo.cs index e02676fcb45e..ece221799f3d 100644 --- a/src/corevideo.cs +++ b/src/corevideo.cs @@ -2,6 +2,7 @@ // corevideo.cs: Definitions for CoreVideo // // Copyright 2014 Xamarin Inc. All rights reserved. +// Copyright 2020 Microsoft Corporation // using System; @@ -348,10 +349,14 @@ enum CVImageBufferYCbCrMatrix { [Field ("kCVImageBufferYCbCrMatrix_SMPTE_240M_1995")] Smpte240M1995, + [Deprecated (PlatformName.iOS, 14, 0, message: "This API is no longer supported.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "This API is no longer supported.")] [Field ("kCVImageBufferYCbCrMatrix_DCI_P3")] [iOS (9,0), Mac (10,12)] DciP3, + [Deprecated (PlatformName.iOS, 14, 0, message: "This API is no longer supported.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "This API is no longer supported.")] [Field ("kCVImageBufferYCbCrMatrix_P3_D65")] [iOS (9,0), Mac (10,12)] P3D65, @@ -426,6 +431,55 @@ interface CVPixelBuffer { [Field ("kCVPixelBufferOpenGLTextureCacheCompatibilityKey")] NSString OpenGLTextureCacheCompatibilityKey { get; } #endif + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using MacCatalyst.")] + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Field ("kCVPixelBufferProResRAWKey_BlackLevel")] + NSString ProResRawKey_BlackLevel { get; } + + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using MacCatalyst.")] + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Field ("kCVPixelBufferProResRAWKey_ColorMatrix")] + NSString ProResRawKey_ColorMatrix { get; } + + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using MacCatalyst.")] + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Field ("kCVPixelBufferProResRAWKey_GainFactor")] + NSString ProResRawKey_GainFactor { get; } + + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using MacCatalyst.")] + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Field ("kCVPixelBufferProResRAWKey_RecommendedCrop")] + NSString ProResRawKey_RecommendedCrop { get; } + + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using MacCatalyst.")] + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Field ("kCVPixelBufferProResRAWKey_SenselSitingOffsets")] + NSString ProResRawKey_SenselSitingOffsets { get; } + + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using MacCatalyst.")] + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Field ("kCVPixelBufferProResRAWKey_WhiteBalanceBlueFactor")] + NSString ProResRawKey_WhiteBalanceBlueFactor { get; } + + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using MacCatalyst.")] + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Field ("kCVPixelBufferProResRAWKey_WhiteBalanceCCT")] + NSString ProResRawKey_WhiteBalanceCct { get; } + + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using MacCatalyst.")] + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Field ("kCVPixelBufferProResRAWKey_WhiteBalanceRedFactor")] + NSString ProResRawKey_WhiteBalanceRedFactor { get; } + + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using MacCatalyst.")] + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Field ("kCVPixelBufferProResRAWKey_WhiteLevel")] + NSString ProResRawKey_WhiteLevel { get; } + + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using MacCatalyst.")] + [NoWatch, NoTV, NoMac, iOS (14, 0)] + [Field ("kCVPixelBufferVersatileBayerKey_BayerPattern")] + NSString VersatileBayerKey_BayerPattern { get; } } [Partial] @@ -475,4 +529,13 @@ interface CVMetalTextureAttributesKeys { interface CVMetalTextureAttributes { // Create stub DictionaryContainer class } + + [NoWatch, NoTV, NoMac, iOS (14, 0)] + public enum CVVersatileBayerPattern : uint + { + Rggb = 0, + Grbg = 1, + Gbrg = 2, + Bggr = 3, + } } diff --git a/src/corewlan.cs b/src/corewlan.cs index eaa1cfb19236..9c5890ba6c8f 100644 --- a/src/corewlan.cs +++ b/src/corewlan.cs @@ -145,6 +145,7 @@ interface CWMutableConfiguration { [Export ("requireAdministratorForPower", ArgumentSemantic.Assign)] bool RequireAdministratorForPower { get; set; } + [Deprecated (PlatformName.MacOSX, 11,0)] [Export ("requireAdministratorForIBSSMode", ArgumentSemantic.Assign)] bool RequireAdministratorForIbssMode { get; set; } @@ -406,6 +407,7 @@ interface CWInterface { [Export ("associateToEnterpriseNetwork:identity:username:password:error:")] bool AssociateToEnterpriseNetwork (CWNetwork network, SecIdentity identity, string username, string password, out NSError error); + [Deprecated (PlatformName.MacOSX, 11,0)] [Export ("startIBSSModeWithSSID:security:channel:password:error:")] bool StartIbssModeWithSsid (NSData ssidData, CWIbssModeSecurity security, nuint channel, string password, out NSError error); diff --git a/src/devicecheck.cs b/src/devicecheck.cs index 0cbd14a662e5..aea620dfe76c 100644 --- a/src/devicecheck.cs +++ b/src/devicecheck.cs @@ -20,7 +20,10 @@ namespace DeviceCheck { [Native] public enum DCError : long { UnknownSystemFailure, - FeatureUnsupported + FeatureUnsupported, + InvalidInput, + InvalidKey, + ServerUnavailable, } [TV (11,0), NoWatch, iOS (11,0)] @@ -44,4 +47,30 @@ interface DCDevice { [Export ("generateTokenWithCompletionHandler:")] void GenerateToken (DCDeviceGenerateTokenCompletionHandler completion); } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [DisableDefaultCtor] + [BaseType (typeof (NSObject))] + interface DCAppAttestService { + + [Static] + [Export ("sharedService")] + DCAppAttestService SharedService { get; } + + [Export ("supported")] + bool Supported { [Bind ("isSupported")] get; } + + [Async] + [Export ("generateKeyWithCompletionHandler:")] + void GenerateKey (Action completionHandler); + + [Async] + [Export ("attestKey:clientDataHash:completionHandler:")] + void AttestKey (string keyId, NSData clientDataHash, Action completionHandler); + + [Async] + [Export ("generateAssertion:clientDataHash:completionHandler:")] + void GenerateAssertion (string keyId, NSData clientDataHash, Action completionHandler); + } } diff --git a/src/fileprovider.cs b/src/fileprovider.cs index 18b67f38feb3..138ae1c07bb4 100644 --- a/src/fileprovider.cs +++ b/src/fileprovider.cs @@ -13,6 +13,7 @@ using ObjCRuntime; using CoreGraphics; using Foundation; +using UniformTypeIdentifiers; #if IOS && !XAMCORE_4_0 using FileProvider; @@ -30,54 +31,46 @@ namespace FileProvider { [NoTV] [iOS (8,0)] [NoMac] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [ThreadSafe] [BaseType (typeof (NSObject))] partial interface NSFileProviderExtension { - [NoMac] + [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'NSFileProviderManager' instead.")] [Static, Export ("writePlaceholderAtURL:withMetadata:error:")] bool WritePlaceholder (NSUrl placeholderUrl, NSDictionary metadata, ref NSError error); - [NoMac] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'NSFileProviderManager.GetPlaceholderUrl (NSUrl)' instead.")] [Static, Export ("placeholderURLForURL:")] NSUrl GetPlaceholderUrl (NSUrl url); - [NoMac] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'NSFileProviderManager.ProviderIdentifier' instead.")] [Export ("providerIdentifier")] string ProviderIdentifier { get; } - [NoMac] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'NSFileProviderManager.DocumentStorageUrl' instead.")] [Export ("documentStorageURL")] NSUrl DocumentStorageUrl { get; } - [NoMac] [return: NullAllowed] [Export ("URLForItemWithPersistentIdentifier:")] NSUrl GetUrlForItem (string persistentIdentifier); - [NoMac] [return: NullAllowed] [Export ("persistentIdentifierForItemAtURL:")] string GetPersistentIdentifier (NSUrl itemUrl); - [NoMac] [Export ("providePlaceholderAtURL:completionHandler:")] [Async] void ProvidePlaceholderAtUrl (NSUrl url, Action completionHandler); - [NoMac] [Export ("startProvidingItemAtURL:completionHandler:")] [Async] void StartProvidingItemAtUrl (NSUrl url, Action completionHandler); - [NoMac] [Export ("itemChangedAtURL:")] void ItemChangedAtUrl (NSUrl url); - [NoMac] [Export ("stopProvidingItemAtURL:")] void StopProvidingItemAtUrl (NSUrl url); @@ -88,106 +81,61 @@ partial interface NSFileProviderExtension { // Inlining NSFileProviderExtension (NSFileProviderActions) so we get asyncs - [NoMac] - [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Import' instead.")] [iOS (11,0)] [Async] [Export ("importDocumentAtURL:toParentItemIdentifier:completionHandler:")] void ImportDocument (NSUrl fileUrl, string parentItemIdentifier, Action completionHandler); - [NoMac] - [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'CreateItem' instead.")] [iOS (11,0)] [Async] [Export ("createDirectoryWithName:inParentItemIdentifier:completionHandler:")] void CreateDirectory (string directoryName, string parentItemIdentifier, Action completionHandler); - [NoMac] - [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ItemChanged' instead.")] [iOS (11,0)] [Async] [Export ("renameItemWithIdentifier:toName:completionHandler:")] void RenameItem (string itemIdentifier, string itemName, Action completionHandler); - [NoMac] - [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ItemChanged' instead.")] [iOS (11,0)] [Async] [Export ("reparentItemWithIdentifier:toParentItemWithIdentifier:newName:completionHandler:")] void ReparentItem (string itemIdentifier, string parentItemIdentifier, [NullAllowed] string newName, Action completionHandler); - [NoMac] - [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ItemChanged' instead.")] [iOS (11,0)] [Async] [Export ("trashItemWithIdentifier:completionHandler:")] void TrashItem (string itemIdentifier, Action completionHandler); - [NoMac] - [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ItemChanged' instead.")] [iOS (11,0)] [Async] [Export ("untrashItemWithIdentifier:toParentItemIdentifier:completionHandler:")] void UntrashItem (string itemIdentifier, [NullAllowed] string parentItemIdentifier, Action completionHandler); - [NoMac] - [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'DeleteItem (NSString, NSFileProviderItemVersion, NSFileProviderDeleteItemOptions, Action)' instead.")] [iOS (11,0)] [Async] [Export ("deleteItemWithIdentifier:completionHandler:")] void DeleteItem (string itemIdentifier, Action completionHandler); - [NoMac] - [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ItemChanged' instead.")] [iOS (11,0)] [Async] [Export ("setLastUsedDate:forItemIdentifier:completionHandler:")] void SetLastUsedDate ([NullAllowed] NSDate lastUsedDate, string itemIdentifier, Action completionHandler); - [NoMac] - [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ItemChanged' instead.")] [iOS (11,0)] [Async] [Export ("setTagData:forItemIdentifier:completionHandler:")] void SetTagData ([NullAllowed] NSData tagData, string itemIdentifier, Action completionHandler); - [NoMac] - [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ItemChanged' instead.")] [iOS (11,0)] [Async] [Export ("setFavoriteRank:forItemIdentifier:completionHandler:")] void SetFavoriteRank ([NullAllowed] NSNumber favoriteRank, string itemIdentifier, Action completionHandler); - [NoiOS] - [Async] - [Export ("performActionWithIdentifier:onItemsWithIdentifiers:completionHandler:")] - NSProgress PerformAction (NSString actionIdentifier, NSString[] itemIdentifiers, Action completionHandler); - - [NoiOS] - [Async (ResultTypeName = "NSFileProviderExtensionFetchResult")] - [Export ("fetchContentsForItemWithIdentifier:version:completionHandler:")] - NSProgress FetchContents (NSString itemIdentifier, [NullAllowed] NSFileProviderItemVersion requestedVersion, NSFileProviderExtensionFetchHandler completionHandler); - - [NoiOS] - [Async (ResultTypeName = "NSFileProviderExtensionFetchResult")] - [Export ("fetchContentsForItemWithIdentifier:version:usingExistingContentsAtURL:existingVersion:completionHandler:")] - NSProgress FetchContents (NSString itemIdentifier, [NullAllowed] NSFileProviderItemVersion requestedVersion, NSUrl existingContents, NSFileProviderItemVersion existingVersion, NSFileProviderExtensionFetchHandler completionHandler); - - [NoiOS] - [Async] - [Export ("itemChanged:baseVersion:changedFields:contents:completionHandler:")] - void ItemChanged (INSFileProviderItem item, NSFileProviderItemVersion version, NSFileProviderItemField changedFields, [NullAllowed] NSUrl newContents, Action completionHandler); - #region NSFileProviderEnumeration (NSFileProviderExtension) [iOS (11,0)] [Export ("enumeratorForContainerItemIdentifier:error:")] [return: NullAllowed] INSFileProviderEnumerator GetEnumerator (string containerItemIdentifier, out NSError error); - - [NoiOS] - [Export ("enumeratorForSearchQuery:error:")] - [return: NullAllowed] - INSFileProviderEnumerator GetEnumerator (NSFileProviderSearchQuery searchQuery, [NullAllowed] out NSError error); #endregion // From NSFileProviderExtension (NSFileProviderThumbnailing) @@ -209,49 +157,14 @@ partial interface NSFileProviderExtension { [iOS (11,0)] [NullAllowed, Export ("domain")] NSFileProviderDomain Domain { get; } - -#region CreateItem (NSFileProviderExtension) - [NoiOS] - [Export ("createItemBasedOnTemplate:fields:contents:options:completionHandler:")] - [Async] - void CreateItem (INSFileProviderItem itemTemplate, NSFileProviderItemField fields, [NullAllowed] NSUrl url, NSFileProviderCreateItemOptions options, Action completionHandler); -#endregion - -#region DeleteItem (NSFileProviderExtension) - [NoiOS] - [Export ("deleteItemWithIdentifier:baseVersion:options:completionHandler:")] - [Async] - void DeleteItem (NSString itemIdentifier, NSFileProviderItemVersion version, NSFileProviderDeleteItemOptions options, Action completionHandler); -#endregion - -#region Import (NSFileProviderExtension) - [NoiOS] - [Export ("importDidFinishWithCompletionHandler:")] - [Async] - void ImportDidFinish (Action completionHandler); -#endregion - -#region MaterializedSet (NSFileProviderExtension) - [NoiOS] - [Export ("materializedItemsDidChangeWithCompletionHandler:")] - [Async] - void MaterializedItemsDidChange (Action completionHandler); -#endregion - -#region Request (NSFileProviderExtension) - [NoiOS] - [NullAllowed, Export ("currentRequest")] - NSFileProviderRequest CurrentRequest { get; } -#endregion } - - delegate void NSFileProviderExtensionFetchHandler (NSUrl fileContents, INSFileProviderItem item, NSError error); } namespace FileProvider { [iOS (11,0)] - [NoMac] + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [ErrorDomain ("NSFileProviderErrorDomain")] [Native] enum NSFileProviderError : long { @@ -266,10 +179,21 @@ enum NSFileProviderError : long { VersionOutOfDate = -1006, [NoiOS] DirectoryNotEmpty = -1007, + [NoiOS] + ProviderNotFound = -2001, + [NoiOS] + ProviderTranslocated = -2002, + [NoiOS] + OlderExtensionVersionRunning = -2003, + [NoiOS] + NewerExtensionVersionFound = -2004, + [NoiOS] + CannotSynchronize = -2005, } [iOS (11,0)] - [NoMac] + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [Static] interface NSFileProviderErrorKeys { @@ -287,7 +211,8 @@ interface NSFileProviderErrorKeys { } [iOS (11,0)] - [NoMac] + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [Static] interface NSFileProviderFavoriteRank { @@ -296,7 +221,8 @@ interface NSFileProviderFavoriteRank { } [iOS (11,0)] - [NoMac] + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [Static] interface NSFileProviderItemIdentifier { @@ -305,10 +231,15 @@ interface NSFileProviderItemIdentifier { [Field ("NSFileProviderWorkingSetContainerItemIdentifier")] NSString WorkingSetContainer { get; } + + [NoiOS] + [Field ("NSFileProviderTrashContainerItemIdentifier")] + NSString TrashContainer { get; } } [iOS (11,0)] [Mac (10,15)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [Native] [Flags] enum NSFileProviderItemCapabilities : ulong { @@ -324,7 +255,8 @@ enum NSFileProviderItemCapabilities : ulong { } [iOS (11,0)] - [NoMac] + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [Static] interface NSFileProviderPage { @@ -346,7 +278,8 @@ interface NSFileProviderPage { } [iOS (11,0)] - [NoMac] + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface NSFileProviderDomain { @@ -365,13 +298,27 @@ interface NSFileProviderDomain { [NoiOS] [Export ("disconnected")] - bool Disconnected { [Bind ("isDisconnected")] get; set; } + bool Disconnected { [Bind ("isDisconnected")] get; } + + [NoiOS] + [Export ("userEnabled")] + bool UserEnabled { get; } + + [NoiOS] + [Export ("hidden")] + bool Hidden { [Bind ("isHidden")] get; set; } + + [NoiOS] + [Notification] + [Field ("NSFileProviderDomainDidChange")] + NSString DidChange { get; } } interface INSFileProviderEnumerationObserver { } [iOS (11,0)] [Mac (10,15)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [Protocol] interface NSFileProviderEnumerationObserver { @@ -386,12 +333,18 @@ interface NSFileProviderEnumerationObserver { [Abstract] [Export ("finishEnumeratingWithError:")] void FinishEnumerating (NSError error); + + [Mac (11,0)] + [NoiOS] + [Export ("suggestedPageSize")] + nint GetSuggestedPageSize (); } interface INSFileProviderChangeObserver { } [iOS (11,0)] [Mac (10,15)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [Protocol] interface NSFileProviderChangeObserver { @@ -410,12 +363,18 @@ interface NSFileProviderChangeObserver { [Abstract] [Export ("finishEnumeratingWithError:")] void FinishEnumerating (NSError error); + + [Mac (11,0)] + [NoiOS] + [Export ("suggestedBatchSize")] + nint GetSuggestedBatchSize (); } interface INSFileProviderEnumerator { } [iOS (11,0)] [Mac (10,15)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [Protocol] interface NSFileProviderEnumerator { @@ -438,6 +397,7 @@ interface INSFileProviderItem { } [iOS (11,0)] [Mac (10,15)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [Protocol] interface NSFileProviderItem { @@ -453,10 +413,20 @@ interface NSFileProviderItem { [Export ("filename")] string Filename { get; } +#if !XAMCORE_4_0 + // became optional when deprecated [Abstract] +#endif + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'GetContentType' instead.")] + [Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'GetContentType' instead.")] [Export ("typeIdentifier")] string TypeIdentifier { get; } + [iOS (14,0)] + [Mac (11,0)] + [Export ("contentType", ArgumentSemantic.Copy)] + UTType GetContentType (); + [Export ("capabilities")] NSFileProviderItemCapabilities GetCapabilities (); @@ -534,7 +504,6 @@ interface NSFileProviderItem { NSPersonNameComponents GetMostRecentEditorNameComponents (); [NoMac] - [Deprecated (PlatformName.iOS, 13,0, message: "Use 'ItemVersion' instead.")] [return: NullAllowed] [Export ("versionIdentifier")] NSData GetVersionIdentifier (); @@ -544,34 +513,33 @@ interface NSFileProviderItem { NSDictionary GetUserInfo (); [NoiOS] - [NoMac] [Export ("excludedFromSync")] bool ExcludedFromSync { [Bind ("isExcludedFromSync")] get; } [NoiOS] - [NoMac] - [Export ("flags", ArgumentSemantic.Strong)] - [NullAllowed] - INSFileProviderItemFlags Flags { get; } + [Export ("fileSystemFlags")] + NSFileProviderFileSystemFlags FileSystemFlags { get; } [NoiOS] - [NoMac] - [NullAllowed, Export ("extendedAttributes", ArgumentSemantic.Strong)] + [Export ("extendedAttributes", ArgumentSemantic.Strong)] NSDictionary ExtendedAttributes { get; } [NoiOS] - [NoMac] [NullAllowed, Export ("itemVersion", ArgumentSemantic.Strong)] NSFileProviderItemVersion ItemVersion { get; } + + [NoiOS] + [NullAllowed, Export ("symlinkTargetPath")] + string SymlinkTargetPath { get; } } [iOS (11,0)] - [NoMac] + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSFileProviderManager { - [NoMac] [Static] [Export ("defaultManager", ArgumentSemantic.Strong)] NSFileProviderManager DefaultManager { get; } @@ -634,6 +602,16 @@ interface NSFileProviderManager { [Export ("getUserVisibleURLForItemIdentifier:completionHandler:")] void GetUserVisibleUrl (NSString itemIdentifier, Action completionHandler); + [NoiOS] + [Export ("temporaryDirectoryURLWithError:")] + [return: NullAllowed] + NSUrl GetTemporaryDirectoryUrl ([NullAllowed] out NSError error); + + [NoiOS] + [Async] + [Export ("signalErrorResolved:completionHandler:")] + void SignalErrorResolved (NSError error, Action completionHandler); + #region Import (NSFileProviderManager) [NoiOS] [Static] @@ -653,16 +631,44 @@ interface NSFileProviderManager { INSFileProviderEnumerator GetMaterializedItemsEnumerator (); #endregion -#region DownloadAndEviction (NSFileProviderManager) +#region Eviction (NSFileProviderManager) [NoiOS] [Export ("evictItemWithIdentifier:completionHandler:")] [Async] void EvictItem (NSString itemIdentifier, Action completionHandler); +#endregion + +#region Disconnection (NSFileProviderManager) + [NoiOS] + [Async] + [Export ("disconnectWithReason:options:completionHandler:")] + void Disconnect (string localizedReason, NSFileProviderManagerDisconnectionOptions options, Action completionHandler); [NoiOS] - [Export ("setDownloadPolicy:forItemWithIdentifier:completionHandler:")] [Async] - void SetDownloadPolicy (NSFileProviderDownloadPolicy downloadPolicy, NSString itemIdentifier, Action completionHandler); + [Export ("reconnectWithCompletionHandler:")] + void Reconnect (Action completionHandler); +#endregion + +#region Attribution (NSFileProviderManager) + [NoiOS] + [Async] + [Export ("lookupRequestingApplicationIdentifier:reason:completionHandler:")] + void LookupRequestingApplicationIdentifier (NSUuid app, string reason, Action completionHandler); +#endregion + +#region Barrier (NSFileProviderManager) + [NoiOS] + [Async] + [Export ("waitForChangesOnItemsBelowItemWithIdentifier:completionHandler:")] + void WaitForChangesOnItemsBelowItem (string itemIdentifier, Action completionHandler); +#endregion + +#region Stabilization (NSFileProviderManager) + [NoiOS] + [Async] + [Export ("waitForStabilizationWithCompletionHandler:")] + void WaitForStabilization (Action completionHandler); #endregion } @@ -672,7 +678,8 @@ interface NSFileProviderManager { interface INSFileProviderServiceSource {} [iOS (11,0)] - [NoMac] + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [Protocol] interface NSFileProviderServiceSource { @@ -686,10 +693,10 @@ interface NSFileProviderServiceSource { NSXpcListenerEndpoint MakeListenerEndpoint (out NSError error); } + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [NoiOS] - [NoMac] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // the `init*` and properties don't allow null + [BaseType (typeof(NSObject))] interface NSFileProviderItemVersion { [Export ("initWithContentVersion:metadataVersion:")] @@ -702,119 +709,206 @@ interface NSFileProviderItemVersion { NSData MetadataVersion { get; } } + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [NoiOS] - [NoMac] - [BaseType (typeof (NSObject))] - interface NSFileProviderRequest { + [Native][Flags] + enum NSFileProviderCreateItemOptions : ulong { + None = 0, + MayAlreadyExist = 1, + } - [Export ("requestingApplicationIdentifier", ArgumentSemantic.Strong)] - NSUuid RequestingApplicationIdentifier { get; } + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] + [NoiOS] + [Native][Flags] + enum NSFileProviderDeleteItemOptions : ulong { + None = 0, + Recursive = 1, } + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [NoiOS] - [NoMac] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface NSFileProviderSearchQuery { + [Native][Flags] + enum NSFileProviderModifyItemOptions : ulong { + None = 0, + MayAlreadyExist = 1, + } - [NullAllowed, Export ("filename")] - string Filename { get; } + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] + [NoiOS] + [Native][Flags] + enum NSFileProviderItemFields : ulong { + Contents = 1uL << 0, + Filename = 1uL << 1, + ParentItemIdentifier = 1uL << 2, + LastUsedDate = 1uL << 3, + TagData = 1uL << 4, + FavoriteRank = 1uL << 5, + CreationDate = 1uL << 6, + ContentModificationDate = 1uL << 7, + FileSystemFlags = 1uL << 8, + ExtendedAttributes = 1uL << 9, + } + + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] + [NoiOS] + [Native][Flags] + enum NSFileProviderManagerDisconnectionOptions : ulong { + None = 0, + Temporary = 1, + } + + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] + [NoiOS] + [Native][Flags] + enum NSFileProviderFileSystemFlags : ulong + { + UserExecutable = 1uL << 0, + UserReadable = 1uL << 1, + UserWritable = 1uL << 2, + Hidden = 1uL << 3, + PathExtensionHidden = 1uL << 4, + } - [NullAllowed, Export ("allowedContentTypes", ArgumentSemantic.Copy)] - NSSet AllowedContentTypes { get; } + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] + [NoiOS] + [BaseType (typeof (NSObject))] + interface NSFileProviderRequest { - [NullAllowed, Export ("allowedPathExtensions", ArgumentSemantic.Copy)] - NSSet AllowedPathExtensions { get; } + [Export ("requestingApplicationIdentifier", ArgumentSemantic.Strong)] + NSUuid RequestingApplicationIdentifier { get; } - [Export ("scopedToItemIdentifier")] - NSString ScopedToItemIdentifier { get; } + [Export ("isSystemRequest")] + bool IsSystemRequest { get; } - [Export ("searchContainerItemIdentifier")] - NSString SearchContainerItemIdentifier { get; } + [Export ("isFileViewerRequest")] + bool IsFileViewerRequest { get; } + + [NullAllowed] + [Export ("requestingExecutable", ArgumentSemantic.Copy)] + NSUrl RequestingExecutable { get; } } + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [NoiOS] - [NoMac] - [Flags] - [Native] - enum NSFileProviderCreateItemOptions : ulong { - None = 0, - ItemMayAlreadyExist = 1, + [Protocol] + interface NSFileProviderCustomAction { + + [Abstract] + [Export ("performActionWithIdentifier:onItemsWithIdentifiers:completionHandler:")] + NSProgress PerformAction (string actionIdentifier, string[] itemIdentifiers, Action completionHandler); } + interface INSFileProviderEnumerating {} + + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [NoiOS] - [NoMac] - [Flags] - [Native] - enum NSFileProviderDeleteItemOptions : ulong { - None = 0, - Recursive = 1, + [Protocol] + interface NSFileProviderEnumerating { + + [Abstract] + [Export ("enumeratorForContainerItemIdentifier:request:error:")] + [return: NullAllowed] + INSFileProviderEnumerator GetEnumerator (string containerItemIdentifier, NSFileProviderRequest request, [NullAllowed] out NSError error); } + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [NoiOS] - [NoMac] - [Flags] - [Native] - enum NSFileProviderDownloadPolicy : ulong { - Default = 0, - Speculative = 1, - KeepDownloaded = 2, + [Protocol] + interface NSFileProviderIncrementalContentFetching { + + [Abstract] + [Export ("fetchContentsForItemWithIdentifier:version:usingExistingContentsAtURL:existingVersion:request:completionHandler:")] + NSProgress FetchContents (string itemIdentifier, [NullAllowed] NSFileProviderItemVersion requestedVersion, NSUrl existingContents, NSFileProviderItemVersion existingVersion, NSFileProviderRequest request, NSFileProviderFetchContentsCompletionHandler completionHandler); } + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] [NoiOS] - [NoMac] - [Flags] - [Native] - enum NSFileProviderItemField : ulong { - Contents = 1 << 0, - Filename = 1 << 1, - ParentItemIdentifier = 1 << 2, - LastUsedDate = 1 << 3, - TagData = 1 << 4, - FavoriteRank = 1 << 5, - CreationDate = 1 << 6, - ContentModificationDate = 1 << 7, - Flags = 1 << 8, - Trashed = 1 << 9, - ExtendedAttributes = 1 << 10, + [Protocol] + interface NSFileProviderServicing { + + [Abstract] + [Export ("supportedServiceSourcesForItemIdentifier:completionHandler:")] + NSProgress GetSupportedServiceSources (string itemIdentifier, Action completionHandler); } - [iOS (13,0)] - [NoMac] + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] + [NoiOS] [Protocol] - interface NSFileProviderItemDecorating : NSFileProviderItem { + interface NSFileProviderThumbnailing { - [NoiOS] [Abstract] - [NullAllowed, Export ("decorations", ArgumentSemantic.Strong)] - string[] Decorations { get; } + [Export ("fetchThumbnailsForItemIdentifiers:requestedSize:perThumbnailCompletionHandler:completionHandler:")] + NSProgress FetchThumbnails (string[] itemIdentifiers, CGSize size, NSFileProviderPerThumbnailCompletionHandler perThumbnailCompletionHandler, Action completionHandler); } - interface INSFileProviderItemFlags {} + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] + [NoiOS] + delegate void NSFileProviderPerThumbnailCompletionHandler (NSString identifier, [NullAllowed] NSData imageData, [NullAllowed] NSError error); - [iOS (13,0)] - [Mac (10,15)] + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] + [NoiOS] + delegate void NSFileProviderFetchContentsCompletionHandler ([NullAllowed] NSUrl fileContents, [NullAllowed] INSFileProviderItem item, [NullAllowed] NSError error); + + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")] + [NoiOS] + delegate void NSFileProviderCreateOrModifyItemCompletionHandler ([NullAllowed] INSFileProviderItem item, NSFileProviderItemFields stillPendingFields, bool shouldFetchContent, [NullAllowed] NSError error); + + [Mac (11,0)] + [Unavailable (PlatformName.MacCatalyst)] + [NoiOS] [Protocol] - interface NSFileProviderItemFlags { + [Advice ("Implementation must expose selector 'initWithDomain:' with '.ctor (NSFileProviderDomain)'.")] + interface NSFileProviderReplicatedExtension : NSFileProviderEnumerating { + /* see Advice above [Abstract] - [Export ("userExecutable")] - bool UserExecutable { [Bind ("isUserExecutable")] get; } + [Export ("initWithDomain:")] + IntPtr Constructor (NSFileProviderDomain domain); + */ [Abstract] - [Export ("userReadable")] - bool UserReadable { [Bind ("isUserReadable")] get; } + [Export ("invalidate")] + void Invalidate (); [Abstract] - [Export ("userWritable")] - bool UserWritable { [Bind ("isUserWritable")] get; } + [Export ("itemForIdentifier:request:completionHandler:")] + NSProgress GetItem (string identifier, NSFileProviderRequest request, Action completionHandler); [Abstract] - [Export ("hidden")] - bool Hidden { [Bind ("isHidden")] get; } + [Export ("createItemBasedOnTemplate:fields:contents:options:request:completionHandler:")] + NSProgress CreateItem (INSFileProviderItem itemTemplate, NSFileProviderItemFields fields, [NullAllowed] NSUrl url, NSFileProviderCreateItemOptions options, NSFileProviderRequest request, NSFileProviderCreateOrModifyItemCompletionHandler completionHandler); + + [Abstract] + [Export ("fetchContentsForItemWithIdentifier:version:request:completionHandler:")] + NSProgress FetchContents (string itemIdentifier, [NullAllowed] NSFileProviderItemVersion requestedVersion, NSFileProviderRequest request, NSFileProviderFetchContentsCompletionHandler completionHandler); + + [Abstract] + [Export ("modifyItem:baseVersion:changedFields:contents:options:request:completionHandler:")] + NSProgress ModifyItem (INSFileProviderItem item, NSFileProviderItemVersion version, NSFileProviderItemFields changedFields, [NullAllowed] NSUrl newContents, NSFileProviderModifyItemOptions options, NSFileProviderRequest request, NSFileProviderCreateOrModifyItemCompletionHandler completionHandler); [Abstract] - [Export ("pathExtensionHidden")] - bool PathExtensionHidden { [Bind ("isPathExtensionHidden")] get; } + [Export ("deleteItemWithIdentifier:baseVersion:options:request:completionHandler:")] + NSProgress DeleteItem (string identifier, NSFileProviderItemVersion version, NSFileProviderDeleteItemOptions options, NSFileProviderRequest request, Action completionHandler); + + [Export ("importDidFinishWithCompletionHandler:")] + void ImportDidFinish (Action completionHandler); + + [Export ("materializedItemsDidChangeWithCompletionHandler:")] + void MaterializedItemsDidChange (Action completionHandler); } } diff --git a/src/foundation.cs b/src/foundation.cs index fac6eb279f0f..8958b1d44138 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -38,6 +38,7 @@ using Foundation; using CoreGraphics; #if IOS +using AppClip; using QuickLook; #endif #if !TVOS @@ -93,6 +94,10 @@ using CoreImage; #endif +#if !IOS +using APActivationPayload = Foundation.NSObject; +#endif + namespace Foundation { delegate void NSFilePresenterReacquirer ([BlockCallback] Action reacquirer); } @@ -105,7 +110,11 @@ namespace Foundation delegate bool NSEnumerateErrorHandler (NSUrl url, NSError error); delegate void NSMetadataQueryEnumerationCallback (NSObject result, nuint idx, ref bool stop); +#if XAMCORE_4_0 + delegate void NSItemProviderCompletionHandler (INSSecureCoding item, NSError error); +#else delegate void NSItemProviderCompletionHandler (NSObject itemBeingLoaded, NSError error); +#endif delegate void NSItemProviderLoadHandler ([BlockCallback] NSItemProviderCompletionHandler completionHandler, Class expectedValueClass, NSDictionary options); delegate void EnumerateDatesCallback (NSDate date, bool exactMatch, ref bool stop); delegate void EnumerateIndexSetCallback (nuint idx, ref bool stop); @@ -1304,6 +1313,26 @@ interface NSCoder { [iOS (9,0)][Mac (10,11)] [NullAllowed, Export ("error", ArgumentSemantic.Copy)] NSError Error { get; } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("decodeArrayOfObjectsOfClass:forKey:")] + [return: NullAllowed] + NSObject[] DecodeArrayOfObjects (Class @class, string key); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("decodeArrayOfObjectsOfClasses:forKey:")] + [return: NullAllowed] + NSObject[] DecodeArrayOfObjects (NSSet classes, string key); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:")] + [return: NullAllowed] + NSDictionary DecodeDictionary (Class keyClass, Class objectClass, string key); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:")] + [return: NullAllowed] + NSDictionary DecodeDictionary (NSSet keyClasses, NSSet objectClasses, string key); } [BaseType (typeof (NSPredicate))] @@ -2492,6 +2521,30 @@ interface NSKeyedUnarchiver { [Export ("requiresSecureCoding")] bool GetRequiresSecureCoding (); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("unarchivedArrayOfObjectsOfClass:fromData:error:")] + [return: NullAllowed] + NSObject[] GetUnarchivedArray (Class @class, NSData data, [NullAllowed] out NSError error); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("unarchivedArrayOfObjectsOfClasses:fromData:error:")] + [return: NullAllowed] + NSObject[] GetUnarchivedArray (NSSet classes, NSData data, [NullAllowed] out NSError error); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("unarchivedDictionaryWithKeysOfClass:objectsOfClass:fromData:error:")] + [return: NullAllowed] + NSDictionary GetUnarchivedDictionary (Class keyClass, Class valueClass, NSData data, [NullAllowed] out NSError error); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("unarchivedDictionaryWithKeysOfClasses:objectsOfClasses:fromData:error:")] + [return: NullAllowed] + NSDictionary GetUnarchivedDictionary (NSSet keyClasses, NSSet valueClasses, NSData data, [NullAllowed] out NSError error); } [BaseType (typeof (NSObject), Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NSMetadataQueryDelegate)})] @@ -3693,6 +3746,24 @@ interface NSDate : NSSecureCoding, NSCopying, CKRecordValue { [Export ("isEqualToDate:")] bool IsEqualToDate (NSDate other); + + // NSDate_SensorKit + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Static] + [Export ("dateWithSRAbsoluteTime:")] + NSDate CreateFromSRAbsoluteTime (double time); + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Export ("initWithSRAbsoluteTime:")] + IntPtr Constructor (double srAbsoluteTime); + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Export ("srAbsoluteTime")] + double SrAbsoluteTime { get; } } [BaseType (typeof (NSObject))] @@ -3902,6 +3973,11 @@ interface NSError : NSSecureCoding, NSCopying { [Field ("NSURLErrorDomain")] NSString NSUrlErrorDomain { get; } +#if XAMCORE_4_0 + [NoWatch] +#else + [Obsoleted (PlatformName.WatchOS, 7,0)] +#endif [Field ("NSNetServicesErrorDomain")] NSString NSNetServicesErrorDomain { get; } @@ -4010,10 +4086,10 @@ interface NSError : NSSecureCoding, NSCopying { NSError GetFileProviderError (string nonExistentItemIdentifier); [NoiOS] - [Mac (10,15)] + [Mac (11,0)] [Static] - [Export ("fileProviderErrorForOutOfDateItem:")] - NSError GetFileProviderErrorForOutOfDateItem (INSFileProviderItem updatedVersion); + [Export ("fileProviderErrorForRejectedDeletionOfItem:")] + NSError GetFileProviderErrorForRejectedDeletion (INSFileProviderItem updatedVersion); #endif #if false @@ -4298,6 +4374,10 @@ interface NSLengthFormatter { delegate void NSLingusticEnumerator (NSString tag, NSRange tokenRange, NSRange sentenceRange, ref bool stop); + [Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'NaturalLanguage.*' API instead.")] + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'NaturalLanguage.*' API instead.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'NaturalLanguage.*' API instead.")] + [Deprecated (PlatformName.TvOS, 14,0, message: "Use 'NaturalLanguage.*' API instead.")] [BaseType (typeof (NSObject))] interface NSLinguisticTagger { [DesignatedInitializer] @@ -5289,11 +5369,13 @@ partial interface NSUserActivity // From NSUserActivity (CLSDeepLinks) - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11, 0), iOS (11,4)] [Export ("isClassKitDeepLink")] bool IsClassKitDeepLink { get; } - [NoWatch, NoTV, NoMac, iOS (11,4)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (11, 0), iOS (11,4)] [NullAllowed, Export ("contextIdentifierPath", ArgumentSemantic.Strong)] string[] ContextIdentifierPath { get; } @@ -5340,6 +5422,12 @@ string SuggestedInvocationPhrase { [iOS (13,0), TV (13,0), Mac (10,15), Watch (6,0)] [NullAllowed, Export ("targetContentIdentifier")] string TargetContentIdentifier { get; set; } + + // Inlined from NSUserActivity (AppClip) + [iOS (14,0)][NoTV][NoMac][NoWatch] + [Export ("appClipActivationPayload", ArgumentSemantic.Strong)] + [NullAllowed] + APActivationPayload AppClipActivationPayload { get; } } [iOS (8,0)][Mac (10,10)] // same as NSUserActivity @@ -5764,6 +5852,10 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Field ("NSURLVolumeURLKey")] NSString VolumeURLKey { get; } + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'ContentTypeKey' instead.")] + [Deprecated (PlatformName.TvOS, 14,0, message: "Use 'ContentTypeKey' instead.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'ContentTypeKey' instead.")] + [Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'ContentTypeKey' instead.")] [Field ("NSURLTypeIdentifierKey")] NSString TypeIdentifierKey { get; } @@ -5980,6 +6072,10 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Field ("NSURLVolumeSupportsAccessPermissionsKey")] NSString VolumeSupportsAccessPermissionsKey { get; } + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Field ("NSURLVolumeSupportsFileProtectionKey")] + NSString VolumeSupportsFileProtectionKey { get; } + [NoWatch, NoTV, Mac (10, 13), iOS (11, 0)] [Field ("NSURLVolumeAvailableCapacityForImportantUsageKey")] NSString VolumeAvailableCapacityForImportantUsageKey { get; } @@ -6168,8 +6264,7 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Field ("NSURLIsApplicationKey")] NSString IsApplicationKey { get; } -#if !MONOMAC - [iOS (9,0), Mac(10,11)] + [iOS (9,0)][NoMac] [Field ("NSURLFileProtectionKey")] NSString FileProtectionKey { get; } @@ -6188,7 +6283,30 @@ partial interface NSUrl : NSSecureCoding, NSCopying [iOS (9,0), Mac(10,11)] [Field ("NSURLFileProtectionCompleteUntilFirstUserAuthentication")] NSString FileProtectionCompleteUntilFirstUserAuthentication { get; } -#endif + + [Watch (7,0)][TV (14,0)][Mac (11,0)][iOS (14,0)] + [Field ("NSURLContentTypeKey")] + NSString ContentTypeKey { get; } + + [Watch (7,0)][TV (14,0)][Mac (11,0)][iOS (14,0)] + [Field ("NSURLFileContentIdentifierKey")] + NSString FileContentIdentifierKey { get; } + + [Watch (7,0)][TV (14,0)][Mac (11,0)][iOS (14,0)] + [Field ("NSURLIsPurgeableKey")] + NSString IsPurgeableKey { get; } + + [Watch (7,0)][TV (14,0)][Mac (11,0)][iOS (14,0)] + [Field ("NSURLIsSparseKey")] + NSString IsSparseKey { get; } + + [Watch (7,0)][TV (14,0)][Mac (11,0)][iOS (14,0)] + [Field ("NSURLMayHaveExtendedAttributesKey")] + NSString MayHaveExtendedAttributesKey { get; } + + [Watch (7,0)][TV (14,0)][Mac (11,0)][iOS (14,0)] + [Field ("NSURLMayShareFileContentKey")] + NSString MayShareFileContentKey { get; } // From the NSItemProviderReading protocol [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] @@ -6275,7 +6393,6 @@ interface NSUrlCache { [Deprecated (PlatformName.iOS, 13,0, message : "Use the overload that accepts an 'NSUrl' parameter instead.")] [Deprecated (PlatformName.WatchOS, 6,0, message : "Use the overload that accepts an 'NSUrl' parameter instead.")] [Deprecated (PlatformName.TvOS, 13,0, message : "Use the overload that accepts an 'NSUrl' parameter instead.")] - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] [Export ("initWithMemoryCapacity:diskCapacity:diskPath:")] IntPtr Constructor (nuint memoryCapacity, nuint diskCapacity, string diskPath); @@ -11719,6 +11836,10 @@ interface NSProcessInfo { [Watch (6, 0), TV (13, 0), Mac (10, 15), iOS (13, 0)] [Export ("macCatalystApp")] bool IsMacCatalystApplication { [Bind ("isMacCatalystApp")] get; } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("iOSAppOnMac")] + bool IsiOSApplicationOnMac { [Bind ("isiOSAppOnMac")] get; } #endregion } @@ -12125,22 +12246,26 @@ partial interface NSFileManager { [Field("NSFileBusy")] NSString Busy { get; } -#if !MONOMAC + [Mac (11,0)] [Field ("NSFileProtectionKey")] NSString FileProtectionKey { get; } + [Mac (11,0)] [Field ("NSFileProtectionNone")] NSString FileProtectionNone { get; } + [Mac (11,0)] [Field ("NSFileProtectionComplete")] NSString FileProtectionComplete { get; } + [Mac (11,0)] [Field ("NSFileProtectionCompleteUnlessOpen")] NSString FileProtectionCompleteUnlessOpen { get; } + [Mac (11,0)] [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication")] NSString FileProtectionCompleteUntilFirstUserAuthentication { get; } -#endif + [Field("NSFileSystemSize")] NSString SystemSize { get; } @@ -14406,6 +14531,7 @@ interface NSUserNotificationCenter [BaseType (typeof (NSObject))] [Model] [Protocol] + [Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'UserNotifications.*' API instead.")] interface NSUserNotificationCenterDelegate { [Export ("userNotificationCenter:didDeliverNotification:"), EventArgs ("UNCDidDeliverNotification")] @@ -14614,6 +14740,10 @@ interface NSUrlSessionTaskTransactionMetrics { [Watch (6, 0), TV (13, 0), Mac (10, 15), iOS (13, 0)] [Export ("multipath")] bool Multipath { [Bind ("isMultipath")] get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("domainResolutionProtocol")] + NSUrlSessionTaskMetricsDomainResolutionProtocol DomainResolutionProtocol { get; } } [iOS (10,0)][TV (10,0)][Watch (3,0)][Mac (10,12)] @@ -16201,4 +16331,14 @@ interface NSBackgroundActivityScheduler [Export ("shouldDefer")] bool ShouldDefer { get; } } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + public enum NSUrlSessionTaskMetricsDomainResolutionProtocol : long { + Unknown, + Udp, + Tcp, + Tls, + Https, + } } diff --git a/src/frameworks.sources b/src/frameworks.sources index 433225427a08..7ace7dfe44bc 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -155,6 +155,7 @@ ARKIT_SOURCES = \ ARKit/ARFaceGeometry.cs \ ARKit/ARPlaneGeometry.cs \ ARKit/ARPointCloud.cs \ + ARKit/ARSkeleton.cs \ ARKit/ARSkeleton3D.cs \ ARKit/ARSkeleton2D.cs \ @@ -302,6 +303,7 @@ CALLKIT_SOURCES = \ CARPLAY_SOURCES = \ CarPlay/CPNavigationAlert.cs \ + CarPlay/CPMessageListItem.cs \ # ClassKit @@ -313,6 +315,9 @@ CLASSKIT_SOURCES = \ CLOCKKIT_CORE_SOURCES = \ ClockKit/CLKEnums.cs \ +CLOCKKIT_SOURCES = \ + ClockKit/CLKComplication.cs \ + # CloudKit CLOUDKIT_API_SOURCES = \ @@ -667,6 +672,11 @@ EVENTKITUI_SOURCES = \ EXTERNALACCESSORY_API_SOURCES = \ ExternalAccessory/EAEnums.cs \ +# FileProvider + +FILEPROVIDER_SOURCES = \ + FileProvider/Compat.cs \ + # FinderSync FINDERSYNC_CORE_SOURCES = \ @@ -1066,13 +1076,18 @@ METAL_CORE_SOURCES = \ METAL_SOURCES = \ Metal/MTLArgumentEncoder.cs \ + Metal/MTLBlitPassSampleBufferAttachmentDescriptorArray.cs \ Metal/MTLCompat.cs \ + Metal/MTLComputePassSampleBufferAttachmentDescriptorArray.cs \ Metal/MTLDevice.cs \ + Metal/MTLIntersectionFunctionTable.cs \ Metal/MTLArrays.cs \ Metal/MTLRasterizationRateLayerDescriptor.cs \ Metal/MTLRenderCommandEncoder.cs \ Metal/MTLRenderPassDescriptor.cs \ + Metal/MTLRenderPassSampleBufferAttachmentDescriptorArray.cs \ Metal/MTLResourceStateCommandEncoder.cs \ + Metal/MTLResourceStatePassSampleBufferAttachmentDescriptorArray.cs \ Metal/MTLVertexDescriptor.cs \ # MetalKit @@ -1104,6 +1119,15 @@ METALPERFORMANCESHADERS_SOURCES = \ # MetricKit +METRICKIT_SOURCES = \ + MetricKit/MXMetaData.cs \ + MetricKit/MXMetric.cs \ + MetricKit/MXMetricPayload.cs \ + +# MLCompute + +MLCOMPUTE_SOURCES = \ + MLCompute/MLHelpers.cs \ # MobileCoreServices @@ -1145,7 +1169,10 @@ NATURALLANGUAGE_CORE_SOURCES = \ NATURALLANGUAGE_SOURCES = \ NaturalLanguage/NLEmbedding.cs \ + NaturalLanguage/NLLanguage.cs \ NaturalLanguage/NLLanguageRecognizer.cs \ + NaturalLanguage/NLModel.cs \ + NaturalLanguage/NLTagger.cs \ # Network @@ -1185,7 +1212,14 @@ NETWORK_SOURCES = \ Network/NWWebSocketOptions.cs \ Network/NWWebSocketRequest.cs \ Network/NWWebSocketResponse.cs \ - + +# NearbyInteraction +NEARBYINTERACTION_API_SOURCES = \ + NearbyInteraction/Enums.cs \ + +NEARBYINTERACTION_SOURCES = \ + NearbyInteraction/NINearbyObject.cs \ + # NetworkExtension NETWORKEXTENSION_API_SOURCES = \ @@ -1278,6 +1312,10 @@ PASSKIT_API_SOURCES = \ PASSKIT_SOURCES = \ PassKit/PKPaymentRequest.cs \ +# PencilKit +PENCILKIT_API_SOURCEs = \ + PencilKit/Indexers.cs + # PdfKit PDFKIT_API_SOURCES = \ @@ -1391,6 +1429,8 @@ SCRIPTINGBRIDGE_CORE_SOURCES = \ SCRIPTINGBRIDGE_SOURCES = \ ScriptingBridge/SBApplication.cs \ +# ScreenTime + # SearchKit SEARCHKIT_SOURCES = \ @@ -1425,6 +1465,15 @@ SECURITY_SOURCES = \ Security/SslConnection.cs \ Security/SslContext.cs \ +# SensorKit + +SENSORKIT_CORE_SOURCES = \ + SensorKit/SRAmbientLightChromaticity.cs \ + +SENSORKIT_SOURCES = \ + SensorKit/SRAbsoluteTime.cs \ + SensorKit/SRSensor.cs \ + # Social SOCIAL_CORE_SOURCES = \ @@ -1457,6 +1506,8 @@ STOREKIT_API_SOURCES = \ StoreKit/Enums.cs \ STOREKIT_CORE_SOURCES = \ + StoreKit/SKOverlayAppClipConfiguration.cs \ + StoreKit/SKOverlayAppConfiguration.cs \ StoreKit/SKReceiptProperty.cs \ StoreKit/StoreProductParameters.cs \ @@ -1528,11 +1579,13 @@ UIKIT_SOURCES = \ UIKit/UIBarItem.cs \ UIKit/UIBezierPath.cs \ UIKit/UIButton.cs \ + UIKit/UICellAccessory.cs \ UIKit/UICollectionView.cs \ UIKit/UICollectionViewLayout.cs \ UIKit/UICollectionViewLayoutAttributes.cs \ UIKit/UICollectionViewTransitionLayout.cs \ UIKit/UIColor.cs \ + UIKit/UIConfigurationColorTransformer.cs \ UIKit/UIContentSizeCategory.cs \ UIKit/UIControl.cs \ UIKit/UIDevice.cs \ @@ -1619,13 +1672,16 @@ VIDEOTOOLBOX_SOURCES = \ VISION_SOURCES = \ Vision/VNBarcodeSymbologyExtensions.cs \ + Vision/VNCircle.cs \ Vision/VNCompat.cs \ Vision/VNDetectBarcodesRequest.cs \ Vision/VNFaceLandmarkRegion2D.cs \ Vision/VNFeaturePrintObservation.cs \ + Vision/VNRecognizedPointsObservation.cs \ Vision/VNRequest.cs \ Vision/VNRequestRevision.cs \ Vision/VNUtils.cs \ + Vision/VNVector.cs \ # WatchConnectivity @@ -1692,6 +1748,7 @@ WKWEBKIT_API_SOURCES = \ WKWebKit/Defs.cs \ WKWEBKIT_SOURCES = \ + WKWebKit/WKCompat.cs \ WKWebKit/WKWindowFeatures.cs \ # @@ -1778,6 +1835,7 @@ SHARED_SOURCES = \ # COMMON_FRAMEWORKS = \ + Accessibility \ Accelerate \ AuthenticationServices \ AVFoundation \ @@ -1790,23 +1848,27 @@ COMMON_FRAMEWORKS = \ Compression \ Foundation \ GameKit \ + NaturalLanguage \ Network \ SceneKit \ SoundAnalysis \ SpriteKit \ StoreKit \ + UniformTypeIdentifiers \ MAC_FRAMEWORKS = \ $(COMMON_FRAMEWORKS) \ Accounts \ AdSupport \ AppKit XKit \ + AppTrackingTransparency \ AudioToolbox \ AudioUnit \ AutomaticAssessmentConfiguration \ AVKit \ BusinessChat \ CFNetwork \ + ClassKit \ CloudKit \ Contacts \ ContactsUI \ @@ -1848,13 +1910,15 @@ MAC_FRAMEWORKS = \ Metal \ MetalKit \ MetalPerformanceShaders \ + MLCompute \ MobileCoreServices \ ModelIO \ MultipeerConnectivity \ - NaturalLanguage \ + NearbyInteraction \ NetworkExtension \ NotificationCenter \ OpenGL \ + PassKit \ PdfKit \ PencilKit \ Photos \ @@ -1866,7 +1930,9 @@ MAC_FRAMEWORKS = \ QuickLook \ QuickLookThumbnailing \ QuickLookUI \ + ReplayKit \ SafariServices \ + ScreenTime \ ScriptingBridge \ SearchKit \ Security \ @@ -1874,6 +1940,7 @@ MAC_FRAMEWORKS = \ Speech \ SystemConfiguration \ UserNotifications \ + UserNotificationsUI \ VideoSubscriberAccount \ VideoToolbox \ Vision \ @@ -1887,6 +1954,8 @@ IOS_FRAMEWORKS = \ AdSupport \ AddressBook \ AddressBookUI \ + AppClip \ + AppTrackingTransparency \ ARKit \ AssetsLibrary \ AudioToolbox \ @@ -1937,6 +2006,7 @@ IOS_FRAMEWORKS = \ MapKit \ MediaAccessibility \ MediaPlayer \ + MediaSetup \ MediaToolbox \ Messages \ MessageUI \ @@ -1944,10 +2014,11 @@ IOS_FRAMEWORKS = \ MetalKit \ MetalPerformanceShaders \ MetricKit \ + MLCompute \ MobileCoreServices \ ModelIO \ MultipeerConnectivity \ - NaturalLanguage \ + NearbyInteraction \ NetworkExtension \ NewsstandKit \ NotificationCenter \ @@ -1962,7 +2033,9 @@ IOS_FRAMEWORKS = \ QuickLookThumbnailing \ ReplayKit \ SafariServices \ + ScreenTime \ Security \ + SensorKit \ Social \ Speech \ SystemConfiguration \ @@ -1996,7 +2069,6 @@ WATCHOS_FRAMEWORKS = \ MapKit \ MediaPlayer \ MobileCoreServices \ - NaturalLanguage \ PassKit \ PushKit \ Security \ @@ -2009,6 +2081,7 @@ TVOS_FRAMEWORKS = \ $(COMMON_FRAMEWORKS) \ AVKit \ AdSupport \ + AppTrackingTransparency \ AudioToolbox \ AudioUnit \ BackgroundTasks \ @@ -2016,6 +2089,7 @@ TVOS_FRAMEWORKS = \ CloudKit \ CoreAnimation \ CoreGraphics \ + CoreHaptics \ CoreImage \ CoreLocation \ CoreSpotlight \ @@ -2027,8 +2101,10 @@ TVOS_FRAMEWORKS = \ GameplayKit \ HomeKit \ ImageIO \ + Intents \ IOSurface \ JavaScriptCore \ + LinkPresentation \ MapKit \ MediaAccessibility \ MediaPlayer \ @@ -2036,10 +2112,10 @@ TVOS_FRAMEWORKS = \ Metal \ MetalKit \ MetalPerformanceShaders \ + MLCompute \ MobileCoreServices \ ModelIO \ MultipeerConnectivity \ - NaturalLanguage \ OpenGLES \ Photos \ PhotosUI \ diff --git a/src/gamecontroller.cs b/src/gamecontroller.cs index 2df078be34c6..b44fd1afbed7 100644 --- a/src/gamecontroller.cs +++ b/src/gamecontroller.cs @@ -4,9 +4,10 @@ // Authors: // Aaron Bockover (abock@xamarin.com) // TJ Lambert (t-anlamb@microsoft.com) +// Whitney Schmidt (whschm@microsoft.com) // // Copyright 2013, 2015 Xamarin Inc. -// Copyright 2019 Microsoft Corporation +// Copyright 2019, 2020 Microsoft Corporation using System; @@ -17,7 +18,9 @@ #if MONOMAC using AppKit; using UIViewController = AppKit.NSViewController; +using CHHapticEngine = Foundation.NSObject; #else +using CoreHaptics; using UIKit; #endif @@ -25,6 +28,7 @@ namespace GameController { [iOS (7,0)] [Mac (10,9)] + [TV (9,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // The GCControllerElement class is never instantiated directly. partial interface GCControllerElement { @@ -37,6 +41,34 @@ partial interface GCControllerElement { [Export ("analog")] bool IsAnalog { [Bind ("isAnalog")] get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("sfSymbolsName", ArgumentSemantic.Strong)] + string SfSymbolsName { get; set; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("localizedName", ArgumentSemantic.Strong)] + string LocalizedName { get; set; } + + [NoTV, NoMac, iOS (14, 0)] + [NullAllowed, Export ("unmappedSfSymbolsName", ArgumentSemantic.Strong)] + string UnmappedSfSymbolsName { get; set; } + + [NoTV, NoMac, iOS (14, 0)] + [NullAllowed, Export ("unmappedLocalizedName", ArgumentSemantic.Strong)] + string UnmappedLocalizedName { get; set; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("aliases")] + NSSet Aliases { get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("boundToSystemGesture")] + bool IsBoundToSystemGesture { [Bind ("isBoundToSystemGesture")] get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("preferredSystemGestureState", ArgumentSemantic.Assign)] + GCSystemGestureState PreferredSystemGestureState { get; set; } } delegate void GCControllerAxisValueChangedHandler (GCControllerAxisInput axis, float /* float, not CGFloat */ value); @@ -60,6 +92,7 @@ partial interface GCControllerAxisInput { } delegate void GCControllerButtonValueChanged (GCControllerButtonInput button, float /* float, not CGFloat */ buttonValue, bool pressed); + delegate void GCControllerButtonTouchedChanged (GCControllerButtonInput button, float value, bool pressed, bool touched); [iOS (7,0), Mac (10,9)] [BaseType (typeof (GCControllerElement))] @@ -97,6 +130,14 @@ partial interface GCControllerButtonInput { [NullAllowed] [Export ("pressedChangedHandler", ArgumentSemantic.Copy)] GCControllerButtonValueChanged PressedChangedHandler { get; set; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("touchedChangedHandler", ArgumentSemantic.Copy)] + GCControllerButtonTouchedChanged TouchedChangedHandler { get; set; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("touched")] + bool Touched { [Bind ("isTouched")] get; } } delegate void GCControllerDirectionPadValueChangedHandler (GCControllerDirectionPad dpad, float /* float, not CGFloat */ xValue, float /* float, not CGFloat */ yValue); @@ -142,11 +183,10 @@ partial interface GCControllerDirectionPad { [Deprecated (PlatformName.TvOS, 10, 0, message: "Use 'GCExtendedGamepad' instead.")] [iOS (7,0)] [Mac (10,9)] - [BaseType (typeof (NSObject))] + [BaseType (typeof (GCPhysicalInputProfile))] [DisableDefaultCtor] // return nil handle -> only exposed as getter partial interface GCGamepad { - [NullAllowed] [Export ("controller", ArgumentSemantic.Assign)] GCController Controller { get; } @@ -202,7 +242,7 @@ partial interface GCGamepadSnapshot { [iOS (7,0)] [Mac (10,9)] - [BaseType (typeof (NSObject))] + [BaseType (typeof (GCPhysicalInputProfile))] [DisableDefaultCtor] // return nil handle -> only exposed as getter partial interface GCExtendedGamepad { @@ -271,6 +311,10 @@ partial interface GCExtendedGamepad { [TV (13,0), Mac (10,15), iOS (13,0)] [Export ("setStateFromExtendedGamepad:")] void SetState (GCExtendedGamepad extendedGamepad); + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("buttonHome")] + GCControllerButtonInput ButtonHome { get; } } [iOS (7,0)] @@ -301,19 +345,18 @@ partial interface GCExtendedGamepadSnapshot { [iOS (7,0), Mac (10,9)] [BaseType (typeof (NSObject))] - partial interface GCController { + partial interface GCController : GCDevice { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use the Menu button found on the controller's profile, if it exists.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use the Menu button found on the controller's profile, if it exists.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use the Menu button found on the controller's profile, if it exists.")] - [NullAllowed] [Export ("controllerPausedHandler", ArgumentSemantic.Copy)] Action ControllerPausedHandler { get; set; } [NullAllowed] [Export ("vendorName", ArgumentSemantic.Copy)] - string VendorName { get; } + new string VendorName { get; } [Export ("attachedToDevice")] bool AttachedToDevice { [Bind ("isAttachedToDevice")] get; } @@ -365,11 +408,11 @@ partial interface GCController { [iOS (9,0)][Mac (10,11)] [Export ("handlerQueue", ArgumentSemantic.Retain)] - DispatchQueue HandlerQueue { get; set; } + new DispatchQueue HandlerQueue { get; set; } [TV (13, 0), Mac (10, 15), iOS (13, 0)] [Export ("productCategory")] - string ProductCategory { get; } + new string ProductCategory { get; } [TV (13, 0), Mac (10, 15), iOS (13, 0)] [Export ("snapshot")] @@ -388,6 +431,31 @@ partial interface GCController { [Static] [Export ("controllerWithExtendedGamepad")] GCController GetExtendedGamepadController (); + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Static] + [NullAllowed, Export ("current", ArgumentSemantic.Strong)] + GCController Current { get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("light", ArgumentSemantic.Retain)] + GCDeviceLight Light { get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("haptics", ArgumentSemantic.Retain)] + GCDeviceHaptics Haptics { get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("battery", ArgumentSemantic.Copy)] + GCDeviceBattery Battery { get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Notification, Field ("GCControllerDidBecomeCurrentNotification")] + NSString DidBecomeCurrentNotification { get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Notification, Field ("GCControllerDidStopBeingCurrentNotification")] + NSString DidStopBeingCurrentNotification { get; } } [iOS (8,0), Mac (10,10)] @@ -395,6 +463,7 @@ partial interface GCController { [DisableDefaultCtor] // access thru GCController.Motion - returns a nil Handle partial interface GCMotion { + [NullAllowed] [Export ("controller", ArgumentSemantic.Assign)] GCController Controller { get; } @@ -422,6 +491,9 @@ partial interface GCMotion { [Export ("rotationRate", ArgumentSemantic.Assign)] Vector3d RotationRate { get; } + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'HasAttitude' and 'HasRotationRate' instead.")] + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'HasAttitude' and 'HasRotationRate' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'HasAttitude' and 'HasRotationRate' instead.")] [TV (11,0)] [iOS (11,0)] [Mac (10,13)] @@ -447,6 +519,30 @@ partial interface GCMotion { [TV (13,0), Mac (10,15), iOS (13,0)] [Export ("setStateFromMotion:")] void SetState (GCMotion motion); + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("hasAttitude")] + bool HasAttitude { get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("hasRotationRate")] + bool HasRotationRate { get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("sensorsRequireManualActivation")] + bool SensorsRequireManualActivation { get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("sensorsActive")] + bool SensorsActive { get; set; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("hasGravityAndUserAcceleration")] + bool HasGravityAndUserAcceleration { get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("acceleration")] + GCAcceleration Acceleration { get; set; } } [Mac (10,11)] @@ -457,7 +553,7 @@ partial interface GCMotion { [Mac (10,11)] [iOS (10,0)] [TV (9,0)] - [BaseType (typeof (NSObject))] + [BaseType (typeof (GCPhysicalInputProfile))] [DisableDefaultCtor] interface GCMicroGamepad { [Export ("controller", ArgumentSemantic.Assign)] @@ -535,4 +631,1157 @@ interface GCEventViewController { [Export ("controllerUserInteractionEnabled")] bool ControllerUserInteractionEnabled { get; set; } } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface GCColor : NSCopying, NSSecureCoding + { + [Export ("initWithRed:green:blue:")] + IntPtr Constructor (float red, float green, float blue); + + [Export ("red")] + float Red { get; } + + [Export ("green")] + float Green { get; } + + [Export ("blue")] + float Blue { get; } + } + + delegate void GCControllerTouchpadHandler (GCControllerTouchpad touchpad, float xValue, float yValue, float buttonValue, bool buttonPressed); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (GCControllerElement))] + interface GCControllerTouchpad + { + [Export ("button")] + GCControllerButtonInput Button { get; } + + [NullAllowed, Export ("touchDown", ArgumentSemantic.Copy)] + GCControllerTouchpadHandler TouchDown { get; set; } + + [NullAllowed, Export ("touchMoved", ArgumentSemantic.Copy)] + GCControllerTouchpadHandler TouchMoved { get; set; } + + [NullAllowed, Export ("touchUp", ArgumentSemantic.Copy)] + GCControllerTouchpadHandler TouchUp { get; set; } + + [Export ("touchSurface")] + GCControllerDirectionPad TouchSurface { get; } + + [Export ("touchState")] + GCTouchState TouchState { get; } + + [Export ("reportsAbsoluteTouchSurfaceValues")] + bool ReportsAbsoluteTouchSurfaceValues { get; set; } + + [Export ("setValueForXAxis:yAxis:touchDown:buttonValue:")] + void SetValue (float xAxis, float yAxis, bool touchDown, float buttonValue); + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface GCDeviceBattery : NSSecureCoding, NSCoding + { + [Export ("batteryLevel")] + float BatteryLevel { get; } + + [Export ("batteryState")] + GCDeviceBatteryState BatteryState { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface GCDeviceHaptics + { + [Export ("supportedLocalities", ArgumentSemantic.Strong)] + NSSet SupportedLocalities { get; } + + [NoMac] // TODO: Remove [NoMac] when CoreHaptics can compile on Mac OSX: https://github.com/xamarin/maccore/issues/2261 + [Export ("createEngineWithLocality:")] + [return: NullAllowed] + CHHapticEngine CreateEngine (string locality); + + [Field ("GCHapticDurationInfinite")] + float HapticDurationInfinite { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + interface GCHapticsLocality { + + [Field ("GCHapticsLocalityDefault")] + NSString Default { get; } + + [Field ("GCHapticsLocalityAll")] + NSString All { get; } + + [Field ("GCHapticsLocalityHandles")] + NSString Handles { get; } + + [Field ("GCHapticsLocalityLeftHandle")] + NSString LeftHandle { get; } + + [Field ("GCHapticsLocalityRightHandle")] + NSString RightHandle { get; } + + [Field ("GCHapticsLocalityTriggers")] + NSString Triggers { get; } + + [Field ("GCHapticsLocalityLeftTrigger")] + NSString LeftTrigger { get; } + + [Field ("GCHapticsLocalityRightTrigger")] + NSString RightTrigger { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface GCDeviceLight: NSSecureCoding, NSCoding + { + [Export ("color", ArgumentSemantic.Copy)] + GCColor Color { get; set; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (GCExtendedGamepad))] + interface GCDualShockGamepad: NSSecureCoding, NSCoding + { + [Export ("touchpadButton")] + GCControllerButtonInput TouchpadButton { get; } + + [Export ("touchpadPrimary")] + GCControllerDirectionPad TouchpadPrimary { get; } + + [Export ("touchpadSecondary")] + GCControllerDirectionPad TouchpadSecondary { get; } + } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (NSObject))] + interface GCKeyboard : GCDevice, NSSecureCoding, NSCoding + { + [NullAllowed, Export ("keyboardInput", ArgumentSemantic.Strong)] + GCKeyboardInput KeyboardInput { get; } + + [Static] + [NullAllowed, Export ("coalescedKeyboard", ArgumentSemantic.Strong)] + GCKeyboard CoalescedKeyboard { get; } + + [Notification, Field ("GCKeyboardDidConnectNotification")] + NSString DidConnectNotification { get; } + + [Notification, Field ("GCKeyboardDidDisconnectNotification")] + NSString DidDisconnectNotification { get; } + } + + delegate void GCKeyboardValueChangedHandler (GCKeyboardInput keyboard, GCControllerButtonInput key, nint keyCode, bool pressed); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (GCPhysicalInputProfile))] + interface GCKeyboardInput + { + [NullAllowed, Export ("keyChangedHandler", ArgumentSemantic.Copy)] + GCKeyboardValueChangedHandler KeyChangedHandler { get; set; } + + [Export ("anyKeyPressed")] + bool IsAnyKeyPressed { [Bind ("isAnyKeyPressed")] get; } + + [Export ("buttonForKeyCode:")] + [return: NullAllowed] + GCControllerButtonInput GetButton (nint code); + } + + [Mac (11, 0), iOS (14, 0), TV (14, 0)] + [BaseType (typeof (NSObject))] + interface GCMouse : GCDevice, NSSecureCoding, NSCoding + { + [NullAllowed, Export ("mouseInput", ArgumentSemantic.Strong)] + GCMouseInput MouseInput { get; } + + [Static] + [NullAllowed, Export ("current", ArgumentSemantic.Strong)] + GCMouse Current { get; } + + [Static] + [Export ("mice")] + GCMouse[] Mice { get; } + + [Notification, Field ("GCMouseDidConnectNotification")] + NSString DidConnectNotification { get; } + + [Notification, Field ("GCMouseDidDisconnectNotification")] + NSString DidDisconnectNotification { get; } + + [Notification, Field ("GCMouseDidBecomeCurrentNotification")] + NSString DidBecomeCurrentNotification { get; } + + [Notification, Field ("GCMouseDidStopBeingCurrentNotification")] + NSString DidStopBeingCurrentNotification { get; } + } + + delegate void GCMouseMoved (GCMouseInput mouse, float deltaX, float deltaY); + + [Mac (11, 0), iOS (14, 0), TV(14, 0)] + [BaseType (typeof (GCControllerDirectionPad))] + interface GCDeviceCursor {} + + [Mac (11,0), iOS (14,0), TV (14,0)] + [BaseType (typeof (GCPhysicalInputProfile))] + interface GCMouseInput + { + [NullAllowed, Export ("mouseMovedHandler", ArgumentSemantic.Copy)] + GCMouseMoved MouseMovedHandler { get; set; } + + [Export ("scroll")] + GCDeviceCursor Scroll { get; } + + [Export ("leftButton")] + GCControllerButtonInput LeftButton { get; } + + [NullAllowed, Export ("rightButton")] + GCControllerButtonInput RightButton { get; } + + [NullAllowed, Export ("middleButton")] + GCControllerButtonInput MiddleButton { get; } + + [NullAllowed, Export ("auxiliaryButtons")] + GCControllerButtonInput[] AuxiliaryButtons { get; } + } + + interface IGCDevice {} + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Protocol] + interface GCDevice + { + [Abstract] + [Export ("handlerQueue", ArgumentSemantic.Strong)] + DispatchQueue HandlerQueue { get; set; } + + [Abstract] + [NullAllowed, Export ("vendorName")] + string VendorName { get; } + + [Abstract] + [Export ("productCategory")] + string ProductCategory { get; } + + [Abstract] + [Export ("physicalInputProfile", ArgumentSemantic.Strong)] + GCPhysicalInputProfile PhysicalInputProfile { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface GCPhysicalInputProfile + { + [NullAllowed, Export ("device", ArgumentSemantic.Weak)] + IGCDevice Device { get; } + + [Export ("lastEventTimestamp")] + double LastEventTimestamp { get; } + + [Export ("elements", ArgumentSemantic.Strong)] + NSDictionary Elements { get; } + + [Export ("buttons", ArgumentSemantic.Strong)] + NSDictionary Buttons { get; } + + [Export ("axes", ArgumentSemantic.Strong)] + NSDictionary Axes { get; } + + [Export ("dpads", ArgumentSemantic.Strong)] + NSDictionary Dpads { get; } + + [Export ("allElements", ArgumentSemantic.Strong)] + NSSet AllElements { get; } + + [Export ("allButtons", ArgumentSemantic.Strong)] + NSSet AllButtons { get; } + + [Export ("allAxes", ArgumentSemantic.Strong)] + NSSet AllAxes { get; } + + [Export ("allDpads", ArgumentSemantic.Strong)] + NSSet AllDpads { get; } + + [Export ("objectForKeyedSubscript:")] + [return: NullAllowed] + GCControllerElement GetObjectForKeyedSubscript (string key); + + [Export ("capture")] + GCPhysicalInputProfile Capture (); + + [Export ("setStateFromPhysicalInput:")] + void SetState (GCPhysicalInputProfile physicalInput); + } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Static] + interface GCInputXbox { + + [Field ("GCInputXboxPaddleOne")] + NSString PaddleOne { get; } + + [Field ("GCInputXboxPaddleTwo")] + NSString PaddleTwo { get; } + + [Field ("GCInputXboxPaddleThree")] + NSString PaddleThree { get; } + + [Field ("GCInputXboxPaddleFour")] + NSString PaddleFour { get; } + } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Static] + interface GCInput { + + [Field ("GCInputButtonA")] + NSString ButtonA { get; } + + [Field ("GCInputButtonB")] + NSString ButtonB { get; } + + [Field ("GCInputButtonX")] + NSString ButtonX { get; } + + [Field ("GCInputButtonY")] + NSString ButtonY { get; } + + [Field ("GCInputDirectionPad")] + NSString DirectionPad { get; } + + [Field ("GCInputLeftThumbstick")] + NSString LeftThumbstick { get; } + + [Field ("GCInputRightThumbstick")] + NSString RightThumbstick { get; } + + [Field ("GCInputLeftShoulder")] + NSString LeftShoulder { get; } + + [Field ("GCInputRightShoulder")] + NSString RightShoulder { get; } + + [Field ("GCInputLeftTrigger")] + NSString LeftTrigger { get; } + + [Field ("GCInputRightTrigger")] + NSString RightTrigger { get; } + + [Field ("GCInputLeftThumbstickButton")] + NSString LeftThumbstickButton { get; } + + [Field ("GCInputRightThumbstickButton")] + NSString RightThumbstickButton { get; } + + [Field ("GCInputButtonHome")] + NSString ButtonHome { get; } + + [Field ("GCInputButtonMenu")] + NSString ButtonMenu { get; } + + [Field ("GCInputButtonOptions")] + NSString ButtonOptions { get; } + + [Field ("GCInputDualShockTouchpadOne")] + NSString DualShockTouchpadOne { get; } + + [Field ("GCInputDualShockTouchpadTwo")] + NSString DualShockTouchpadTwo { get; } + + [Field ("GCInputDualShockTouchpadButton")] + NSString DualShockTouchpadButton { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (GCExtendedGamepad))] + interface GCXboxGamepad: NSSecureCoding, NSCoding + { + [NullAllowed, Export ("paddleButton1")] + GCControllerButtonInput PaddleButton1 { get; } + + [NullAllowed, Export ("paddleButton2")] + GCControllerButtonInput PaddleButton2 { get; } + + [NullAllowed, Export ("paddleButton3")] + GCControllerButtonInput PaddleButton3 { get; } + + [NullAllowed, Export ("paddleButton4")] + GCControllerButtonInput PaddleButton4 { get; } + } + + [Static] + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + partial interface GCKey + { + [Field ("GCKeyA")] + NSString A { get; } + + [Field ("GCKeyB")] + NSString B { get; } + + [Field ("GCKeyC")] + NSString C { get; } + + [Field ("GCKeyD")] + NSString D { get; } + + [Field ("GCKeyE")] + NSString E { get; } + + [Field ("GCKeyF")] + NSString F { get; } + + [Field ("GCKeyG")] + NSString G { get; } + + [Field ("GCKeyH")] + NSString H { get; } + + [Field ("GCKeyI")] + NSString I { get; } + + [Field ("GCKeyJ")] + NSString J { get; } + + [Field ("GCKeyK")] + NSString K { get; } + + [Field ("GCKeyL")] + NSString L { get; } + + [Field ("GCKeyM")] + NSString M { get; } + + [Field ("GCKeyN")] + NSString N { get; } + + [Field ("GCKeyO")] + NSString O { get; } + + [Field ("GCKeyP")] + NSString P { get; } + + [Field ("GCKeyQ")] + NSString Q { get; } + + [Field ("GCKeyR")] + NSString R { get; } + + [Field ("GCKeyS")] + NSString S { get; } + + [Field ("GCKeyT")] + NSString T { get; } + + [Field ("GCKeyU")] + NSString U { get; } + + [Field ("GCKeyV")] + NSString V { get; } + + [Field ("GCKeyW")] + NSString W { get; } + + [Field ("GCKeyX")] + NSString X { get; } + + [Field ("GCKeyY")] + NSString Y { get; } + + [Field ("GCKeyZ")] + NSString Z { get; } + + [Field ("GCKeyOne")] + NSString One { get; } + + [Field ("GCKeyTwo")] + NSString Two { get; } + + [Field ("GCKeyThree")] + NSString Three { get; } + + [Field ("GCKeyFour")] + NSString Four { get; } + + [Field ("GCKeyFive")] + NSString Five { get; } + + [Field ("GCKeySix")] + NSString Six { get; } + + [Field ("GCKeySeven")] + NSString Seven { get; } + + [Field ("GCKeyEight")] + NSString Eight { get; } + + [Field ("GCKeyNine")] + NSString Nine { get; } + + [Field ("GCKeyZero")] + NSString Zero { get; } + + [Field ("GCKeyReturnOrEnter")] + NSString ReturnOrEnter { get; } + + [Field ("GCKeyEscape")] + NSString Escape { get; } + + [Field ("GCKeyDeleteOrBackspace")] + NSString DeleteOrBackspace { get; } + + [Field ("GCKeyTab")] + NSString Tab { get; } + + [Field ("GCKeySpacebar")] + NSString Spacebar { get; } + + [Field ("GCKeyHyphen")] + NSString Hyphen { get; } + + [Field ("GCKeyEqualSign")] + NSString EqualSign { get; } + + [Field ("GCKeyOpenBracket")] + NSString OpenBracket { get; } + + [Field ("GCKeyCloseBracket")] + NSString CloseBracket { get; } + + [Field ("GCKeyBackslash")] + NSString Backslash { get; } + + [Field ("GCKeyNonUSPound")] + NSString NonUSPound { get; } + + [Field ("GCKeySemicolon")] + NSString Semicolon { get; } + + [Field ("GCKeyQuote")] + NSString Quote { get; } + + [Field ("GCKeyGraveAccentAndTilde")] + NSString GraveAccentAndTilde { get; } + + [Field ("GCKeyComma")] + NSString Comma { get; } + + [Field ("GCKeyPeriod")] + NSString Period { get; } + + [Field ("GCKeySlash")] + NSString Slash { get; } + + [Field ("GCKeyCapsLock")] + NSString CapsLock { get; } + + [Field ("GCKeyF1")] + NSString F1 { get; } + + [Field ("GCKeyF2")] + NSString F2 { get; } + + [Field ("GCKeyF3")] + NSString F3 { get; } + + [Field ("GCKeyF4")] + NSString F4 { get; } + + [Field ("GCKeyF5")] + NSString F5 { get; } + + [Field ("GCKeyF6")] + NSString F6 { get; } + + [Field ("GCKeyF7")] + NSString F7 { get; } + + [Field ("GCKeyF8")] + NSString F8 { get; } + + [Field ("GCKeyF9")] + NSString F9 { get; } + + [Field ("GCKeyF10")] + NSString F10 { get; } + + [Field ("GCKeyF11")] + NSString F11 { get; } + + [Field ("GCKeyF12")] + NSString F12 { get; } + + [Field ("GCKeyPrintScreen")] + NSString PrintScreen { get; } + + [Field ("GCKeyScrollLock")] + NSString ScrollLock { get; } + + [Field ("GCKeyPause")] + NSString Pause { get; } + + [Field ("GCKeyInsert")] + NSString Insert { get; } + + [Field ("GCKeyHome")] + NSString Home { get; } + + [Field ("GCKeyPageUp")] + NSString PageUp { get; } + + [Field ("GCKeyDeleteForward")] + NSString DeleteForward { get; } + + [Field ("GCKeyEnd")] + NSString End { get; } + + [Field ("GCKeyPageDown")] + NSString PageDown { get; } + + [Field ("GCKeyRightArrow")] + NSString RightArrow { get; } + + [Field ("GCKeyLeftArrow")] + NSString LeftArrow { get; } + + [Field ("GCKeyDownArrow")] + NSString DownArrow { get; } + + [Field ("GCKeyUpArrow")] + NSString UpArrow { get; } + + [Field ("GCKeyKeypadNumLock")] + NSString KeypadNumLock { get; } + + [Field ("GCKeyKeypadSlash")] + NSString KeypadSlash { get; } + + [Field ("GCKeyKeypadAsterisk")] + NSString KeypadAsterisk { get; } + + [Field ("GCKeyKeypadHyphen")] + NSString KeypadHyphen { get; } + + [Field ("GCKeyKeypadPlus")] + NSString KeypadPlus { get; } + + [Field ("GCKeyKeypadEnter")] + NSString KeypadEnter { get; } + + [Field ("GCKeyKeypad1")] + NSString Keypad1 { get; } + + [Field ("GCKeyKeypad2")] + NSString Keypad2 { get; } + + [Field ("GCKeyKeypad3")] + NSString Keypad3 { get; } + + [Field ("GCKeyKeypad4")] + NSString Keypad4 { get; } + + [Field ("GCKeyKeypad5")] + NSString Keypad5 { get; } + + [Field ("GCKeyKeypad6")] + NSString Keypad6 { get; } + + [Field ("GCKeyKeypad7")] + NSString Keypad7 { get; } + + [Field ("GCKeyKeypad8")] + NSString Keypad8 { get; } + + [Field ("GCKeyKeypad9")] + NSString Keypad9 { get; } + + [Field ("GCKeyKeypad0")] + NSString Keypad0 { get; } + + [Field ("GCKeyKeypadPeriod")] + NSString KeypadPeriod { get; } + + [Field ("GCKeyKeypadEqualSign")] + NSString KeypadEqualSign { get; } + + [Field ("GCKeyNonUSBackslash")] + NSString NonUSBackslash { get; } + + [Field ("GCKeyApplication")] + NSString Application { get; } + + [Field ("GCKeyPower")] + NSString Power { get; } + + [Field ("GCKeyInternational1")] + NSString International1 { get; } + + [Field ("GCKeyInternational2")] + NSString International2 { get; } + + [Field ("GCKeyInternational3")] + NSString International3 { get; } + + [Field ("GCKeyInternational4")] + NSString International4 { get; } + + [Field ("GCKeyInternational5")] + NSString International5 { get; } + + [Field ("GCKeyInternational6")] + NSString International6 { get; } + + [Field ("GCKeyInternational7")] + NSString International7 { get; } + + [Field ("GCKeyInternational8")] + NSString International8 { get; } + + [Field ("GCKeyInternational9")] + NSString International9 { get; } + + [Field ("GCKeyLANG1")] + NSString Lang1 { get; } + + [Field ("GCKeyLANG2")] + NSString Lang2 { get; } + + [Field ("GCKeyLANG3")] + NSString Lang3 { get; } + + [Field ("GCKeyLANG4")] + NSString Lang4 { get; } + + [Field ("GCKeyLANG5")] + NSString Lang5 { get; } + + [Field ("GCKeyLANG6")] + NSString Lang6 { get; } + + [Field ("GCKeyLANG7")] + NSString Lang7 { get; } + + [Field ("GCKeyLANG8")] + NSString Lang8 { get; } + + [Field ("GCKeyLANG9")] + NSString Lang9 { get; } + + [Field ("GCKeyLeftControl")] + NSString LeftControl { get; } + + [Field ("GCKeyLeftShift")] + NSString LeftShift { get; } + + [Field ("GCKeyLeftAlt")] + NSString LeftAlt { get; } + + [Field ("GCKeyLeftGUI")] + NSString LeftGui { get; } + + [Field ("GCKeyRightControl")] + NSString RightControl { get; } + + [Field ("GCKeyRightShift")] + NSString RightShift { get; } + + [Field ("GCKeyRightAlt")] + NSString RightAlt { get; } + + [Field ("GCKeyRightGUI")] + NSString RightGui { get; } + } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Static] + interface GCKeyCode + { + [Field ("GCKeyCodeKeyA")] + nint KeyA { get; } + + [Field ("GCKeyCodeKeyB")] + nint KeyB { get; } + + [Field ("GCKeyCodeKeyC")] + nint KeyC { get; } + + [Field ("GCKeyCodeKeyD")] + nint KeyD { get; } + + [Field ("GCKeyCodeKeyE")] + nint KeyE { get; } + + [Field ("GCKeyCodeKeyF")] + nint KeyF { get; } + + [Field ("GCKeyCodeKeyG")] + nint KeyG { get; } + + [Field ("GCKeyCodeKeyH")] + nint KeyH { get; } + + [Field ("GCKeyCodeKeyI")] + nint KeyI { get; } + + [Field ("GCKeyCodeKeyJ")] + nint KeyJ { get; } + + [Field ("GCKeyCodeKeyK")] + nint KeyK { get; } + + [Field ("GCKeyCodeKeyL")] + nint KeyL { get; } + + [Field ("GCKeyCodeKeyM")] + nint KeyM { get; } + + [Field ("GCKeyCodeKeyN")] + nint KeyN { get; } + + [Field ("GCKeyCodeKeyO")] + nint KeyO { get; } + + [Field ("GCKeyCodeKeyP")] + nint KeyP { get; } + + [Field ("GCKeyCodeKeyQ")] + nint KeyQ { get; } + + [Field ("GCKeyCodeKeyR")] + nint KeyR { get; } + + [Field ("GCKeyCodeKeyS")] + nint KeyS { get; } + + [Field ("GCKeyCodeKeyT")] + nint KeyT { get; } + + [Field ("GCKeyCodeKeyU")] + nint KeyU { get; } + + [Field ("GCKeyCodeKeyV")] + nint KeyV { get; } + + [Field ("GCKeyCodeKeyW")] + nint KeyW { get; } + + [Field ("GCKeyCodeKeyX")] + nint KeyX { get; } + + [Field ("GCKeyCodeKeyY")] + nint KeyY { get; } + + [Field ("GCKeyCodeKeyZ")] + nint KeyZ { get; } + + [Field ("GCKeyCodeOne")] + nint One { get; } + + [Field ("GCKeyCodeTwo")] + nint Two { get; } + + [Field ("GCKeyCodeThree")] + nint Three { get; } + + [Field ("GCKeyCodeFour")] + nint Four { get; } + + [Field ("GCKeyCodeFive")] + nint Five { get; } + + [Field ("GCKeyCodeSix")] + nint Six { get; } + + [Field ("GCKeyCodeSeven")] + nint Seven { get; } + + [Field ("GCKeyCodeEight")] + nint Eight { get; } + + [Field ("GCKeyCodeNine")] + nint Nine { get; } + + [Field ("GCKeyCodeZero")] + nint Zero { get; } + + [Field ("GCKeyCodeReturnOrEnter")] + nint ReturnOrEnter { get; } + + [Field ("GCKeyCodeEscape")] + nint Escape { get; } + + [Field ("GCKeyCodeDeleteOrBackspace")] + nint DeleteOrBackspace { get; } + + [Field ("GCKeyCodeTab")] + nint Tab { get; } + + [Field ("GCKeyCodeSpacebar")] + nint Spacebar { get; } + + [Field ("GCKeyCodeHyphen")] + nint Hyphen { get; } + + [Field ("GCKeyCodeEqualSign")] + nint EqualSign { get; } + + [Field ("GCKeyCodeOpenBracket")] + nint OpenBracket { get; } + + [Field ("GCKeyCodeCloseBracket")] + nint CloseBracket { get; } + + [Field ("GCKeyCodeBackslash")] + nint Backslash { get; } + + [Field ("GCKeyCodeNonUSPound")] + nint NonUSPound { get; } + + [Field ("GCKeyCodeSemicolon")] + nint Semicolon { get; } + + [Field ("GCKeyCodeQuote")] + nint Quote { get; } + + [Field ("GCKeyCodeGraveAccentAndTilde")] + nint GraveAccentAndTilde { get; } + + [Field ("GCKeyCodeComma")] + nint Comma { get; } + + [Field ("GCKeyCodePeriod")] + nint Period { get; } + + [Field ("GCKeyCodeSlash")] + nint Slash { get; } + + [Field ("GCKeyCodeCapsLock")] + nint CapsLock { get; } + + [Field ("GCKeyCodeF1")] + nint F1 { get; } + + [Field ("GCKeyCodeF2")] + nint F2 { get; } + + [Field ("GCKeyCodeF3")] + nint F3 { get; } + + [Field ("GCKeyCodeF4")] + nint F4 { get; } + + [Field ("GCKeyCodeF5")] + nint F5 { get; } + + [Field ("GCKeyCodeF6")] + nint F6 { get; } + + [Field ("GCKeyCodeF7")] + nint F7 { get; } + + [Field ("GCKeyCodeF8")] + nint F8 { get; } + + [Field ("GCKeyCodeF9")] + nint F9 { get; } + + [Field ("GCKeyCodeF10")] + nint F10 { get; } + + [Field ("GCKeyCodeF11")] + nint F11 { get; } + + [Field ("GCKeyCodeF12")] + nint F12 { get; } + + [Field ("GCKeyCodePrintScreen")] + nint PrintScreen { get; } + + [Field ("GCKeyCodeScrollLock")] + nint ScrollLock { get; } + + [Field ("GCKeyCodePause")] + nint Pause { get; } + + [Field ("GCKeyCodeInsert")] + nint Insert { get; } + + [Field ("GCKeyCodeHome")] + nint Home { get; } + + [Field ("GCKeyCodePageUp")] + nint PageUp { get; } + + [Field ("GCKeyCodeDeleteForward")] + nint DeleteForward { get; } + + [Field ("GCKeyCodeEnd")] + nint End { get; } + + [Field ("GCKeyCodePageDown")] + nint PageDown { get; } + + [Field ("GCKeyCodeRightArrow")] + nint RightArrow { get; } + + [Field ("GCKeyCodeLeftArrow")] + nint LeftArrow { get; } + + [Field ("GCKeyCodeDownArrow")] + nint DownArrow { get; } + + [Field ("GCKeyCodeUpArrow")] + nint UpArrow { get; } + + [Field ("GCKeyCodeKeypadNumLock")] + nint KeypadNumLock { get; } + + [Field ("GCKeyCodeKeypadSlash")] + nint KeypadSlash { get; } + + [Field ("GCKeyCodeKeypadAsterisk")] + nint KeypadAsterisk { get; } + + [Field ("GCKeyCodeKeypadHyphen")] + nint KeypadHyphen { get; } + + [Field ("GCKeyCodeKeypadPlus")] + nint KeypadPlus { get; } + + [Field ("GCKeyCodeKeypadEnter")] + nint KeypadEnter { get; } + + [Field ("GCKeyCodeKeypad1")] + nint Keypad1 { get; } + + [Field ("GCKeyCodeKeypad2")] + nint Keypad2 { get; } + + [Field ("GCKeyCodeKeypad3")] + nint Keypad3 { get; } + + [Field ("GCKeyCodeKeypad4")] + nint Keypad4 { get; } + + [Field ("GCKeyCodeKeypad5")] + nint Keypad5 { get; } + + [Field ("GCKeyCodeKeypad6")] + nint Keypad6 { get; } + + [Field ("GCKeyCodeKeypad7")] + nint Keypad7 { get; } + + [Field ("GCKeyCodeKeypad8")] + nint Keypad8 { get; } + + [Field ("GCKeyCodeKeypad9")] + nint Keypad9 { get; } + + [Field ("GCKeyCodeKeypad0")] + nint Keypad0 { get; } + + [Field ("GCKeyCodeKeypadPeriod")] + nint KeypadPeriod { get; } + + [Field ("GCKeyCodeKeypadEqualSign")] + nint KeypadEqualSign { get; } + + [Field ("GCKeyCodeNonUSBackslash")] + nint NonUSBackslash { get; } + + [Field ("GCKeyCodeApplication")] + nint Application { get; } + + [Field ("GCKeyCodePower")] + nint Power { get; } + + [Field ("GCKeyCodeInternational1")] + nint International1 { get; } + + [Field ("GCKeyCodeInternational2")] + nint International2 { get; } + + [Field ("GCKeyCodeInternational3")] + nint International3 { get; } + + [Field ("GCKeyCodeInternational4")] + nint International4 { get; } + + [Field ("GCKeyCodeInternational5")] + nint International5 { get; } + + [Field ("GCKeyCodeInternational6")] + nint International6 { get; } + + [Field ("GCKeyCodeInternational7")] + nint International7 { get; } + + [Field ("GCKeyCodeInternational8")] + nint International8 { get; } + + [Field ("GCKeyCodeInternational9")] + nint International9 { get; } + + [Field ("GCKeyCodeLANG1")] + nint Lang1 { get; } + + [Field ("GCKeyCodeLANG2")] + nint Lang2 { get; } + + [Field ("GCKeyCodeLANG3")] + nint Lang3 { get; } + + [Field ("GCKeyCodeLANG4")] + nint Lang4 { get; } + + [Field ("GCKeyCodeLANG5")] + nint Lang5 { get; } + + [Field ("GCKeyCodeLANG6")] + nint Lang6 { get; } + + [Field ("GCKeyCodeLANG7")] + nint Lang7 { get; } + + [Field ("GCKeyCodeLANG8")] + nint Lang8 { get; } + + [Field ("GCKeyCodeLANG9")] + nint Lang9 { get; } + + [Field ("GCKeyCodeLeftControl")] + nint LeftControl { get; } + + [Field ("GCKeyCodeLeftShift")] + nint LeftShift { get; } + + [Field ("GCKeyCodeLeftAlt")] + nint LeftAlt { get; } + + [Field ("GCKeyCodeLeftGUI")] + nint LeftGui { get; } + + [Field ("GCKeyCodeRightControl")] + nint RightControl { get; } + + [Field ("GCKeyCodeRightShift")] + nint RightShift { get; } + + [Field ("GCKeyCodeRightAlt")] + nint RightAlt { get; } + + [Field ("GCKeyCodeRightGUI")] + nint RightGui { get; } + } } diff --git a/src/gamekit.cs b/src/gamekit.cs index 2165c598efa5..712e3bb3aa27 100644 --- a/src/gamekit.cs +++ b/src/gamekit.cs @@ -5,9 +5,11 @@ // Miguel de Icaza // Marek Safar (marek.safar@gmail.com) // Aaron Bockover (abock@xamarin.com) +// Whitney Schmidt (whschm@microsoft.com) // // Copyright 2009, Novell, Inc. // Copyright 2011-2013 Xamarin Inc. All rights reserved +// Copyright 2020 Microsoft Corp. All rights reserved // #pragma warning disable 618 @@ -16,8 +18,11 @@ using ObjCRuntime; using Foundation; using CoreFoundation; +using CoreGraphics; #if MONOMAC using AppKit; +using UIWindow = AppKit.NSWindow; +using UIViewController = AppKit.NSViewController; #else using UIKit; using NSViewController = Foundation.NSObject; @@ -38,6 +43,8 @@ namespace GameKit { delegate void GKPlayerStateUpdateHandler (string playerId, GKVoiceChatPlayerState state); delegate void GKIdentityVerificationSignatureHandler (NSUrl publicKeyUrl, NSData signature, NSData salt, ulong timestamp, NSError error); delegate void GKLeaderboardSetsHandler (GKLeaderboardSet [] leaderboardSets, NSError error); + delegate void GKEntriesForPlayerScopeHandler (GKLeaderboardEntry localPlayerEntry, GKLeaderboardEntry [] entries, nint totalPlayerCount, NSError error); + delegate void GKEntriesForPlayersHandler (GKLeaderboardEntry localPlayerEntry, GKLeaderboardEntry [] entries, NSError error); #if MONOMAC delegate void GKImageLoadedHandler (NSImage image, NSError error); @@ -54,6 +61,7 @@ namespace GameKit { interface UIAppearance {} interface UIViewController {} interface UINavigationController {} + interface UIWindow {} #endif @@ -268,14 +276,27 @@ interface GKSession { } [Watch (3,0)] + [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface GKLeaderboard { + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("timeScope", ArgumentSemantic.Assign)] GKLeaderboardTimeScope TimeScope { get; set; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("playerScope", ArgumentSemantic.Assign)] GKLeaderboardPlayerScope PlayerScope { get; set; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("maxRange", ArgumentSemantic.Assign)] nint MaxRange { get; } @@ -290,21 +311,44 @@ interface GKLeaderboard { [Export ("title", ArgumentSemantic.Copy)] string Title { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("range", ArgumentSemantic.Assign)] NSRange Range { get; set; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("scores", ArgumentSemantic.Retain)] GKScore [] Scores { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("localPlayerScore", ArgumentSemantic.Retain)] GKScore LocalPlayerScore { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadLeaderboards' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadLeaderboards' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadLeaderboards' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadLeaderboards' instead.")] + [Export ("init")] + IntPtr Constructor (); + [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) - [Deprecated (PlatformName.iOS, 8, 0, message : "Use 'ctor (GKPlayer [] players)' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 10, message : "Use 'ctor (GKPlayer [] players)' instead.")] + [Deprecated (PlatformName.iOS, 8, 0, message : "Use '.ctor (GKPlayer [] players)' instead.")] + [Deprecated (PlatformName.MacOSX, 10, 10, message : "Use '.ctor (GKPlayer [] players)' instead.")] [Export ("initWithPlayerIDs:")] IntPtr Constructor ([NullAllowed] string [] players); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("loadScoresWithCompletionHandler:")] [Async] void LoadScores ([NullAllowed] GKScoresLoadedHandler scoresLoadedHandler); @@ -331,10 +375,18 @@ interface GKLeaderboard { string GroupIdentifier { get; [NotImplemented] set; } [Static] + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] [Export ("loadLeaderboardsWithCompletionHandler:")] [Async] void LoadLeaderboards ([NullAllowed] Action completionHandler); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [iOS (7,0)][Mac (10,10)] [NullAllowed] [Export ("identifier", ArgumentSemantic.Copy)] @@ -347,13 +399,73 @@ interface GKLeaderboard { [Async] void LoadImage ([NullAllowed] GKImageLoadedHandler completionHandler); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [iOS (8,0), Mac (10,10)] [Export ("initWithPlayers:")] IntPtr Constructor (GKPlayer [] players); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Mac (10,10)] // should be 10,8 but tests fails before Yosemite [Export ("loading")] bool IsLoading { [Bind ("isLoading")] get; } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Async] + [Export ("loadLeaderboardsWithIDs:completionHandler:")] + void LoadLeaderboards ([NullAllowed] string[] leaderboardIds, GKLeaderboardsHandler completionHandler); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("submitScore:context:player:leaderboardIDs:completionHandler:")] + [Async] + void SubmitScore (nint score, nuint context, GKPlayer player, string[] leaderboardIds, Action completionHandler); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("baseLeaderboardID", ArgumentSemantic.Strong)] + string BaseLeaderboardId { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("duration")] + double Duration { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Async (ResultTypeName = "GKEntriesForPlayerScopeResult")] + [Export ("loadEntriesForPlayerScope:timeScope:range:completionHandler:")] + void LoadEntries (GKLeaderboardPlayerScope playerScope, GKLeaderboardTimeScope timeScope, NSRange range, [NullAllowed] GKEntriesForPlayerScopeHandler completionHandler); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Async (ResultTypeName = "GKEntriesForPlayersResult")] + [Export ("loadEntriesForPlayers:timeScope:completionHandler:")] + void LoadEntries (GKPlayer[] players, GKLeaderboardTimeScope timeScope, [NullAllowed] GKEntriesForPlayersHandler completionHandler); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("loadPreviousOccurrenceWithCompletionHandler:")] + [Async] + void LoadPreviousOccurrence (GKLeaderboardsHandler completionHandler); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("nextStartDate", ArgumentSemantic.Strong)] + NSDate NextStartDate { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("startDate", ArgumentSemantic.Strong)] + NSDate StartDate { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("submitScore:context:player:completionHandler:")] + [Async] + void SubmitScore (nint score, nuint context, GKPlayer player, Action completionHandler); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("type")] + GKLeaderboardType Type { get; } } [Watch (3,0)] @@ -376,10 +488,19 @@ interface GKLeaderboardSet : NSCoding, NSSecureCoding { [Async] void LoadLeaderboardSets ([NullAllowed] GKLeaderboardSetsHandler completionHandler); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] [Export ("loadLeaderboardsWithCompletionHandler:")] [Async] void LoadLeaderboards ([NullAllowed] GKLeaderboardsHandler completionHandler); + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("loadLeaderboardsWithHandler:")] + [Async] + void LoadLeaderboardsWithCompletionHandler (GKLeaderboardsHandler handler); + #if !MONOMAC [NoTV] [NoWatch] @@ -481,8 +602,20 @@ interface GKPlayer : NSSecureCoding { [TV (13,0)][Mac (10,15)][iOS (13,0)] [Export ("scopedIDsArePersistent")] bool ScopedIdsArePersistent { get; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Field ("GKPlayerIDNoLongerAvailable")] + NSString IdNoLongerAvailable { get; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("isInvitable")] + bool IsInvitable { get; } } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'GKLeaderboardEntry' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'GKLeaderboardEntry' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'GKLeaderboardEntry' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'GKLeaderboardEntry' instead.")] [Watch (3,0)] [BaseType (typeof (NSObject))] interface GKScore : NSSecureCoding { @@ -569,6 +702,12 @@ interface GKScore : NSSecureCoding { [Async] void ReportScores (GKScore[] scores, [NullAllowed] GKChallenge[] challenges, [NullAllowed] Action completionHandler); + [NoWatch] + [iOS (14,0)][Mac (11,0)][TV (14,0)] + [Static] + [Async] + [Export ("reportLeaderboardScores:withEligibleChallenges:withCompletionHandler:")] + void ReportLeaderboardScores (GKLeaderboardScore[] scores, GKChallenge[] eligibleChallenges, [NullAllowed] Action completionHandler); #if !MONOMAC [NoTV][NoWatch] [Availability (Deprecated = Platform.iOS_8_0, Message = "Pass 'GKPlayers' to 'ChallengeComposeController (GKPlayer [] players, string message, ...)' instead.")] @@ -803,6 +942,11 @@ interface GKLocalPlayer [Static] [Export ("local")] GKLocalPlayer Local { get; } + + [NoWatch] + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("personalizedCommunicationRestricted")] + bool PersonalizedCommunicationRestricted { [Bind ("isPersonalizedCommunicationRestricted")] get; } } [NoWatch] @@ -846,7 +990,7 @@ interface GKMatch { [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message : "Use 'Players' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message : "Use 'Players' instead.")] - [Export ("playerIDs")] + [NullAllowed, Export ("playerIDs")] string [] PlayersIDs { get; } [Export ("delegate", ArgumentSemantic.Assign), NullAllowed] @@ -1000,7 +1144,7 @@ interface GKVoiceChat { [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message : "Use 'Players' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message : "Use 'Players' instead.")] - [Export ("playerIDs")] + [NullAllowed, Export ("playerIDs")] string [] PlayerIDs { get; } [iOS (8,0)][Mac (10,10)] @@ -1064,6 +1208,9 @@ interface GKMatchRequest { GKPlayer [] Recipients { get; set; } [NoWatch] + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'GKMatchmakerViewController.MatchmakingMode' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'GKMatchmakerViewController.MatchmakingMode' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'GKMatchmakerViewController.MatchmakingMode' instead.")] [TV (13,0)][Mac (10,15)][iOS (13,0)] [Export ("restrictToAutomatch")] bool RestrictToAutomatch { get; set; } @@ -1240,6 +1387,10 @@ interface GKMatchmakerViewController [iOS (8,0), Mac (10,10)] [Export ("setHostedPlayer:didConnect:")] void SetHostedPlayerConnected (GKPlayer playerID, bool connected); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("matchmakingMode", ArgumentSemantic.Assign)] + GKMatchmakingMode MatchmakingMode { get; set; } } [NoWatch] @@ -1369,8 +1520,8 @@ interface GKAchievement : NSSecureCoding { [NoTV] [iOS (7,0)] [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'Player' instead.")] - [Export ("playerID", ArgumentSemantic.Copy)] - string PlayerID { + [NullAllowed, Export ("playerID", ArgumentSemantic.Copy)] + string PlayerID { get; } #endif @@ -1823,6 +1974,8 @@ interface GKTurnBasedMatch { [Export ("setLocalizableMessageWithKey:arguments:")] void SetMessage (string localizableMessage, params NSObject [] arguments); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'EndMatchInTurn (NSData, GKLeaderboardScore[], NSObject[], Action)' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'EndMatchInTurn (NSData, GKLeaderboardScore[], NSObject[], Action)' instead.")] [iOS (7,0)][Mac (10,10)] [Export ("endMatchInTurnWithMatchData:scores:achievements:completionHandler:")] [Async] @@ -1842,6 +1995,11 @@ interface GKTurnBasedMatch { [Export ("sendReminderToParticipants:localizableMessageKey:arguments:completionHandler:")] [Async] void SendReminder (GKTurnBasedParticipant [] participants, string localizableMessage, NSObject [] arguments, [NullAllowed] Action completionHandler); + + [iOS (14,0)][Mac (11,0)][Watch (7,0)][TV (14,0)] + [Export ("endMatchInTurnWithMatchData:leaderboardScores:achievements:completionHandler:")] + [Async] + void EndMatchInTurn (NSData matchData, GKLeaderboardScore[] scores, NSObject[] achievements, Action completionHandler); } [NoWatch] @@ -1986,7 +2144,23 @@ interface GKGameCenterViewController [NoiOS] [Export ("initWithNibName:bundle:")] IntPtr Constructor ([NullAllowed] string nibNameOrNull, [NullAllowed] NSBundle nibBundleOrNull); - + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("initWithLeaderboardID:playerScope:timeScope:")] + IntPtr Constructor (string leaderboardId, GKLeaderboardPlayerScope playerScope, GKLeaderboardTimeScope timeScope); + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("initWithLeaderboard:playerScope:")] + IntPtr Constructor (GKLeaderboard leaderboard, GKLeaderboardPlayerScope playerScope); + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("initWithAchievementID:")] + IntPtr Constructor (string achievementId); + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("initWithState:")] + IntPtr Constructor (GKGameCenterViewControllerState state); + [Export ("gameCenterDelegate", ArgumentSemantic.Weak), NullAllowed] NSObject WeakDelegate { get; set; } @@ -1994,7 +2168,10 @@ interface GKGameCenterViewController [Protocolize] GKGameCenterControllerDelegate Delegate { get; set; } - [NoTV] + [Deprecated (PlatformName.iOS, 14, 0, message: "Use '.ctor (GKGameCenterViewControllerState)' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use '.ctor (GKGameCenterViewControllerState)' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use '.ctor (GKGameCenterViewControllerState)' instead.")] + [TV (9,0)] [Export ("viewState", ArgumentSemantic.Assign)] GKGameCenterViewControllerState ViewState { get; set; } @@ -2011,8 +2188,10 @@ interface GKGameCenterViewController [Deprecated (PlatformName.MacOSX, 10, 10, message : "Use 'LeaderboardIdentifier' instead.")] string LeaderboardCategory { get; set; } - [NoTV] - [iOS (7,0)][Mac (10,10)] // Marked 10.9 in header, apple 17612948 + [Deprecated (PlatformName.iOS, 14, 0, message: "Use '.ctor (GKLeaderboard, GKLeaderboardPlayerScope)' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use '.ctor (GKLeaderboard, GKLeaderboardPlayerScope)' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use '.ctor (GKLeaderboard, GKLeaderboardPlayerScope)' instead.")] + [TV (9,0)][iOS (7,0)][Mac (10,10)] // Marked 10.9 in header, apple 17612948 [NullAllowed] // by default this property is null [Export ("leaderboardIdentifier", ArgumentSemantic.Strong)] string LeaderboardIdentifier { get; set; } @@ -2456,4 +2635,95 @@ interface GKSessionDelegate { [Export ("session:didFailWithError:")] void FailedWithError (GKSession session, NSError error); } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface GKAccessPoint + { + [Static] + [Export ("shared")] + GKAccessPoint Shared { get; } + + [Export ("active")] + bool Active { [Bind ("isActive")] get; set; } + + [NoMac, NoiOS] + [Export ("focused")] + bool Focused { [Bind ("isFocused")] get; set; } + + [Export ("visible")] + bool Visible { [Bind ("isVisible")] get; } + + [Export ("isPresentingGameCenter")] + bool IsPresentingGameCenter { get; } + + [Export ("showHighlights")] + bool ShowHighlights { get; set; } + + [Export ("location", ArgumentSemantic.Assign)] + GKAccessPointLocation Location { get; set; } + + [Export ("frameInScreenCoordinates")] + CGRect FrameInScreenCoordinates { get; } + + [NullAllowed, Export ("parentWindow", ArgumentSemantic.Weak)] + UIWindow ParentWindow { get; set; } + + [Export ("triggerAccessPointWithHandler:")] + void TriggerAccessPoint (Action handler); + + [Export ("triggerAccessPointWithState:handler:")] + void TriggerAccessPoint (GKGameCenterViewControllerState state, Action handler); + } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [DisableDefaultCtor] + [BaseType (typeof (NSObject))] + interface GKLeaderboardEntry + { + [Export ("player", ArgumentSemantic.Strong)] + GKPlayer Player { get; } + +#if false + // Some APIs missing on iOS, tvOS, watchOS as of Xcode 12 beta 3 - https://github.com/xamarin/maccore/issues/2269 + // disabled since the selectors don't respond on macOS 11.0 + [Export ("rank")] + nint Rank { get; } + + [Export ("score")] + nint Score { get; } + + [Export ("formattedScore", ArgumentSemantic.Strong)] + string FormattedScore { get; } + + [Export ("context")] + nuint Context { get; } + + [Export ("date", ArgumentSemantic.Strong)] + NSDate Date { get; } +#endif + [NoWatch] // header lists watch as supported, but UIViewController is not available on Watch! + [Async (ResultTypeName = "GKChallengeComposeResult")] + [Export ("challengeComposeControllerWithMessage:players:completionHandler:")] + UIViewController ChallengeComposeController ([NullAllowed] string message, [NullAllowed] GKPlayer[] players, [NullAllowed] GKChallengeComposeHandler completionHandler); + } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + interface GKLeaderboardScore + { + [Export ("player", ArgumentSemantic.Strong)] + GKPlayer Player { get; set; } + + [Export ("value")] + nint Value { get; set; } + + [Export ("context")] + nuint Context { get; set; } + + [Export ("leaderboardID", ArgumentSemantic.Strong)] + string LeaderboardId { get; set; } + } } diff --git a/src/generator.cs b/src/generator.cs index 68d5f8b537b6..fbd603e544f2 100644 --- a/src/generator.cs +++ b/src/generator.cs @@ -2579,8 +2579,13 @@ void GenerateTrampolinesForQueue (TrampolineInfo [] queue) // it can't be conditional without fixing https://github.com/mono/linker/issues/516 // but we have a workaround in place because we can't fix old, binary bindings so... // print ("[Preserve (Conditional=true)]"); + // For .NET we fix it using the DynamicDependency attribute below print ("static internal readonly {0} Handler = {1};", ti.DelegateName, ti.TrampolineName); print (""); +#if NET + print ("[Preserve (Conditional = true)]"); + print ("[global::System.Diagnostics.CodeAnalysis.DynamicDependency (\"Handler\")]"); +#endif print ("[MonoPInvokeCallback (typeof ({0}))]", ti.DelegateName); print ("static unsafe {0} {1} ({2}) {{", ti.ReturnType, ti.TrampolineName, ti.Parameters); indent++; @@ -6735,6 +6740,12 @@ public void Generate (Type type) print ("_{0} = Runtime.GetNSObject (Dlfcn.GetIndirect (Libraries.{2}.Handle, \"{1}\"));", field_pi.Name, fieldAttr.SymbolName, library_name); indent--; print ("return _{0};", field_pi.Name); + } else if (field_pi.PropertyType.Name == "UTType") { + print ("if (_{0} == null)", field_pi.Name); + indent++; + print ("_{0} = Runtime.GetNSObject (Dlfcn.GetIntPtr (Libraries.{2}.Handle, \"{1}\"));", field_pi.Name, fieldAttr.SymbolName, library_name); + indent--; + print ("return _{0};", field_pi.Name); } else if (field_pi.PropertyType == TypeManager.System_Int32){ print ("return Dlfcn.GetInt32 (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (field_pi.PropertyType == TypeManager.System_UInt32) { diff --git a/src/healthkit.cs b/src/healthkit.cs index c605b2f73757..3653f1ee3989 100644 --- a/src/healthkit.cs +++ b/src/healthkit.cs @@ -7,7 +7,7 @@ // Whitney Schmidt (whschm@microsoft.com) // // Copyright 2014-2015 Xamarin Inc. -// Copyright 2019 Microsoft Corporation. All rights reserved. +// Copyright 2019, 2020 Microsoft Corporation. All rights reserved. // using CoreFoundation; @@ -41,6 +41,7 @@ public enum HKErrorCode : long { UserCanceled, AnotherWorkoutSessionStarted, UserExitedWorkoutSession, + NoData, } [iOS (10,0)] @@ -72,30 +73,11 @@ public enum HKHeartRateMotionContext : long { Active, } - [iOS (13,6), NoWatch] + [Watch (7,0), iOS (14,0)] [Native] - public enum HKCategoryValueSeverity : long { - Unspecified = 0, - NotPresent, - Mild, - Moderate, - Severe, - } - - [iOS (13,6), NoWatch] - [Native] - public enum HKCategoryValueAppetiteChanges : long { - Unspecified = 0, - NoChange, - Decreased, - Increased, - } - - [iOS (13,6), NoWatch] - [Native] - public enum HKCategoryValuePresence : long { - Present = 0, - NotPresent, + public enum HKActivityMoveMode : long { + ActiveEnergy = 1, + AppleMoveTime = 2, } delegate void HKAnchoredObjectResultHandler2 (HKAnchoredObjectQuery query, HKSample[] results, nuint newAnchor, NSError error); @@ -256,6 +238,18 @@ interface HKPredicateKeyPath { [Watch (6, 0), iOS (13, 0)] [Field ("HKPredicateKeyPathCount")] NSString PathCount { get; } + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKPredicateKeyPathAverageHeartRate")] + NSString AverageHeartRate { get; } + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKPredicateKeyPathECGClassification")] + NSString EcgClassification { get; } + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKPredicateKeyPathECGSymptomsStatus")] + NSString EcgSymptomsStatus { get; } } [NoWatch] // headers says it's available but it's only usable from another, unavailable, type @@ -479,6 +473,11 @@ interface HKHealthStore { [return: NullAllowed] HKWheelchairUseObject GetWheelchairUse (out NSError error); + [Watch (7,0), iOS (14,0)] + [Export ("activityMoveModeWithError:")] + [return: NullAllowed] + HKActivityMoveModeObject GetActivityMoveMode ([NullAllowed] out NSError error); + // FIXME NS_EXTENSION_UNAVAILABLE("Not available to extensions") ; [Export ("stopQuery:")] void StopQuery (HKQuery query); @@ -921,6 +920,22 @@ interface HKMetadataKey { [Watch (6, 0), iOS (13, 0)] [Field ("HKMetadataKeyAudioExposureLevel")] NSString AudioExposureLevel { get; } + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKMetadataKeyDevicePlacementSide")] + NSString DevicePlacementSide { get; } + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKMetadataKeyBarometricPressure")] + NSString BarometricPressure { get; } + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKMetadataKeyAppleECGAlgorithmVersion")] + NSString AppleEcgAlgorithmVersion { get; } + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKMetadataKeyAppleDeviceCalibrated")] + NSString AppleDeviceCalibrated { get; } } [Watch (2,0)] @@ -1047,6 +1062,18 @@ interface HKObjectType : NSSecureCoding, NSCopying { [Static] [Export ("audiogramSampleType")] HKAudiogramSampleType AudiogramSampleType { get; } + + [Watch (7, 0), iOS (14, 0)] + [Static] + [Export ("electrocardiogramType")] + HKElectrocardiogramType ElectrocardiogramType { get; } + } + + [Watch (7, 0), iOS (14, 0)] + [BaseType (typeof (HKSampleType))] + [DisableDefaultCtor] // NSInvalidArgumentException Reason: The -init method is not available on HKElectrocardiogram + interface HKElectrocardiogramType { + } [Watch (2,0)] @@ -1083,7 +1110,7 @@ interface HKSampleType { [Watch (5,0)] [iOS (12,0)] [BaseType (typeof (HKSampleType))] - [DisableDefaultCtor] // NSInvalidArgumentException Reason: The -init method is not available on HKClinicalType + [DisableDefaultCtor] // NSInvalidArgumentException Reason: The -init method is not available on HKClinicalType interface HKClinicalType { } @@ -1246,6 +1273,11 @@ interface HKQuery { [Export ("predicateForObjectsFromSourceRevisions:")] NSPredicate GetPredicateForObjectsFromSourceRevisions (NSSet sourceRevisions); + [Watch (7,0), iOS (14,0)] + [Static] + [Export ("predicateForObjectsAssociatedWithElectrocardiogram:")] + NSPredicate GetPredicateForObjects (HKElectrocardiogram electrocardiogram); + // HKQuery (HKQuantitySamplePredicates) Category [Static] @@ -1329,6 +1361,18 @@ interface HKQuery { [Static] [Wrap ("GetPredicateForClinicalRecords (source, resourceType.GetConstant (), identifier)")] NSPredicate GetPredicateForClinicalRecords (HKSource source, HKFhirResourceType resourceType, string identifier); + + // @interface HKElectrocardiogramPredicates (HKQuery) + + [Watch (7,0), iOS (14,0)] + [Static] + [Export ("predicateForElectrocardiogramsWithClassification:")] + NSPredicate GetPredicateForElectrocardiograms (HKElectrocardiogramClassification classification); + + [Watch (7,0), iOS (14,0)] + [Static] + [Export ("predicateForElectrocardiogramsWithSymptomsStatus:")] + NSPredicate GetPredicateForElectrocardiograms (HKElectrocardiogramSymptomsStatus symptomsStatus); } [Watch (2,0)] @@ -1809,6 +1853,34 @@ enum HKQuantityTypeIdentifier { [Watch (6, 0), iOS (13, 0)] [Field ("HKQuantityTypeIdentifierHeadphoneAudioExposure")] HeadphoneAudioExposure, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKQuantityTypeIdentifierSixMinuteWalkTestDistance")] + SixMinuteWalkTestDistance, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKQuantityTypeIdentifierStairAscentSpeed")] + StairAscentSpeed, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKQuantityTypeIdentifierStairDescentSpeed")] + StairDescentSpeed, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKQuantityTypeIdentifierWalkingAsymmetryPercentage")] + WalkingAsymmetryPercentage, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKQuantityTypeIdentifierWalkingDoubleSupportPercentage")] + WalkingDoubleSupportPercentage, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKQuantityTypeIdentifierWalkingSpeed")] + WalkingSpeed, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKQuantityTypeIdentifierWalkingStepLength")] + WalkingStepLength, } [Watch (2,0)] @@ -1885,139 +1957,169 @@ enum HKCategoryTypeIdentifier [Field ("HKCategoryTypeIdentifierToothbrushingEvent")] ToothbrushingEvent, -#if IOS - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierAbdominalCramps")] AbdominalCramps, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierAcne")] Acne, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierAppetiteChanges")] AppetiteChanges, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierGeneralizedBodyAche")] GeneralizedBodyAche, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierBloating")] Bloating, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierBreastPain")] BreastPain, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierChestTightnessOrPain")] ChestTightnessOrPain, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierChills")] Chills, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierConstipation")] Constipation, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierCoughing")] Coughing, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierDiarrhea")] Diarrhea, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierDizziness")] Dizziness, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierFainting")] Fainting, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierFatigue")] Fatigue, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierFever")] Fever, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierHeadache")] Headache, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierHeartburn")] Heartburn, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierHotFlashes")] HotFlashes, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierLowerBackPain")] LowerBackPain, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierLossOfSmell")] LossOfSmell, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierLossOfTaste")] LossOfTaste, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierMoodChanges")] MoodChanges, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierNausea")] Nausea, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierPelvicPain")] PelvicPain, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat")] RapidPoundingOrFlutteringHeartbeat, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierRunnyNose")] RunnyNose, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierShortnessOfBreath")] ShortnessOfBreath, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierSinusCongestion")] SinusCongestion, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierSkippedHeartbeat")] SkippedHeartbeat, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierSleepChanges")] SleepChanges, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierSoreThroat")] SoreThroat, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierVomiting")] Vomiting, - [iOS (13,6), NoWatch] + [Watch (7, 0), iOS (13, 6)] [Field ("HKCategoryTypeIdentifierWheezing")] Wheezing, -#endif + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKCategoryTypeIdentifierBladderIncontinence")] + BladderIncontinence, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKCategoryTypeIdentifierDrySkin")] + DrySkin, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKCategoryTypeIdentifierHairLoss")] + HairLoss, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKCategoryTypeIdentifierVaginalDryness")] + VaginalDryness, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKCategoryTypeIdentifierMemoryLapse")] + MemoryLapse, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKCategoryTypeIdentifierNightSweats")] + NightSweats, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent")] + EnvironmentalAudioExposureEvent, + + [Watch (7, 0), iOS (14, 0)] + [Field ("HKCategoryTypeIdentifierHandwashingEvent")] + HandwashingEvent, } [Watch (2,0)] @@ -2043,10 +2145,9 @@ enum HKCharacteristicTypeIdentifier [Field ("HKCharacteristicTypeIdentifierWheelchairUse")] WheelchairUse, - // API unavailable https://github.com/xamarin/maccore/issues/1899 - // [Watch (6, 0), iOS (13, 0)] - // [Field ("HKCharacteristicTypeIdentifierActivityMoveMode")] - // ActivityMoveMode, + [Watch (7,0), iOS (14,0)] + [Field ("HKCharacteristicTypeIdentifierActivityMoveMode")] + ActivityMoveMode, } [Watch (2,0)] @@ -2154,10 +2255,10 @@ interface HKUnit : NSCopying, NSSecureCoding { [Static] [Export ("fluidOunceUSUnit")] HKUnit FluidOunceUSUnit { get; } - + [Static] [Export ("fluidOunceImperialUnit")] - HKUnit FluidOunceImperialUnit { get; } + HKUnit FluidOunceImperialUnit { get; } [Static] [Export ("pintUSUnit")] @@ -2199,6 +2300,11 @@ interface HKUnit : NSCopying, NSSecureCoding { [Export ("atmosphereUnit")] HKUnit Atmosphere { get; } + [Watch (7,0), iOS (14,0)] + [Static] + [Export ("inchesOfMercuryUnit")] + HKUnit InchesOfMercury { get; } + // HKUnit (Time) Category [Static] @@ -2328,6 +2434,18 @@ interface HKUnit : NSCopying, NSSecureCoding { [Static] [Export ("hertzUnit")] HKUnit HertzUnit { get; } + + // HKUnit (ElectricPotentialDifference) Category + + [Watch (7,0), iOS (14,0)] + [Static] + [Export ("voltUnitWithMetricPrefix:")] + HKUnit GetVolt (HKMetricPrefix prefix); + + [Watch (7,0), iOS (14,0)] + [Static] + [Export ("voltUnit")] + HKUnit Volt { get; } } [Watch (2,0)] @@ -2776,9 +2894,17 @@ interface HKActivitySummary : NSSecureCoding, NSCopying { [Export ("dateComponentsForCalendar:")] NSDateComponents DateComponentsForCalendar (NSCalendar calendar); + [Watch (7, 0), iOS (14, 0)] + [Export ("activityMoveMode", ArgumentSemantic.Assign)] + HKActivityMoveMode ActivityMoveMode { get; set; } + [Export ("activeEnergyBurned", ArgumentSemantic.Strong)] HKQuantity ActiveEnergyBurned { get; set; } + [Watch (7, 0), iOS (14, 0)] + [Export ("appleMoveTime", ArgumentSemantic.Strong)] + HKQuantity AppleMoveTime { get; set; } + [Export ("appleExerciseTime", ArgumentSemantic.Strong)] HKQuantity AppleExerciseTime { get; set; } @@ -2788,6 +2914,10 @@ interface HKActivitySummary : NSSecureCoding, NSCopying { [Export ("activeEnergyBurnedGoal", ArgumentSemantic.Strong)] HKQuantity ActiveEnergyBurnedGoal { get; set; } + [Watch (7, 0), iOS (14, 0)] + [Export ("appleMoveTimeGoal", ArgumentSemantic.Strong)] + HKQuantity AppleMoveTimeGoal { get; set; } + [Export ("appleExerciseTimeGoal", ArgumentSemantic.Strong)] HKQuantity AppleExerciseTimeGoal { get; set; } @@ -3090,6 +3220,10 @@ interface HKFhirResource : NSSecureCoding, NSCopying [NullAllowed, Export ("sourceURL", ArgumentSemantic.Copy)] NSUrl SourceUrl { get; } + + [iOS (14, 0)] + [Export ("FHIRVersion", ArgumentSemantic.Copy)] + HKFhirVersion FhirVersion { get; } } [Watch (5,0), iOS (12,0)] @@ -3265,4 +3399,95 @@ interface HKHeartbeatSeriesQuery [DesignatedInitializer] IntPtr Constructor (HKHeartbeatSeriesSample heartbeatSeries, HKHeartbeatSeriesQueryDataHandler dataHandler); } + + [Watch (7,0), iOS (14,0)] + [BaseType (typeof (HKSample))] + [DisableDefaultCtor] // NSInvalidArgumentException Reason: The -init method is not available on HKElectrocardiogram + interface HKElectrocardiogram + { + [Export ("numberOfVoltageMeasurements")] + nint NumberOfVoltageMeasurements { get; } + + [NullAllowed, Export ("samplingFrequency", ArgumentSemantic.Copy)] + HKQuantity SamplingFrequency { get; } + + [Export ("classification", ArgumentSemantic.Assign)] + HKElectrocardiogramClassification Classification { get; } + + [NullAllowed, Export ("averageHeartRate", ArgumentSemantic.Copy)] + HKQuantity AverageHeartRate { get; } + + [Export ("symptomsStatus", ArgumentSemantic.Assign)] + HKElectrocardiogramSymptomsStatus SymptomsStatus { get; } + } + + delegate void HKElectrocardiogramQueryDataHandler (HKElectrocardiogramQuery query, HKElectrocardiogramVoltageMeasurement voltageMeasurement, bool done, NSError error); + + [Watch (7,0), iOS (14,0)] + [BaseType (typeof (HKQuery))] + [DisableDefaultCtor] + interface HKElectrocardiogramQuery + { + + [Export ("initWithElectrocardiogram:dataHandler:")] + [DesignatedInitializer] + IntPtr Constructor (HKElectrocardiogram electrocardiogram, HKElectrocardiogramQueryDataHandler dataHandler); + } + + [Watch (7,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface HKElectrocardiogramVoltageMeasurement + { + [Export ("timeSinceSampleStart")] + double TimeSinceSampleStart { get; } + + [Export ("quantityForLead:")] + [return: NullAllowed] + HKQuantity GetQuantity (HKElectrocardiogramLead lead); + } + + [NoWatch, iOS (14,0)] + [BaseType (typeof (NSObject), Name = "HKFHIRVersion")] + [DisableDefaultCtor] + interface HKFhirVersion : NSCopying, NSSecureCoding + { + [Export ("majorVersion")] + nint MajorVersion { get; } + + [Export ("minorVersion")] + nint MinorVersion { get; } + + [Export ("patchVersion")] + nint PatchVersion { get; } + + [Export ("FHIRRelease", ArgumentSemantic.Strong)] + string FhirRelease { get; } + + [Export ("stringRepresentation")] + string StringRepresentation { get; } + + [Static] + [Export ("versionFromVersionString:error:")] + [return: NullAllowed] + HKFhirVersion GetVersion (string versionString, [NullAllowed] out NSError errorOut); + + [Static] + [Export ("primaryDSTU2Version")] + HKFhirVersion PrimaryDstu2Version { get; } + + [Static] + [Export ("primaryR4Version")] + HKFhirVersion PrimaryR4Version { get; } + } + + [Watch (7,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface HKActivityMoveModeObject : NSCopying, NSSecureCoding { + + [Export ("activityMoveMode")] + HKActivityMoveMode ActivityMoveMode { get; } + } + } diff --git a/src/iAd/iAd.cs b/src/iAd/iAd.cs index ade682ad870e..11e20240ff7f 100644 --- a/src/iAd/iAd.cs +++ b/src/iAd/iAd.cs @@ -7,6 +7,7 @@ // Copyright 2011-2014, 2016 Xamarin Inc // +using System; using ObjCRuntime; namespace iAd { @@ -50,10 +51,16 @@ public enum ADInterstitialPresentationPolicy : long { [ErrorDomain ("ADClientErrorDomain")] public enum ADClientError : long { Unknown = 0, - LimitAdTracking = 1, - [iOS (11,3)] + TrackingRestrictedOrDenied = 1, +#if !XAMCORE_4_0 + [Obsolete ("Use 'TrackingRestrictedOrDenied' instead.")] + LimitAdTracking = TrackingRestrictedOrDenied, +#endif MissingData = 2, - [iOS (11,3)] CorruptResponse = 3, + RequestClientError = 4, + RequestServerError = 5, + RequestNetworkError = 6, + UnsupportedPlatform = 7, } } \ No newline at end of file diff --git a/src/identitylookup.cs b/src/identitylookup.cs index 15091756ec81..d8a91b15481d 100644 --- a/src/identitylookup.cs +++ b/src/identitylookup.cs @@ -21,7 +21,17 @@ namespace IdentityLookup { public enum ILMessageFilterAction : long { None = 0, Allow = 1, - Filter = 2, + Junk = 2, +#if !XAMCORE_4_0 + [Obsolete ("Use 'Junk' instead.")] + Filter = Junk, +#endif + [iOS (14,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] + Promotion = 3, + [iOS (14,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] + Transaction = 4, } [iOS (11,0)] diff --git a/src/imageio.cs b/src/imageio.cs index 911e21491e61..4f332d8ec2f1 100644 --- a/src/imageio.cs +++ b/src/imageio.cs @@ -67,6 +67,10 @@ interface CGImageProperties { [Field ("kCGImagePropertyHEICSDictionary")] NSString HeicsDictionary { get; } + [Mac (11,0), iOS (14,0), TV (14,0), Watch (7,0)] + [Field ("kCGImagePropertyWebPDictionary")] + NSString WebPDictionary { get; } + // Camera-Maker Dictionaries [Field ("kCGImagePropertyMakerCanonDictionary")] NSString MakerCanonDictionary { get; } @@ -2000,6 +2004,32 @@ interface CGImageProperties { [Watch (4, 0), Mac (10, 13), iOS (11, 0), TV (11,0)] [Field ("kCGImagePropertyPrimaryImage")] NSString PrimaryImage { get; } + + // WebP Dictionary Keys + + [Mac (11,0)][iOS (14,0)][TV (14,0)][Watch (7,0)] + [Field ("kCGImagePropertyWebPLoopCount")] + NSString WebPLoopCount { get; } + + [Mac (11,0)][iOS (14,0)][TV (14,0)][Watch (7,0)] + [Field ("kCGImagePropertyWebPDelayTime")] + NSString WebPDelayTime { get; } + + [Mac (11,0)][iOS (14,0)][TV (14,0)][Watch (7,0)] + [Field ("kCGImagePropertyWebPUnclampedDelayTime")] + NSString WebPUnclampedDelayTime { get; } + + [Mac (11,0)][iOS (14,0)][TV (14,0)][Watch (7,0)] + [Field ("kCGImagePropertyWebPFrameInfoArray")] + NSString WebPFrameInfoArray { get; } + + [Mac (11,0)][iOS (14,0)][TV (14,0)][Watch (7,0)] + [Field ("kCGImagePropertyWebPCanvasPixelWidth")] + NSString WebPCanvasPixelWidth { get; } + + [Mac (11,0)][iOS (14,0)][TV (14,0)][Watch (7,0)] + [Field ("kCGImagePropertyWebPCanvasPixelHeight")] + NSString WebPCanvasPixelHeight { get; } } [iOS (7,0)] @@ -2170,6 +2200,10 @@ interface CGImageDestinationOptions { [Export ("ExifAuxDictionary")] NSDictionary ExifAuxDictionary { get; set; } + + [Mac (11,0), iOS (14,0), TV (14,0), Watch (7,0)] + [Export ("WebPDictionary")] + NSDictionary WebPDictionary { get; set; } } [Static] @@ -2242,6 +2276,10 @@ interface CGImageDestinationOptionsKeys { // [Field ("kCGImagePropertyExifAuxDictionary")] [Static][Wrap ("CGImageProperties.ExifAuxDictionary")] NSString ExifAuxDictionary { get; } + + [Mac (11,0), iOS (14,0), TV (14,0), Watch (7,0)] + [Static][Wrap ("CGImageProperties.WebPDictionary")] + NSString WebPDictionary { get; } } [Partial] diff --git a/src/intents.cs b/src/intents.cs index 95f95d070a8c..e8fdbce2d647 100644 --- a/src/intents.cs +++ b/src/intents.cs @@ -13,8 +13,14 @@ using Foundation; using ObjCRuntime; using CoreLocation; + +#if TVOS +using CNPostalAddress = Foundation.NSObject; +using EKRecurrenceRule = Foundation.NSObject; +#else using Contacts; using EventKit; +#endif #if MONOMAC using UIImage = Foundation.NSObject; @@ -32,6 +38,7 @@ interface NSUnitVolume : NSUnit {} interface NSUnitSpeed : NSUnit {} interface NSUnitEnergy : NSUnit {} interface NSUnitMass : NSUnit {} + interface NSUnitPower : NSUnit {} [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] @@ -46,9 +53,15 @@ public enum INBookRestaurantReservationIntentCode : long { FailureRequiringAppLaunchServiceTemporarilyUnavailable } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [Native] [Flags] public enum INCallCapabilityOptions : ulong { @@ -80,6 +93,7 @@ public enum INCallRecordType : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INCancelWorkoutIntentResponseCode : long { Unspecified = 0, @@ -99,6 +113,7 @@ public enum INCancelWorkoutIntentResponseCode : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-native-enum! INCarAirCirculationMode bound + [NoTV] [Native] public enum INCarAirCirculationMode : long { Unknown = 0, @@ -108,6 +123,7 @@ public enum INCarAirCirculationMode : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-native-enum! INCarAudioSource bound + [NoTV] [Native] public enum INCarAudioSource : long { Unknown = 0, @@ -124,6 +140,7 @@ public enum INCarAudioSource : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-native-enum! INCarDefroster bound + [NoTV] [Native] public enum INCarDefroster : long { Unknown = 0, @@ -134,6 +151,7 @@ public enum INCarDefroster : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-native-enum! INCarSeat bound + [NoTV] [Native] public enum INCarSeat : long { Unknown = 0, @@ -151,8 +169,14 @@ public enum INCarSeat : long { All } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [NoTV] [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] [Native] public enum INConditionalOperator : long { @@ -164,6 +188,7 @@ public enum INConditionalOperator : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INEndWorkoutIntentResponseCode : long { Unspecified = 0, @@ -211,6 +236,7 @@ public enum INGetRestaurantGuestIntentResponseCode : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INGetRideStatusIntentResponseCode : long { Unspecified = 0, @@ -238,6 +264,7 @@ public enum INGetUserCurrentRestaurantReservationBookingsIntentResponseCode : lo [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [Native] [ErrorDomain ("INIntentErrorDomain")] public enum INIntentErrorCode : long { @@ -278,6 +305,7 @@ public enum INIntentErrorCode : long { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [Native] public enum INIntentHandlingStatus : long { Unspecified = 0, @@ -293,6 +321,7 @@ public enum INIntentHandlingStatus : long { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [Native] public enum INInteractionDirection : long { Unspecified = 0, @@ -303,6 +332,7 @@ public enum INInteractionDirection : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INListRideOptionsIntentResponseCode : long { Unspecified = 0, @@ -328,6 +358,7 @@ public enum INListRideOptionsIntentResponseCode : long { #endif [iOS (10, 0)] [Watch (3, 2)] + [NoTV] [Native] public enum INMessageAttribute : long { Unknown = 0, @@ -339,9 +370,15 @@ public enum INMessageAttribute : long { Played, } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [Native] [Flags] public enum INMessageAttributeOptions : ulong { @@ -356,6 +393,7 @@ public enum INMessageAttributeOptions : ulong { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INPauseWorkoutIntentResponseCode : long { Unspecified = 0, @@ -375,7 +413,7 @@ public enum INPauseWorkoutIntentResponseCode : long { [iOS (10, 0)] [Watch (3, 2)] - [Unavailable (PlatformName.MacOSX)] + [NoTV, Mac (11,0)] [Native] public enum INPaymentMethodType : long { Unknown = 0, @@ -392,6 +430,7 @@ public enum INPaymentMethodType : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INPaymentStatus : long { Unknown = 0, @@ -402,6 +441,7 @@ public enum INPaymentStatus : long { Unpaid } + [Mac (11,0), NoTV] [Native] public enum INPersonSuggestionType : long { [iOS (12,0), Mac (10,14), Watch (5,0)] @@ -413,6 +453,7 @@ public enum INPersonSuggestionType : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-native-enum! INPhotoAttributeOptions bound + [NoTV] [Native] [Flags] public enum INPhotoAttributeOptions : ulong { @@ -454,6 +495,7 @@ public enum INPhotoAttributeOptions : ulong { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-native-enum! INRadioType bound + [NoTV] [Native] public enum INRadioType : long { Unknown = 0, @@ -466,6 +508,7 @@ public enum INRadioType : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INRelativeReference : long { Unknown = 0, @@ -475,6 +518,7 @@ public enum INRelativeReference : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INRelativeSetting : long { Unknown = 0, @@ -487,6 +531,7 @@ public enum INRelativeSetting : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INRequestPaymentIntentResponseCode : long { Unspecified = 0, @@ -509,6 +554,7 @@ public enum INRequestPaymentIntentResponseCode : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INRequestRideIntentResponseCode : long { Unspecified = 0, @@ -539,6 +585,7 @@ public enum INRestaurantReservationUserBookingStatus : ulong { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INResumeWorkoutIntentResponseCode : long { Unspecified = 0, @@ -559,6 +606,7 @@ public enum INResumeWorkoutIntentResponseCode : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INRidePhase : long { Unknown = 0, @@ -573,6 +621,7 @@ public enum INRidePhase : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Native] public enum INSaveProfileInCarIntentResponseCode : long { Unspecified = 0, @@ -583,9 +632,15 @@ public enum INSaveProfileInCarIntentResponseCode : long { FailureRequiringAppLaunch } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [Native] public enum INSearchCallHistoryIntentResponseCode : long { Unspecified = 0, @@ -602,9 +657,15 @@ public enum INSearchCallHistoryIntentResponseCode : long { Success, } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [Native] public enum INSearchForMessagesIntentResponseCode : long { Unspecified = 0, @@ -621,6 +682,7 @@ public enum INSearchForMessagesIntentResponseCode : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INSearchForPhotosIntentResponseCode : long { Unspecified = 0, @@ -633,9 +695,15 @@ public enum INSearchForPhotosIntentResponseCode : long { FailureAppConfigurationRequired, } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [Native] public enum INSendMessageIntentResponseCode : long { Unspecified = 0, @@ -650,6 +718,7 @@ public enum INSendMessageIntentResponseCode : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INSendPaymentIntentResponseCode : long { Unspecified = 0, @@ -675,6 +744,7 @@ public enum INSendPaymentIntentResponseCode : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Native] public enum INSetAudioSourceInCarIntentResponseCode : long { Unspecified = 0, @@ -688,6 +758,7 @@ public enum INSetAudioSourceInCarIntentResponseCode : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Native] public enum INSetClimateSettingsInCarIntentResponseCode : long { Unspecified = 0, @@ -701,6 +772,7 @@ public enum INSetClimateSettingsInCarIntentResponseCode : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Native] public enum INSetDefrosterSettingsInCarIntentResponseCode : long { Unspecified = 0, @@ -714,6 +786,7 @@ public enum INSetDefrosterSettingsInCarIntentResponseCode : long { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Native] public enum INSetMessageAttributeIntentResponseCode : long { Unspecified = 0, @@ -729,6 +802,7 @@ public enum INSetMessageAttributeIntentResponseCode : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Native] public enum INSetProfileInCarIntentResponseCode : long { Unspecified = 0, @@ -742,6 +816,7 @@ public enum INSetProfileInCarIntentResponseCode : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Native] public enum INSetRadioStationIntentResponseCode : long { Unspecified = 0, @@ -756,6 +831,7 @@ public enum INSetRadioStationIntentResponseCode : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Native] public enum INSetSeatSettingsInCarIntentResponseCode : long { Unspecified = 0, @@ -774,15 +850,20 @@ public enum INSiriAuthorizationStatus : long { NotDetermined = 0, Restricted, Denied, - Authorized + Authorized, } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntentResponseCode' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'INStartCallIntentResponseCode' instead.")] [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntentResponseCode' instead.")] [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [Native] public enum INStartAudioCallIntentResponseCode : long { Unspecified = 0, @@ -805,6 +886,7 @@ public enum INStartAudioCallIntentResponseCode : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INStartPhotoPlaybackIntentResponseCode : long { Unspecified = 0, @@ -816,12 +898,17 @@ public enum INStartPhotoPlaybackIntentResponseCode : long { FailureAppConfigurationRequired, } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntentResponseCode' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'INStartCallIntentResponseCode' instead.")] [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntentResponseCode' instead.")] [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Native] public enum INStartVideoCallIntentResponseCode : long { Unspecified = 0, @@ -844,6 +931,7 @@ public enum INStartVideoCallIntentResponseCode : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INStartWorkoutIntentResponseCode : long { Unspecified = 0, @@ -864,6 +952,7 @@ public enum INStartWorkoutIntentResponseCode : long { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Watch (6, 0)] + [TV (14,0)] [Native] public enum INVocabularyStringType : long { ContactName = 1, @@ -897,6 +986,7 @@ public enum INVocabularyStringType : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-native-enum! INWorkoutGoalUnitType bound + [NoTV] [Native] public enum INWorkoutGoalUnitType : long { Unknown = 0, @@ -915,6 +1005,7 @@ public enum INWorkoutGoalUnitType : long { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-native-enum! INWorkoutLocationType bound + [NoTV] [Native] public enum INWorkoutLocationType : long { Unknown = 0, @@ -925,6 +1016,7 @@ public enum INWorkoutLocationType : long { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [Native] public enum INPersonHandleType : long { Unknown = 0, @@ -935,6 +1027,7 @@ public enum INPersonHandleType : long { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INAccountType : long { Unknown = 0, @@ -950,6 +1043,7 @@ public enum INAccountType : long { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INActivateCarSignalIntentResponseCode : long { Unspecified = 0, @@ -963,6 +1057,7 @@ public enum INActivateCarSignalIntentResponseCode : long { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INAmountType : long { Unknown = 0, @@ -980,6 +1075,7 @@ public enum INAmountType : long { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INBillType : long { Unknown = 0, @@ -1010,6 +1106,7 @@ public enum INBillType : long { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] [Flags] public enum INCarSignalOptions : ulong { @@ -1020,6 +1117,7 @@ public enum INCarSignalOptions : ulong { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INGetCarLockStatusIntentResponseCode : long { Unspecified = 0, @@ -1033,6 +1131,7 @@ public enum INGetCarLockStatusIntentResponseCode : long { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INGetCarPowerLevelStatusIntentResponseCode : long { Unspecified = 0, @@ -1046,6 +1145,7 @@ public enum INGetCarPowerLevelStatusIntentResponseCode : long { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INPayBillIntentResponseCode : long { Unspecified = 0, @@ -1061,6 +1161,7 @@ public enum INPayBillIntentResponseCode : long { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INSearchForBillsIntentResponseCode : long { Unspecified = 0, @@ -1076,6 +1177,7 @@ public enum INSearchForBillsIntentResponseCode : long { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Native] public enum INSetCarLockStatusIntentResponseCode : long { Unspecified = 0, @@ -1086,7 +1188,7 @@ public enum INSetCarLockStatusIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INAddTasksIntentResponseCode : long { Unspecified = 0, @@ -1097,7 +1199,7 @@ public enum INAddTasksIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INAppendToNoteIntentResponseCode : long { Unspecified = 0, @@ -1109,7 +1211,7 @@ public enum INAppendToNoteIntentResponseCode : long { FailureCannotUpdatePasswordProtectedNote, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INBalanceType : long { Unknown = 0, @@ -1118,7 +1220,13 @@ public enum INBalanceType : long { Miles, } - [Watch (3,2), Mac (10,12), iOS (10,0)] +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [Watch (3,2), NoTV, iOS (10,0)] [Native] public enum INCallCapability : long { Unknown = 0, @@ -1126,7 +1234,13 @@ public enum INCallCapability : long { VideoCall, } - [Watch (4,0), Mac (10,13), iOS (11,0)] +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [Watch (4,0), NoTV, iOS (11,0)] [Native] public enum INCallDestinationType : long { Unknown = 0, @@ -1138,7 +1252,13 @@ public enum INCallDestinationType : long { CallBack, } - [Watch (3,2), Mac (10,12), iOS (10,0)] +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [Watch (3,2), NoTV, iOS (10,0)] [Native] [Flags] public enum INCallRecordTypeOptions : ulong { @@ -1155,7 +1275,7 @@ public enum INCallRecordTypeOptions : ulong { OnHold = (1 << 7), } - [NoWatch, NoMac, iOS (11,0)] + [NoWatch, NoMac, NoTV, iOS (11,0)] [Native] public enum INCancelRideIntentResponseCode : long { Unspecified = 0, @@ -1164,7 +1284,7 @@ public enum INCancelRideIntentResponseCode : long { Failure, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INCreateNoteIntentResponseCode : long { Unspecified = 0, @@ -1175,7 +1295,7 @@ public enum INCreateNoteIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INCreateTaskListIntentResponseCode : long { Unspecified = 0, @@ -1186,7 +1306,7 @@ public enum INCreateTaskListIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INDateSearchType : long { Unknown = 0, @@ -1195,7 +1315,7 @@ public enum INDateSearchType : long { ByCreatedDate, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INGetVisualCodeIntentResponseCode : long { Unspecified = 0, @@ -1208,14 +1328,20 @@ public enum INGetVisualCodeIntentResponseCode : long { FailureAppConfigurationRequired, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INLocationSearchType : long { Unknown = 0, ByLocationTrigger, } - [Watch (4,0), Mac (10,13), iOS (11,0)] +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [Watch (4,0), NoTV, iOS (11,0)] [Native] public enum INMessageType : long { Unspecified = 0, @@ -1253,7 +1379,7 @@ public enum INMessageType : long { Link, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INNoteContentType : long { Unknown = 0, @@ -1261,7 +1387,7 @@ public enum INNoteContentType : long { Image, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INNotebookItemType : long { Unknown = 0, @@ -1270,7 +1396,7 @@ public enum INNotebookItemType : long { Task, } - [Watch (4,0), Mac (10,13), iOS (11,0)] + [Watch (4,0), Mac (10,13), iOS (11,0), NoTV] [Native] public enum INRecurrenceFrequency : long { Unknown = 0, @@ -1282,7 +1408,7 @@ public enum INRecurrenceFrequency : long { Yearly, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INRequestPaymentCurrencyAmountUnsupportedReason : long { AmountBelowMinimum = 1, @@ -1290,7 +1416,7 @@ public enum INRequestPaymentCurrencyAmountUnsupportedReason : long { CurrencyUnsupported, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INRequestPaymentPayerUnsupportedReason : long { CredentialsUnverified = 1, @@ -1299,14 +1425,14 @@ public enum INRequestPaymentPayerUnsupportedReason : long { NoValidHandle, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INRideFeedbackTypeOptions : ulong { Rate = (1 << 0), Tip = (1 << 1), } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INSearchForAccountsIntentResponseCode : long { Unspecified = 0, @@ -1321,7 +1447,7 @@ public enum INSearchForAccountsIntentResponseCode : long { FailureNotEligible, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INSearchForNotebookItemsIntentResponseCode : long { Unspecified = 0, @@ -1332,7 +1458,13 @@ public enum INSearchForNotebookItemsIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (4,0), Mac (10,13), iOS (11,0)] +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [Watch (4,0), NoTV, iOS (11,0)] [Native] public enum INSendMessageRecipientUnsupportedReason : long { NoAccount = 1, @@ -1343,7 +1475,7 @@ public enum INSendMessageRecipientUnsupportedReason : long { NoHandleForLabel, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INSendPaymentCurrencyAmountUnsupportedReason : long { AmountBelowMinimum = 1, @@ -1351,7 +1483,7 @@ public enum INSendPaymentCurrencyAmountUnsupportedReason : long { CurrencyUnsupported, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INSendPaymentPayeeUnsupportedReason : long { CredentialsUnverified = 1, @@ -1361,7 +1493,7 @@ public enum INSendPaymentPayeeUnsupportedReason : long { NoValidHandle, } - [NoWatch, NoMac, iOS (11,0)] + [NoWatch, NoTV, NoMac, iOS (11,0)] [Native] public enum INSendRideFeedbackIntentResponseCode : long { Unspecified = 0, @@ -1370,7 +1502,7 @@ public enum INSendRideFeedbackIntentResponseCode : long { Failure, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INSetTaskAttributeIntentResponseCode : long { Unspecified = 0, @@ -1381,7 +1513,7 @@ public enum INSetTaskAttributeIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INSortType : long { Unknown = 0, @@ -1389,7 +1521,7 @@ public enum INSortType : long { ByDate, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INSpatialEvent : long { Unknown = 0, @@ -1397,7 +1529,7 @@ public enum INSpatialEvent : long { Depart, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INTaskStatus : long { Unknown = 0, @@ -1405,7 +1537,7 @@ public enum INTaskStatus : long { Completed, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INTaskType : long { Unknown = 0, @@ -1413,7 +1545,7 @@ public enum INTaskType : long { Completable, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INTransferMoneyIntentResponseCode : long { Unspecified = 0, @@ -1426,7 +1558,7 @@ public enum INTransferMoneyIntentResponseCode : long { FailureInsufficientFunds, } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Native] public enum INVisualCodeType : long { Unknown = 0, @@ -1441,7 +1573,7 @@ public enum INVisualCodeType : long { Subway, } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), TV (14,0), NoMac, iOS (12,0)] [Native] public enum INMediaItemType : long { Unknown = 0, @@ -1473,7 +1605,7 @@ public enum INMediaItemType : long { News, } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), TV (14,0), NoMac, iOS (12,0)] [Native] public enum INPlayMediaIntentResponseCode : long { Unspecified = 0, @@ -1489,7 +1621,7 @@ public enum INPlayMediaIntentResponseCode : long { FailureRestrictedContent, } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), TV (14,0), NoMac, iOS (12,0)] [Native] public enum INPlaybackRepeatMode : long { Unknown = 0, @@ -1498,7 +1630,7 @@ public enum INPlaybackRepeatMode : long { One, } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, NoMac, iOS (12,0)] [Native] public enum INDailyRoutineSituation : long { Morning, @@ -1517,7 +1649,7 @@ public enum INDailyRoutineSituation : long { PhysicalActivityIncomplete, } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, NoMac, iOS (12,0)] [Native] public enum INUpcomingMediaPredictionMode : long { Default = 0, @@ -1531,7 +1663,7 @@ public enum INRelevantShortcutRole : long { Information, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INAddMediaIntentResponseCode : long { Unspecified = 0, @@ -1543,7 +1675,7 @@ public enum INAddMediaIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INAddMediaMediaItemUnsupportedReason : long { LoginRequired = 1, @@ -1552,6 +1684,10 @@ public enum INAddMediaMediaItemUnsupportedReason : long { ExplicitContentSettings, CellularDataSettings, RestrictedContent, + [Watch (7,0), iOS (14,0)] + ServiceUnavailable, + [Watch (7,0), iOS (14,0)] + RegionRestriction, } [Watch (6,0), NoTV, NoMac, iOS (13,0)] @@ -1599,7 +1735,7 @@ public enum INDeleteTasksTaskUnsupportedReason : long { InApp, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [Native] public enum INGetReservationDetailsIntentResponseCode : long { Unspecified = 0, @@ -1610,7 +1746,7 @@ public enum INGetReservationDetailsIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INMediaAffinityType : long { Unknown = 0, @@ -1618,7 +1754,7 @@ public enum INMediaAffinityType : long { Dislike, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INMediaDestinationType : long { Unknown = 0, @@ -1626,14 +1762,14 @@ public enum INMediaDestinationType : long { Playlist, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INMediaReference : long { Unknown = 0, CurrentlyPlaying, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INMediaSortOrder : long { Unknown = 0, @@ -1647,7 +1783,7 @@ public enum INMediaSortOrder : long { Recommended, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INMediaUserContextSubscriptionStatus : long { Unknown = 0, @@ -1655,7 +1791,7 @@ public enum INMediaUserContextSubscriptionStatus : long { Subscribed, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INPlayMediaMediaItemUnsupportedReason : long { LoginRequired = 1, @@ -1664,16 +1800,20 @@ public enum INPlayMediaMediaItemUnsupportedReason : long { ExplicitContentSettings, CellularDataSettings, RestrictedContent, + [Watch (7,0), iOS (14,0)] + ServiceUnavailable, + [Watch (7,0), iOS (14,0)] + RegionRestriction, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INPlayMediaPlaybackSpeedUnsupportedReason : long { BelowMinimum = 1, AboveMaximum, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INPlaybackQueueLocation : long { Unknown = 0, @@ -1682,14 +1822,14 @@ public enum INPlaybackQueueLocation : long { Later, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [Native] public enum INReservationActionType : long { Unknown = 0, CheckIn, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [Native] public enum INReservationStatus : long { Unknown = 0, @@ -1699,7 +1839,7 @@ public enum INReservationStatus : long { Confirmed, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INSearchForMediaIntentResponseCode : long { Unspecified = 0, @@ -1711,7 +1851,7 @@ public enum INSearchForMediaIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INSearchForMediaMediaItemUnsupportedReason : long { LoginRequired = 1, @@ -1720,6 +1860,10 @@ public enum INSearchForMediaMediaItemUnsupportedReason : long { ExplicitContentSettings, CellularDataSettings, RestrictedContent, + [Watch (7,0), iOS (14,0)] + ServiceUnavailable, + [Watch (7,0), iOS (14,0)] + RegionRestriction, } [Watch (6,0), NoTV, NoMac, iOS (13,0)] @@ -1800,14 +1944,14 @@ public enum INTemporalEventTriggerTypeOptions : ulong { ScheduledRecurring = (1uL << 2), } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [Native] public enum INTicketedEventCategory : long { Unknown = 0, Movie, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INUpdateMediaAffinityIntentResponseCode : long { Unspecified = 0, @@ -1818,7 +1962,7 @@ public enum INUpdateMediaAffinityIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INUpdateMediaAffinityMediaItemUnsupportedReason : long { LoginRequired = 1, @@ -1827,25 +1971,84 @@ public enum INUpdateMediaAffinityMediaItemUnsupportedReason : long { ExplicitContentSettings, CellularDataSettings, RestrictedContent, + [Watch (7,0), iOS (14,0)] + ServiceUnavailable, + [Watch (7,0), iOS (14,0)] + RegionRestriction, } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Native] public enum INAddMediaMediaDestinationUnsupportedReason : long { PlaylistNameNotFound = 1, } + [Flags] + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Native] + public enum INDayOfWeekOptions : ulong { + Monday = (1uL << 0), + Tuesday = (1uL << 1), + Wednesday = (1uL << 2), + Thursday = (1uL << 3), + Friday = (1uL << 4), + Saturday = (1uL << 5), + Sunday = (1uL << 6), + } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Native] + public enum INListCarsIntentResponseCode : long { + Unspecified = 0, + Ready, + InProgress, + Success, + Failure, + FailureRequiringAppLaunch, + } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Native] + public enum INOutgoingMessageType : long { + Unknown = 0, + Text, + Audio, + } + + [Flags] + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Native] + public enum INShortcutAvailabilityOptions : ulong { + Mindfulness = (1uL << 0), + Journaling = (1uL << 1), + Music = (1uL << 2), + Podcasts = (1uL << 3), + Reading = (1uL << 4), + WrapUpYourDay = (1uL << 5), + YogaAndStretching = (1uL << 6), + } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Native] + public enum INStartCallCallRecordToCallBackUnsupportedReason : long { + NoMatchingCall = 1, + } + [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] public enum INIntentIdentifier { [Field (null)] None = -1, + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'StartCall' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'StartCall' instead.")] [Unavailable (PlatformName.MacOSX)] [Field ("INStartAudioCallIntentIdentifier")] StartAudioCall, + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'StartCall' instead.")] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] [Field ("INStartVideoCallIntentIdentifier")] @@ -1949,12 +2152,17 @@ public enum INIntentIdentifier { [Unavailable (PlatformName.MacOSX)] [Field ("INGetRideStatusIntentIdentifier")] - GetRideStatus + GetRideStatus, + + [Watch (7,0), NoMac, iOS (14,0)] + [Field ("INStartCallIntentIdentifier")] + StartCall, } [iOS (10, 2)] [Mac (10, 12, 2, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] enum INPersonHandleLabel { [Field (null)] None, @@ -1985,11 +2193,21 @@ enum INPersonHandleLabel { [Field ("INPersonHandleLabelOther")] Other, + + [Watch (7,0), Mac (11,0), iOS (14,0)] + [Field ("INPersonHandleLabelSchool")] + School, } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 2)] - [Mac (10, 12, 2, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] enum INPersonRelationship { [Field (null)] None, @@ -2038,6 +2256,7 @@ enum INPersonRelationship { [iOS (10, 2)] [Watch (3, 2)] + [NoTV] [Unavailable (PlatformName.MacOSX)] enum INWorkoutNameIdentifier { [Field ("INWorkoutNameIdentifierRun")] @@ -2107,11 +2326,43 @@ enum INWorkoutNameIdentifier { Swim, } + [iOS (14,0), NoMac, NoTV, Watch (7,0)] + enum INCarChargingConnectorType { + [DefaultEnumValue] + [Field (null)] + None, + + [Field ("INCarChargingConnectorTypeJ1772")] + J1772, + + [Field ("INCarChargingConnectorTypeCCS1")] + Ccs1, + + [Field ("INCarChargingConnectorTypeCCS2")] + Ccs2, + + [Field ("INCarChargingConnectorTypeCHAdeMO")] + ChaDeMo, + + [Field ("INCarChargingConnectorTypeGBTAC")] + Gbtac, + + [Field ("INCarChargingConnectorTypeGBTDC")] + Gbtdc, + + [Field ("INCarChargingConnectorTypeTesla")] + Tesla, + + [Field ("INCarChargingConnectorTypeMennekes")] + Mennekes, + } + // End of enums [iOS (10, 0)] [Watch (3, 2)] - [Unavailable (PlatformName.MacOSX)] + [Mac (11,0)] + [NoTV] [Internal] [Category] [BaseType (typeof (CLPlacemark))] @@ -2122,6 +2373,7 @@ interface CLPlacemark_INIntentsAdditions { CLPlacemark _GetPlacemark (CLLocation location, [NullAllowed] string name, [NullAllowed] CNPostalAddress postalAddress); } + [NoTV] [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] @@ -2157,6 +2409,7 @@ interface INBookRestaurantReservationIntent : NSCopying { string GuestProvidedSpecialRequestText { get; set; } } + [NoTV] [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] @@ -2192,6 +2445,7 @@ interface INBookRestaurantReservationIntentHandling { void ResolveGuestProvidedSpecialRequest (INBookRestaurantReservationIntent intent, Action completion); } + [NoTV] [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] @@ -2210,7 +2464,8 @@ interface INBookRestaurantReservationIntentResponse { [iOS (10, 0)] [Watch (3, 2)] - [Unavailable (PlatformName.MacOSX)] + [Mac (11,0)] + [TV (14,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INBooleanResolutionResult { @@ -2254,9 +2509,15 @@ interface INBooleanResolutionResult { INBooleanResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INCallRecordTypeResolutionResult { @@ -2323,6 +2584,7 @@ interface INCallRecordTypeResolutionResult { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntent))] interface INCancelWorkoutIntent { @@ -2337,6 +2599,7 @@ interface INCancelWorkoutIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INCancelWorkoutIntentHandling { @@ -2361,6 +2624,7 @@ interface INCancelWorkoutIntentHandling { [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] [BaseType (typeof (INIntentResponse))] + [NoTV] [DisableDefaultCtor] interface INCancelWorkoutIntentResponse { @@ -2375,6 +2639,7 @@ interface INCancelWorkoutIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INCarAirCirculationModeResolutionResult bound [NoWatch] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INCarAirCirculationModeResolutionResult { @@ -2437,6 +2702,7 @@ interface INCarAirCirculationModeResolutionResult { [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INCarAudioSourceResolutionResult bound [BaseType (typeof (INIntentResolutionResult))] [NoWatch] + [NoTV] [DisableDefaultCtor] interface INCarAudioSourceResolutionResult { @@ -2499,6 +2765,7 @@ interface INCarAudioSourceResolutionResult { [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INCarDefrosterResolutionResult bound [BaseType (typeof (INIntentResolutionResult))] [NoWatch] + [NoTV] [DisableDefaultCtor] interface INCarDefrosterResolutionResult { @@ -2561,6 +2828,7 @@ interface INCarDefrosterResolutionResult { [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INCarSeatResolutionResult bound [BaseType (typeof (INIntentResolutionResult))] [NoWatch] + [NoTV] [DisableDefaultCtor] interface INCarSeatResolutionResult { @@ -2622,6 +2890,7 @@ interface INCarSeatResolutionResult { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INCurrencyAmount : NSCopying, NSSecureCoding { @@ -2637,9 +2906,10 @@ interface INCurrencyAmount : NSCopying, NSSecureCoding { string CurrencyCode { get; } } + [NoTV] [iOS (10, 0)] [Watch (3, 2)] - [Unavailable (PlatformName.MacOSX)] + [NoMac] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INCurrencyAmountResolutionResult { @@ -2690,6 +2960,7 @@ interface INCurrencyAmountResolutionResult { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INDateComponentsRange : NSCopying, NSSecureCoding { @@ -2697,11 +2968,11 @@ interface INDateComponentsRange : NSCopying, NSSecureCoding { [Export ("initWithStartDateComponents:endDateComponents:")] IntPtr Constructor ([NullAllowed] NSDateComponents startDateComponents, [NullAllowed] NSDateComponents endDateComponents); - [Watch (4,0), Mac (10,13), iOS (11,0)] + [Watch (4,0), Mac (10,13), iOS (11,0), NoTV] [Export ("initWithEKRecurrenceRule:")] IntPtr Constructor (EKRecurrenceRule recurrenceRule); - [Watch (4,0), Mac (10,13), iOS (11,0)] + [Watch (4,0), Mac (10,13), iOS (11,0), NoTV] [Export ("initWithStartDateComponents:endDateComponents:recurrenceRule:")] [DesignatedInitializer] IntPtr Constructor ([NullAllowed] NSDateComponents startDateComponents, [NullAllowed] NSDateComponents endDateComponents, [NullAllowed] INRecurrenceRule recurrenceRule); @@ -2712,19 +2983,25 @@ interface INDateComponentsRange : NSCopying, NSSecureCoding { [NullAllowed, Export ("endDateComponents", ArgumentSemantic.Copy)] NSDateComponents EndDateComponents { get; } - [Watch (4,0), Mac (10,13), iOS (11,0)] + [Watch (4,0), Mac (10,13), iOS (11,0), NoTV] [NullAllowed, Export ("recurrenceRule", ArgumentSemantic.Copy)] INRecurrenceRule RecurrenceRule { get; } - [Watch (4,0), Mac (10,13), iOS (11,0)] + [Watch (4,0), Mac (10,13), iOS (11,0), NoTV] [Export ("EKRecurrenceRule")] [NullAllowed] EKRecurrenceRule EKRecurrenceRule { get; } } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INDateComponentsRangeResolutionResult { @@ -2781,6 +3058,7 @@ interface INDateComponentsRangeResolutionResult { [Deprecated (PlatformName.WatchOS, 13, 0, message: "Implement 'INStartAudioCallIntentHandling and INSearchCallHistoryIntentHandling' instead.")] [iOS (10, 0)] [Watch (3, 2)] + [NoTV] [Protocol] interface INCallsDomainHandling : INStartAudioCallIntentHandling, INSearchCallHistoryIntentHandling #if !WATCH @@ -2795,6 +3073,7 @@ interface INCallsDomainHandling : INStartAudioCallIntentHandling, INSearchCallHi [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INCarCommandsDomainHandling : INActivateCarSignalIntentHandling, INSetCarLockStatusIntentHandling, INGetCarLockStatusIntentHandling, INGetCarPowerLevelStatusIntentHandling { } @@ -2803,6 +3082,7 @@ interface INCarCommandsDomainHandling : INActivateCarSignalIntentHandling, INSet [iOS (10, 0)] [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INCarPlayDomainHandling : INSetAudioSourceInCarIntentHandling, INSetClimateSettingsInCarIntentHandling, INSetDefrosterSettingsInCarIntentHandling, INSetSeatSettingsInCarIntentHandling, INSetProfileInCarIntentHandling, INSaveProfileInCarIntentHandling { } @@ -2812,6 +3092,7 @@ interface INCarPlayDomainHandling : INSetAudioSourceInCarIntentHandling, INSetCl [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INWorkoutsDomainHandling : INStartWorkoutIntentHandling, INPauseWorkoutIntentHandling, INEndWorkoutIntentHandling, INCancelWorkoutIntentHandling, INResumeWorkoutIntentHandling { } @@ -2820,6 +3101,7 @@ interface INWorkoutsDomainHandling : INStartWorkoutIntentHandling, INPauseWorkou [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INRadioDomainHandling : INSetRadioStationIntentHandling { } @@ -2829,6 +3111,7 @@ interface INRadioDomainHandling : INSetRadioStationIntentHandling { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INMessagesDomainHandling : INSendMessageIntentHandling, INSearchForMessagesIntentHandling #if !WATCH @@ -2843,6 +3126,7 @@ interface INMessagesDomainHandling : INSendMessageIntentHandling, INSearchForMes [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INPaymentsDomainHandling : INSendPaymentIntentHandling, INRequestPaymentIntentHandling, INPayBillIntentHandling, INSearchForBillsIntentHandling #if XAMCORE_4_0 // Added in iOS 11 -> #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000 @@ -2856,6 +3140,7 @@ interface INPaymentsDomainHandling : INSendPaymentIntentHandling, INRequestPayme [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INPhotosDomainHandling : INSearchForPhotosIntentHandling, INStartPhotoPlaybackIntentHandling { } @@ -2865,6 +3150,7 @@ interface INPhotosDomainHandling : INSearchForPhotosIntentHandling, INStartPhoto [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INRidesharingDomainHandling : INListRideOptionsIntentHandling, INRequestRideIntentHandling, INGetRideStatusIntentHandling #if XAMCORE_4_0 // Added in iOS 11 -> #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000 @@ -2875,20 +3161,21 @@ interface INRidesharingDomainHandling : INListRideOptionsIntentHandling, INReque [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INCreateNoteIntentHandling, INAppendToNoteIntentHandling, INAddTasksIntentHandling, INCreateTaskListIntentHandling, INSetTaskAttributeIntentHandling and INSearchForNotebookItemsIntentHandling' instead.")] [Deprecated (PlatformName.WatchOS, 6, 0, message: "Implement 'INCreateNoteIntentHandling, INAppendToNoteIntentHandling, INAddTasksIntentHandling, INCreateTaskListIntentHandling, INSetTaskAttributeIntentHandling and INSearchForNotebookItemsIntentHandling' instead.")] - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoMac, iOS (11,0), NoTV] [Protocol] interface INNotebookDomainHandling : INCreateNoteIntentHandling, INAppendToNoteIntentHandling, INAddTasksIntentHandling, INCreateTaskListIntentHandling, INSetTaskAttributeIntentHandling, INSearchForNotebookItemsIntentHandling { } [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INGetVisualCodeIntentHandling' instead.")] [Deprecated (PlatformName.WatchOS, 6, 0, message: "Implement 'INGetVisualCodeIntentHandling' instead.")] - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoMac, iOS (11,0), NoTV] [Protocol] interface INVisualCodeDomainHandling : INGetVisualCodeIntentHandling { } [iOS (10, 0)] [Watch (3, 2)] + [Mac (11,0), TV (14,0)] [Unavailable (PlatformName.MacOSX)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -2935,7 +3222,8 @@ interface INDoubleResolutionResult { [iOS (10, 0)] [Watch (3, 2)] - [Unavailable (PlatformName.MacOSX)] + [Mac (11,0)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResolutionResult))] interface INDateComponentsResolutionResult { @@ -2986,6 +3274,7 @@ interface INDateComponentsResolutionResult { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntent))] interface INEndWorkoutIntent { @@ -3000,6 +3289,7 @@ interface INEndWorkoutIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INEndWorkoutIntentHandling { @@ -3023,6 +3313,7 @@ interface INEndWorkoutIntentHandling { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INEndWorkoutIntentResponse { @@ -3037,7 +3328,7 @@ interface INEndWorkoutIntentResponse { [iOS (10, 0)] [Watch (3, 2)] - [Unavailable (PlatformName.MacOSX)] + [TV (14,0), Mac (11,0)] [Protocol] interface INIntentHandlerProviding { @@ -3049,7 +3340,7 @@ interface INIntentHandlerProviding { [iOS (10, 0)] [Watch (3, 2)] - [Unavailable (PlatformName.MacOSX)] + [Mac (11,0), TV (14,0)] [BaseType (typeof (NSObject))] interface INExtension : INIntentHandlerProviding { } @@ -3057,6 +3348,7 @@ interface INExtension : INIntentHandlerProviding { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INGetAvailableRestaurantReservationBookingDefaultsIntent { @@ -3071,6 +3363,7 @@ interface INGetAvailableRestaurantReservationBookingDefaultsIntent { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INGetAvailableRestaurantReservationBookingDefaultsIntentHandling { @@ -3094,6 +3387,7 @@ interface INGetAvailableRestaurantReservationBookingDefaultsIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] interface INGetAvailableRestaurantReservationBookingDefaultsIntentResponse { @@ -3123,6 +3417,7 @@ interface INGetAvailableRestaurantReservationBookingDefaultsIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INGetAvailableRestaurantReservationBookingsIntent : NSCopying { @@ -3152,6 +3447,7 @@ interface INGetAvailableRestaurantReservationBookingsIntent : NSCopying { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INGetAvailableRestaurantReservationBookingsIntentHandling { @@ -3181,6 +3477,7 @@ interface INGetAvailableRestaurantReservationBookingsIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] interface INGetAvailableRestaurantReservationBookingsIntentResponse { @@ -3207,6 +3504,7 @@ interface INGetAvailableRestaurantReservationBookingsIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INGetRestaurantGuestIntent { } @@ -3214,6 +3512,7 @@ interface INGetRestaurantGuestIntent { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INGetRestaurantGuestIntentHandling { @@ -3234,6 +3533,7 @@ interface INGetRestaurantGuestIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] interface INGetRestaurantGuestIntentResponse { @@ -3254,6 +3554,7 @@ interface INGetRestaurantGuestIntentResponse { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntent))] [DisableDefaultCtor] // DesignatedInitializer below interface INGetRideStatusIntent { @@ -3266,6 +3567,7 @@ interface INGetRideStatusIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INGetRideStatusIntentHandling { @@ -3296,6 +3598,7 @@ interface IINGetRideStatusIntentResponseObserver { } [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INGetRideStatusIntentResponseObserver { @@ -3307,6 +3610,7 @@ interface INGetRideStatusIntentResponseObserver { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INGetRideStatusIntentResponse { @@ -3325,6 +3629,7 @@ interface INGetRideStatusIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INGetUserCurrentRestaurantReservationBookingsIntent : NSCopying { @@ -3352,6 +3657,7 @@ interface INGetUserCurrentRestaurantReservationBookingsIntent : NSCopying { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INGetUserCurrentRestaurantReservationBookingsIntentHandling { @@ -3375,6 +3681,7 @@ interface INGetUserCurrentRestaurantReservationBookingsIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] interface INGetUserCurrentRestaurantReservationBookingsIntentResponse { @@ -3392,6 +3699,7 @@ interface INGetUserCurrentRestaurantReservationBookingsIntentResponse { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INImage : NSCopying, NSSecureCoding { @@ -3400,6 +3708,11 @@ interface INImage : NSCopying, NSSecureCoding { [Export ("imageNamed:")] INImage FromName (string name); + [Watch (7,0), TV (14,0), NoMac, iOS (14,0)] + [Static] + [Export ("systemImageNamed:")] + INImage FromSystem (string systemImageName); + [Static] [Export ("imageWithImageData:")] INImage FromData (NSData imageData); @@ -3418,22 +3731,22 @@ interface INImage : NSCopying, NSSecureCoding { // INImage_IntentsUI (IntentsUI) - [NoMac, NoWatch] + [NoMac, NoWatch, NoTV] [Static] [Export ("imageWithCGImage:")] INImage FromImage (CGImage image); - [NoMac, NoWatch] + [NoMac, NoWatch, NoTV] [Static] [Export ("imageWithUIImage:")] INImage FromImage (UIImage image); - [NoMac, NoWatch] + [NoMac, NoWatch, NoTV] [Static] [Export ("imageSizeForIntentResponse:")] CGSize GetImageSize (INIntentResponse response); - [NoMac, NoWatch, iOS (11,0)] + [NoMac, NoWatch, iOS (11,0), NoTV] [Async] [Export ("fetchUIImageWithCompletion:")] void FetchImage (Action completion); @@ -3441,7 +3754,7 @@ interface INImage : NSCopying, NSSecureCoding { [iOS (10, 0)] [Watch (3, 2)] - [Unavailable (PlatformName.MacOSX)] + [TV (14,0), Mac (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INIntegerResolutionResult { @@ -3473,13 +3786,13 @@ interface INIntegerResolutionResult { INIntegerResolutionResult Unsupported { get; } [New] - [Watch (6,0), iOS (13,0), NoMac] + [Watch (6,0), iOS (13,0)] [Static] [Export ("unsupportedWithReason:")] INIntegerResolutionResult GetUnsupported (nint reason); [New] - [Watch (6,0), iOS (13,0), NoMac] + [Watch (6,0), iOS (13,0)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] INIntegerResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); @@ -3488,6 +3801,7 @@ interface INIntegerResolutionResult { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [Abstract] [BaseType (typeof (NSObject))] interface INIntent : NSCopying, NSSecureCoding { @@ -3496,6 +3810,7 @@ interface INIntent : NSCopying, NSSecureCoding { NSString IdentifierString { get; } [Unavailable (PlatformName.MacOSX)] + [NoTV] [Wrap ("INIntentIdentifierExtensions.GetValue (IdentifierString)")] [NullAllowed] INIntentIdentifier? Identifier { get; } @@ -3504,10 +3819,14 @@ interface INIntent : NSCopying, NSSecureCoding { [NullAllowed, Export ("intentDescription")] string IntentDescription { get; } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), Mac (11,0), iOS (12,0)] [NullAllowed, Export ("suggestedInvocationPhrase")] string SuggestedInvocationPhrase { get; set; } + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Export ("shortcutAvailability", ArgumentSemantic.Assign)] + INShortcutAvailabilityOptions ShortcutAvailability { get; set; } + [Watch (5,0), Mac (10,14), iOS (12,0)] [Export ("setImage:forParameterNamed:")] void SetImage ([NullAllowed] INImage image, string parameterName); @@ -3528,6 +3847,7 @@ interface INIntentResolutionResult : INIntentResolutionResult { } [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [Abstract] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -3548,12 +3868,12 @@ interface INIntentResolutionResult { //[Export ("unsupported")] //INIntentResolutionResult Unsupported { get; } - // [Watch (6,0), iOS (13,0), NoMac] + // [Watch (6,0), iOS (13,0), TV (14,0), Mac (11,0)] // [Static] // [Export ("unsupportedWithReason:")] // INIntentResolutionResult GetUnsupported (nint reason); - // [Watch (6,0), iOS (13,0), NoMac] + // [Watch (6,0), iOS (13,0), TV (14,0), Mac (11,0)] // [Static] // [Export ("confirmationRequiredWithItemToConfirm:forReason:")] // INIntentResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); @@ -3562,6 +3882,7 @@ interface INIntentResolutionResult { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [Abstract] [BaseType (typeof (NSObject))] interface INIntentResponse : NSCopying, NSSecureCoding { @@ -3578,6 +3899,7 @@ NSUserActivity UserActivity { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INInteraction : NSSecureCoding, NSCopying { @@ -3629,7 +3951,7 @@ interface INInteraction : NSSecureCoding, NSCopying { // From INParameter.h INInteraction () [Internal] - [iOS (11,0), Watch (4,0), NoMac] + [iOS (11,0), Watch (4,0), NoMac, NoTV] [Export ("parameterValueForParameter:")] IntPtr _GetParameterValue (INParameter parameter); } @@ -3637,6 +3959,7 @@ interface INInteraction : NSSecureCoding, NSCopying { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntent))] interface INListRideOptionsIntent { @@ -3654,6 +3977,7 @@ interface INListRideOptionsIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INListRideOptionsIntentHandling { @@ -3680,6 +4004,7 @@ interface INListRideOptionsIntentHandling { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INListRideOptionsIntentResponse { @@ -3701,9 +4026,15 @@ interface INListRideOptionsIntentResponse { NSDate ExpirationDate { get; set; } } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INMessage : NSCopying, NSSecureCoding { @@ -3757,9 +4088,15 @@ interface INMessage : NSCopying, NSSecureCoding { string ServiceName { get; } } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INMessageAttributeOptionsResolutionResult { @@ -3830,6 +4167,7 @@ interface INMessageAttributeOptionsResolutionResult { #endif [iOS (10, 0)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INMessageAttributeResolutionResult { @@ -3896,6 +4234,7 @@ interface INMessageAttributeResolutionResult { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntent))] interface INPauseWorkoutIntent { @@ -3910,6 +4249,7 @@ interface INPauseWorkoutIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INPauseWorkoutIntentHandling { @@ -3933,6 +4273,7 @@ interface INPauseWorkoutIntentHandling { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INPauseWorkoutIntentResponse { @@ -3947,7 +4288,7 @@ interface INPauseWorkoutIntentResponse { [iOS (10, 0)] [Watch (3, 2)] - [Unavailable (PlatformName.MacOSX)] + [NoTV, Mac (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INPaymentMethod : NSCopying, NSSecureCoding { @@ -3976,6 +4317,7 @@ interface INPaymentMethod : NSCopying, NSSecureCoding { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INPaymentRecord : NSCopying, NSSecureCoding { @@ -4012,6 +4354,7 @@ interface INPaymentRecord : NSCopying, NSSecureCoding { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INPerson : NSCopying, NSSecureCoding, INSpeakable { @@ -4019,6 +4362,10 @@ interface INPerson : NSCopying, NSSecureCoding, INSpeakable { [Export ("initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:")] IntPtr Constructor (INPersonHandle personHandle, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string contactIdentifier, [NullAllowed] string customIdentifier); + [Watch (7,0), iOS (14,0), Mac (11,0)] + [Export ("initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:relationship:")] + IntPtr Constructor (INPersonHandle personHandle, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string contactIdentifier, [NullAllowed] string customIdentifier, [NullAllowed] string relationship); + [Watch (5,0), Mac (10,14), iOS (12,0)] [Export ("initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isMe:")] [DesignatedInitializer] @@ -4078,6 +4425,7 @@ interface INPerson : NSCopying, NSSecureCoding, INSpeakable { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INPersonHandle : NSCopying, NSSecureCoding { @@ -4116,6 +4464,7 @@ interface INPersonHandle : NSCopying, NSSecureCoding { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INPersonResolutionResult { @@ -4166,6 +4515,7 @@ interface INPersonResolutionResult { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INPlacemarkResolutionResult { @@ -4216,9 +4566,10 @@ interface INPlacemarkResolutionResult { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] -#if XAMCORE_4_0 +#if XAMCORE_4_0 || TVOS [DisableDefaultCtor] -#endif +#endif + [TV (14,0)] [BaseType (typeof (NSObject))] interface INPreferences { @@ -4241,6 +4592,7 @@ interface INPreferences { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INPriceRange : NSCopying, NSSecureCoding { @@ -4273,6 +4625,7 @@ interface INPriceRange : NSCopying, NSSecureCoding { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INRadioTypeResolutionResult bound [NoWatch] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INRadioTypeResolutionResult { @@ -4335,6 +4688,7 @@ interface INRadioTypeResolutionResult { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [NoWatch] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INRelativeReferenceResolutionResult { @@ -4397,6 +4751,7 @@ interface INRelativeReferenceResolutionResult { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [NoWatch] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INRelativeSettingResolutionResult { @@ -4459,6 +4814,7 @@ interface INRelativeSettingResolutionResult { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntent))] interface INRequestPaymentIntent { @@ -4479,6 +4835,7 @@ interface INRequestPaymentIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INRequestPaymentIntentHandling { @@ -4520,6 +4877,7 @@ interface INRequestPaymentIntentHandling { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INRequestPaymentIntentResponse { @@ -4538,6 +4896,7 @@ interface INRequestPaymentIntentResponse { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntent))] interface INRequestRideIntent { @@ -4574,6 +4933,7 @@ interface INRequestRideIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INRequestRideIntentHandling { @@ -4610,6 +4970,7 @@ interface INRequestRideIntentHandling { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INRequestRideIntentResponse { @@ -4628,6 +4989,7 @@ interface INRequestRideIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (NSObject))] interface INRestaurant : NSSecureCoding, NSCopying { @@ -4651,6 +5013,7 @@ interface INRestaurant : NSSecureCoding, NSCopying { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INPerson))] [DisableDefaultCtor] // The base type, INPerson, has no default ctor. interface INRestaurantGuest { @@ -4669,6 +5032,7 @@ interface INRestaurantGuest { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (NSObject))] interface INRestaurantGuestDisplayPreferences : NSSecureCoding, NSCopying { @@ -4700,6 +5064,7 @@ interface INRestaurantGuestDisplayPreferences : NSSecureCoding, NSCopying { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResolutionResult))] interface INRestaurantGuestResolutionResult { @@ -4750,6 +5115,7 @@ interface INRestaurantGuestResolutionResult { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (NSObject))] interface INRestaurantOffer : NSSecureCoding, NSCopying { @@ -4766,6 +5132,7 @@ interface INRestaurantOffer : NSSecureCoding, NSCopying { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (NSObject))] interface INRestaurantReservationBooking : NSSecureCoding, NSCopying { @@ -4810,6 +5177,7 @@ interface INRestaurantReservationBooking : NSSecureCoding, NSCopying { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INRestaurantReservationBooking))] interface INRestaurantReservationUserBooking : NSCopying { @@ -4842,6 +5210,7 @@ interface INRestaurantReservationUserBooking : NSCopying { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResolutionResult))] interface INRestaurantResolutionResult { @@ -4892,6 +5261,7 @@ interface INRestaurantResolutionResult { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntent))] interface INResumeWorkoutIntent { @@ -4906,6 +5276,7 @@ interface INResumeWorkoutIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INResumeWorkoutIntentHandling { @@ -4929,6 +5300,7 @@ interface INResumeWorkoutIntentHandling { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INResumeWorkoutIntentResponse { @@ -4944,6 +5316,7 @@ interface INResumeWorkoutIntentResponse { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INRideCompletionStatus : NSCopying, NSSecureCoding { @@ -5007,6 +5380,7 @@ interface INRideCompletionStatus : NSCopying, NSSecureCoding { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INRideDriver bound + [NoTV] [BaseType (typeof (INPerson))] [DisableDefaultCtor] // xcode 8.2 beta 1 -> NSInvalidArgumentException Reason: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1] interface INRideDriver : NSCopying, NSSecureCoding { @@ -5031,6 +5405,7 @@ interface INRideDriver : NSCopying, NSSecureCoding { [iOS (10, 0)] [Watch (3, 0)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INRideFareLineItem : NSCopying, NSSecureCoding { @@ -5052,6 +5427,7 @@ interface INRideFareLineItem : NSCopying, NSSecureCoding { [iOS (10, 0)] [Watch (3, 0)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INRideOption : NSCopying, NSSecureCoding { @@ -5098,6 +5474,7 @@ interface INRideOption : NSCopying, NSSecureCoding { [iOS (10, 0)] [Watch (3, 0)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INRidePartySizeOption : NSCopying, NSSecureCoding { @@ -5119,6 +5496,7 @@ interface INRidePartySizeOption : NSCopying, NSSecureCoding { [iOS (10, 0)] [Watch (3, 0)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // xcode 8.2 beta 1 -> NSInvalidArgumentException Reason: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1] interface INRideStatus : NSCopying, NSSecureCoding { @@ -5174,6 +5552,7 @@ interface INRideStatus : NSCopying, NSSecureCoding { [iOS (10, 0)] [Watch (3, 0)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (NSObject))] interface INRideVehicle : NSCopying, NSSecureCoding { @@ -5196,6 +5575,7 @@ interface INRideVehicle : NSCopying, NSSecureCoding { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INSaveProfileInCarIntent { @@ -5222,6 +5602,7 @@ interface INSaveProfileInCarIntent { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INSaveProfileInCarIntentHandling { @@ -5249,6 +5630,7 @@ interface INSaveProfileInCarIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSaveProfileInCarIntentResponse { @@ -5261,9 +5643,15 @@ interface INSaveProfileInCarIntentResponse { INSaveProfileInCarIntentResponseCode Code { get; } } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntent))] interface INSearchCallHistoryIntent { @@ -5307,9 +5695,15 @@ interface INSearchCallHistoryIntent { NSNumber WeakUnseen { get; } } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [Protocol] interface INSearchCallHistoryIntentHandling { @@ -5347,9 +5741,15 @@ interface INSearchCallHistoryIntentHandling { void ResolveUnseen (INSearchCallHistoryIntent intent, Action completion); } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSearchCallHistoryIntentResponse { @@ -5366,9 +5766,15 @@ interface INSearchCallHistoryIntentResponse { INCallRecord [] CallRecords { get; set; } } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntent))] interface INSearchForMessagesIntent { @@ -5455,9 +5861,15 @@ interface INSearchForMessagesIntent { INConditionalOperator ConversationIdentifiersOperator { get; } } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [Protocol] interface INSearchForMessagesIntentHandling { @@ -5497,9 +5909,15 @@ interface INSearchForMessagesIntentHandling { void ResolveSpeakableGroupNames (INSearchForMessagesIntent intent, Action completion); } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSearchForMessagesIntentResponse { @@ -5518,6 +5936,7 @@ interface INSearchForMessagesIntentResponse { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntent))] interface INSearchForPhotosIntent { @@ -5556,6 +5975,7 @@ interface INSearchForPhotosIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INSearchForPhotosIntentHandling { @@ -5592,6 +6012,7 @@ interface INSearchForPhotosIntentHandling { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSearchForPhotosIntentResponse { @@ -5607,15 +6028,27 @@ interface INSearchForPhotosIntentResponse { NSNumber SearchResultsCount { get; set; } } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntent))] interface INSendMessageIntent { + [Watch (7,0), NoMac, iOS (14,0)] + [Export ("initWithRecipients:outgoingMessageType:content:speakableGroupName:conversationIdentifier:serviceName:sender:attachments:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] INPerson[] recipients, INOutgoingMessageType outgoingMessageType, [NullAllowed] string content, [NullAllowed] INSpeakableString speakableGroupName, [NullAllowed] string conversationIdentifier, [NullAllowed] string serviceName, [NullAllowed] INPerson sender, [NullAllowed] INSendMessageAttachment[] attachments); + + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use '.ctor (INPerson[], INOutgoingMessageType, string, INSpeakableString, string, string, INPerson, INSendMessageAttachment[])' instead.")] + [Deprecated (PlatformName.iOS, 14, 0, message: "Use '.ctor (INPerson[], INOutgoingMessageType, string, INSpeakableString, string, string, INPerson, INSendMessageAttachment[])' instead.")] [Watch (4,0), Mac (10,13), iOS (11,0)] [Export ("initWithRecipients:content:speakableGroupName:conversationIdentifier:serviceName:sender:")] - [DesignatedInitializer] IntPtr Constructor ([NullAllowed] INPerson [] recipients, [NullAllowed] string content, [NullAllowed] INSpeakableString speakableGroupName, [NullAllowed] string conversationIdentifier, [NullAllowed] string serviceName, [NullAllowed] INPerson sender); [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use '.ctor (INPerson [], string, INSpeakableString, string, string, INPerson)' instead.")] @@ -5627,6 +6060,10 @@ interface INSendMessageIntent { [NullAllowed, Export ("recipients", ArgumentSemantic.Copy)] INPerson [] Recipients { get; } + [Watch (7,0), NoMac, iOS (14,0)] + [Export ("outgoingMessageType", ArgumentSemantic.Assign)] + INOutgoingMessageType OutgoingMessageType { get; } + [NullAllowed, Export ("content")] string Content { get; } @@ -5649,11 +6086,22 @@ interface INSendMessageIntent { [NullAllowed, Export ("sender", ArgumentSemantic.Copy)] INPerson Sender { get; } + + [Watch (7,0), NoMac, iOS (14,0)] + [NullAllowed] + [Export ("attachments", ArgumentSemantic.Copy)] + INSendMessageAttachment[] Attachments { get; } } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [Protocol] interface INSendMessageIntentHandling { @@ -5689,14 +6137,24 @@ interface INSendMessageIntentHandling { [Export ("resolveGroupNameForSendMessage:withCompletion:")] void ResolveGroupName (INSendMessageIntent intent, Action completion); + [Watch (7,0), NoMac, iOS (14,0)] + [Export ("resolveOutgoingMessageTypeForSendMessage:withCompletion:")] + void ResolveOutgoingMessageType (INSendMessageIntent intent, Action completion); + [Watch (4,0), iOS (11,0), Mac (10,13)] [Export ("resolveSpeakableGroupNameForSendMessage:withCompletion:")] void ResolveSpeakableGroupName (INSendMessageIntent intent, Action completion); } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSendMessageIntentResponse { @@ -5715,6 +6173,7 @@ interface INSendMessageIntentResponse { [iOS (10, 0)] [Watch (3, 2)] + [NoTV] [Unavailable (PlatformName.MacOSX)] [BaseType (typeof (INIntent))] interface INSendPaymentIntent { @@ -5736,6 +6195,7 @@ interface INSendPaymentIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INSendPaymentIntentHandling { @@ -5777,6 +6237,7 @@ interface INSendPaymentIntentHandling { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSendPaymentIntentResponse { @@ -5795,6 +6256,7 @@ interface INSendPaymentIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INSetAudioSourceInCarIntent { @@ -5812,6 +6274,7 @@ interface INSetAudioSourceInCarIntent { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INSetAudioSourceInCarIntentHandling { @@ -5838,6 +6301,7 @@ interface INSetAudioSourceInCarIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSetAudioSourceInCarIntentResponse { @@ -5853,6 +6317,7 @@ interface INSetAudioSourceInCarIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INSetClimateSettingsInCarIntent { @@ -5917,6 +6382,7 @@ interface INSetClimateSettingsInCarIntent { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INSetClimateSettingsInCarIntentHandling { @@ -5974,6 +6440,7 @@ interface INSetClimateSettingsInCarIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSetClimateSettingsInCarIntentResponse { @@ -5989,6 +6456,7 @@ interface INSetClimateSettingsInCarIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INSetDefrosterSettingsInCarIntent { @@ -6017,6 +6485,7 @@ interface INSetDefrosterSettingsInCarIntent { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INSetDefrosterSettingsInCarIntentHandling { @@ -6047,6 +6516,7 @@ interface INSetDefrosterSettingsInCarIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSetDefrosterSettingsInCarIntentResponse { @@ -6062,6 +6532,7 @@ interface INSetDefrosterSettingsInCarIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INSetMessageAttributeIntent { @@ -6079,6 +6550,7 @@ interface INSetMessageAttributeIntent { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INSetMessageAttributeIntentHandling { @@ -6102,6 +6574,7 @@ interface INSetMessageAttributeIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSetMessageAttributeIntentResponse { @@ -6117,6 +6590,7 @@ interface INSetMessageAttributeIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INSetProfileInCarIntent { @@ -6160,6 +6634,7 @@ interface INSetProfileInCarIntent { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INSetProfileInCarIntentHandling { @@ -6195,6 +6670,7 @@ interface INSetProfileInCarIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSetProfileInCarIntentResponse { @@ -6210,6 +6686,7 @@ interface INSetProfileInCarIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INSetRadioStationIntent { @@ -6236,6 +6713,7 @@ interface INSetRadioStationIntent { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INSetRadioStationIntentHandling { @@ -6271,6 +6749,7 @@ interface INSetRadioStationIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSetRadioStationIntentResponse { @@ -6286,6 +6765,7 @@ interface INSetRadioStationIntentResponse { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INSetSeatSettingsInCarIntent { @@ -6331,6 +6811,7 @@ interface INSetSeatSettingsInCarIntent { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INSetSeatSettingsInCarIntentHandling { @@ -6373,6 +6854,7 @@ interface INSetSeatSettingsInCarIntentHandling { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSetSeatSettingsInCarIntentResponse { @@ -6390,6 +6872,7 @@ interface IINSpeakable { } [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [Protocol] interface INSpeakable { @@ -6428,6 +6911,7 @@ interface INSpeakable { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INSpeakableString : INSpeakable, NSCopying, NSSecureCoding { @@ -6437,6 +6921,7 @@ interface INSpeakableString : INSpeakable, NSCopying, NSSecureCoding { [Export ("initWithVocabularyIdentifier:spokenPhrase:pronunciationHint:")] IntPtr InitWithVocabularyIdentifier (string vocabularyIdentifier, string spokenPhrase, [NullAllowed] string pronunciationHint); + [NoTV] [Internal] [Export ("initWithIdentifier:spokenPhrase:pronunciationHint:")] IntPtr InitWithIdentifier (string identifier, string spokenPhrase, [NullAllowed] string pronunciationHint); @@ -6447,9 +6932,15 @@ interface INSpeakableString : INSpeakable, NSCopying, NSSecureCoding { IntPtr Constructor (string spokenPhrase); } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INSpeakableStringResolutionResult { @@ -6497,12 +6988,17 @@ interface INSpeakableStringResolutionResult { INSpeakableStringResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntent' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'INStartCallIntent' instead.")] [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntent' instead.")] [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntent))] interface INStartAudioCallIntent { @@ -6525,12 +7021,17 @@ interface INStartAudioCallIntent { INPerson [] Contacts { get; } } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntentHandling' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'INStartCallIntentHandling' instead.")] [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntentHandling' instead.")] [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [Protocol] interface INStartAudioCallIntentHandling { @@ -6555,12 +7056,17 @@ interface INStartAudioCallIntentHandling { void ResolveContacts (INStartAudioCallIntent intent, Action completion); } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntentResponse' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'INStartCallIntentResponse' instead.")] [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntentResponse' instead.")] [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INStartAudioCallIntentResponse { @@ -6576,6 +7082,7 @@ interface INStartAudioCallIntentResponse { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntent))] interface INStartPhotoPlaybackIntent { @@ -6614,6 +7121,7 @@ interface INStartPhotoPlaybackIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INStartPhotoPlaybackIntentHandling { @@ -6646,6 +7154,7 @@ interface INStartPhotoPlaybackIntentHandling { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INStartPhotoPlaybackIntentResponse { @@ -6661,12 +7170,17 @@ interface INStartPhotoPlaybackIntentResponse { NSNumber SearchResultsCount { get; set; } } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntent' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'INStartCallIntent' instead.")] [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntent' instead.")] [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntent))] interface INStartVideoCallIntent { @@ -6684,6 +7198,7 @@ interface INStartVideoCallIntent { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [Protocol] interface INStartVideoCallIntentHandling { @@ -6704,12 +7219,17 @@ interface INStartVideoCallIntentHandling { void ResolveContacts (INStartVideoCallIntent intent, Action completion); } +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntentResponse' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'INStartCallIntentResponse' instead.")] [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntentResponse' instead.")] [iOS (10, 0)] - [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INStartVideoCallIntentResponse { @@ -6725,6 +7245,7 @@ interface INStartVideoCallIntentResponse { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntent))] interface INStartWorkoutIntent { @@ -6753,6 +7274,7 @@ interface INStartWorkoutIntent { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INStartWorkoutIntentHandling { @@ -6788,6 +7310,7 @@ interface INStartWorkoutIntentHandling { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INStartWorkoutIntentResponse { @@ -6803,6 +7326,7 @@ interface INStartWorkoutIntentResponse { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResolutionResult))] interface INStringResolutionResult { @@ -6852,7 +7376,7 @@ interface INStringResolutionResult { [iOS (10, 0)] [Watch (3, 2)] - [Unavailable (PlatformName.MacOSX)] + [NoTV, Mac (11,0)] [DisableDefaultCtor] [BaseType (typeof (INIntentResolutionResult))] interface INTemperatureResolutionResult { @@ -6903,6 +7427,7 @@ interface INTemperatureResolutionResult { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] + [NoTV] [BaseType (typeof (NSObject))] interface INTermsAndConditions : NSSecureCoding, NSCopying { @@ -6923,6 +7448,7 @@ interface INTermsAndConditions : NSSecureCoding, NSCopying { [iOS (10, 0)] [Unavailable (PlatformName.MacOSX)] [Watch (6, 0)] + [TV (14,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INVocabulary { @@ -6945,6 +7471,7 @@ interface INVocabulary { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INWorkoutGoalUnitTypeResolutionResult bound + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResolutionResult))] interface INWorkoutGoalUnitTypeResolutionResult { @@ -7009,6 +7536,7 @@ interface INWorkoutGoalUnitTypeResolutionResult { [iOS (10, 0)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INWorkoutLocationTypeResolutionResult bound + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResolutionResult))] interface INWorkoutLocationTypeResolutionResult { @@ -7073,6 +7601,7 @@ interface INWorkoutLocationTypeResolutionResult { [iOS (10, 0)] [Mac (10, 12, 0, PlatformArchitecture.Arch64)] [Watch (3, 2)] + [TV (14, 0)] [Category] [BaseType (typeof (NSUserActivity))] interface NSUserActivity_IntentsAdditions { @@ -7080,11 +7609,20 @@ interface NSUserActivity_IntentsAdditions { [return: NullAllowed] [Export ("interaction")] INInteraction GetInteraction (); + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Export ("shortcutAvailability")] + INShortcutAvailabilityOptions GetShortcutAvailability (); + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Export ("setShortcutAvailability:")] + void SetShortcutAvailability (INShortcutAvailabilityOptions shortcutAvailabilityOptions); } [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntent))] interface INActivateCarSignalIntent { @@ -7103,6 +7641,7 @@ interface INActivateCarSignalIntent { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INActivateCarSignalIntentHandling { @@ -7129,6 +7668,7 @@ interface INActivateCarSignalIntentHandling { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface INBillDetails : NSCopying, NSSecureCoding { @@ -7165,6 +7705,7 @@ interface INBillDetails : NSCopying, NSSecureCoding { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface INBillPayee : NSCopying, NSSecureCoding { @@ -7186,6 +7727,7 @@ interface INBillPayee : NSCopying, NSSecureCoding { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INBillPayeeResolutionResult { @@ -7236,6 +7778,7 @@ interface INBillPayeeResolutionResult { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INBillTypeResolutionResult { @@ -7300,6 +7843,7 @@ interface INBillTypeResolutionResult { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INCarSignalOptionsResolutionResult { @@ -7364,6 +7908,7 @@ interface INCarSignalOptionsResolutionResult { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntent))] interface INGetCarLockStatusIntent { @@ -7379,6 +7924,7 @@ interface INGetCarLockStatusIntent { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INGetCarLockStatusIntentHandling { @@ -7402,6 +7948,7 @@ interface INGetCarLockStatusIntentHandling { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResponse))] interface INGetCarLockStatusIntentResponse { @@ -7424,6 +7971,7 @@ interface INGetCarLockStatusIntentResponse { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntent))] interface INGetCarPowerLevelStatusIntent { @@ -7439,6 +7987,7 @@ interface INGetCarPowerLevelStatusIntent { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INGetCarPowerLevelStatusIntentHandling { @@ -7446,6 +7995,14 @@ interface INGetCarPowerLevelStatusIntentHandling { [Export ("handleGetCarPowerLevelStatus:completion:")] void HandleGetCarPowerLevelStatus (INGetCarPowerLevelStatusIntent intent, Action completion); + [NoWatch, iOS (14,0)] + [Export ("startSendingUpdatesForGetCarPowerLevelStatus:toObserver:")] + void StartSendingUpdates (INGetCarPowerLevelStatusIntent intent, IINGetCarPowerLevelStatusIntentResponseObserver observer); + + [NoWatch, iOS (14,0)] + [Export ("stopSendingUpdatesForGetCarPowerLevelStatus:")] + void StopSendingUpdates (INGetCarPowerLevelStatusIntent intent); + [Export ("confirmGetCarPowerLevelStatus:completion:")] void #if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 @@ -7459,12 +8016,24 @@ interface INGetCarPowerLevelStatusIntentHandling { void ResolveCarName (INGetCarPowerLevelStatusIntent intent, Action completion); } + interface IINGetCarPowerLevelStatusIntentResponseObserver {} + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Protocol] + interface INGetCarPowerLevelStatusIntentResponseObserver { + + [Abstract] + [Export ("getCarPowerLevelStatusResponseDidUpdate:")] + void DidUpdate (INGetCarPowerLevelStatusIntentResponse response); + } + // Just to please the generator that at this point does not know the hierarchy interface NSUnitLength : NSUnit { } [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResponse))] interface INGetCarPowerLevelStatusIntentResponse { @@ -7476,6 +8045,10 @@ interface INGetCarPowerLevelStatusIntentResponse { [Export ("code")] INGetCarPowerLevelStatusIntentResponseCode Code { get; } + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("carIdentifier")] + string CarIdentifier { get; set; } + #if false // I wish BindAs was a thing right now [BindAs (typeof (float?))] #endif @@ -7502,11 +8075,61 @@ interface INGetCarPowerLevelStatusIntentResponse { [BindAs (typeof (double?))] [NullAllowed, Export ("minutesToFull", ArgumentSemantic.Copy)] NSNumber MinutesToFull { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("maximumDistance", ArgumentSemantic.Copy)] + NSMeasurement MaximumDistance { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("distanceRemainingElectric", ArgumentSemantic.Copy)] + NSMeasurement DistanceRemainingElectric { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("maximumDistanceElectric", ArgumentSemantic.Copy)] + NSMeasurement MaximumDistanceElectric { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("distanceRemainingFuel", ArgumentSemantic.Copy)] + NSMeasurement DistanceRemainingFuel { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("maximumDistanceFuel", ArgumentSemantic.Copy)] + NSMeasurement MaximumDistanceFuel { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("consumptionFormulaArguments", ArgumentSemantic.Copy)] + NSDictionary ConsumptionFormulaArguments { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("chargingFormulaArguments", ArgumentSemantic.Copy)] + NSDictionary ChargingFormulaArguments { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("dateOfLastStateUpdate", ArgumentSemantic.Copy)] + NSDateComponents DateOfLastStateUpdate { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [BindAs (typeof (INCarChargingConnectorType))] + [NullAllowed, Export ("activeConnector")] + NSString ActiveConnector { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("maximumBatteryCapacity", ArgumentSemantic.Copy)] + NSMeasurement MaximumBatteryCapacity { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("currentBatteryCapacity", ArgumentSemantic.Copy)] + NSMeasurement CurrentBatteryCapacity { get; set; } + + [Watch (7, 0), iOS (14, 0)] + [NullAllowed, Export ("minimumBatteryCapacity", ArgumentSemantic.Copy)] + NSMeasurement MinimumBatteryCapacity { get; set; } } [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntent))] interface INPayBillIntent { @@ -7540,6 +8163,7 @@ interface INPayBillIntent { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INPayBillIntentHandling { @@ -7583,6 +8207,7 @@ interface INPayBillIntentHandling { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResponse))] interface INPayBillIntentResponse { @@ -7613,6 +8238,7 @@ interface INPayBillIntentResponse { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface INPaymentAccount : NSCopying, NSSecureCoding { @@ -7651,6 +8277,7 @@ interface INPaymentAccount : NSCopying, NSSecureCoding { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INPaymentAccountResolutionResult { @@ -7701,6 +8328,7 @@ interface INPaymentAccountResolutionResult { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface INPaymentAmount : NSCopying, NSSecureCoding { @@ -7719,6 +8347,7 @@ interface INPaymentAmount : NSCopying, NSSecureCoding { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INPaymentAmountResolutionResult { @@ -7769,6 +8398,7 @@ interface INPaymentAmountResolutionResult { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INPaymentStatusResolutionResult { @@ -7833,6 +8463,7 @@ interface INPaymentStatusResolutionResult { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntent))] interface INSearchForBillsIntent { @@ -7860,6 +8491,7 @@ interface INSearchForBillsIntent { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INSearchForBillsIntentHandling { @@ -7897,6 +8529,7 @@ interface INSearchForBillsIntentHandling { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResponse))] interface INSearchForBillsIntentResponse { @@ -7915,6 +8548,7 @@ interface INSearchForBillsIntentResponse { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntent))] interface INSetCarLockStatusIntent { @@ -7938,6 +8572,7 @@ interface INSetCarLockStatusIntent { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [Protocol] interface INSetCarLockStatusIntentHandling { @@ -7964,6 +8599,7 @@ interface INSetCarLockStatusIntentHandling { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResponse))] interface INSetCarLockStatusIntentResponse { @@ -7979,6 +8615,7 @@ interface INSetCarLockStatusIntentResponse { [iOS (10, 3)] [Watch (3, 2)] [Unavailable (PlatformName.MacOSX)] + [NoTV] [DisableDefaultCtor] [BaseType (typeof (INIntentResponse))] interface INActivateCarSignalIntentResponse { @@ -7994,7 +8631,7 @@ interface INActivateCarSignalIntentResponse { INCarSignalOptions Signals { get; set; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INAccountTypeResolutionResult { @@ -8038,7 +8675,7 @@ interface INAccountTypeResolutionResult { INAccountTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoMac, iOS (11,0), NoTV] [BaseType (typeof (INIntent))] interface INAddTasksIntent { @@ -8069,7 +8706,7 @@ interface INAddTasksIntent { INTaskPriority Priority { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoMac, iOS (11,0), NoTV] [Protocol] interface INAddTasksIntentHandling { @@ -8109,7 +8746,7 @@ interface INAddTasksIntentHandling { void ResolvePriority (INAddTasksIntent intent, Action completion); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INAddTasksIntentResponse { @@ -8128,7 +8765,7 @@ interface INAddTasksIntentResponse { INTask [] AddedTasks { get; set; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoMac, iOS (11,0), NoTV] [BaseType (typeof (INIntent))] interface INAppendToNoteIntent { @@ -8143,7 +8780,7 @@ interface INAppendToNoteIntent { INNoteContent Content { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Protocol] interface INAppendToNoteIntentHandling { @@ -8161,7 +8798,7 @@ interface INAppendToNoteIntentHandling { void ResolveContentForAppend (INAppendToNoteIntent intent, Action completion); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INAppendToNoteIntentResponse { @@ -8177,7 +8814,7 @@ interface INAppendToNoteIntentResponse { INNote Note { get; set; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INBalanceAmount : NSCopying, NSSecureCoding { @@ -8200,7 +8837,7 @@ interface INBalanceAmount : NSCopying, NSSecureCoding { string CurrencyCode { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INBalanceTypeResolutionResult { @@ -8244,7 +8881,13 @@ interface INBalanceTypeResolutionResult { INBalanceTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), Mac (10,13), iOS (11,0)] +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [Watch (4,0), NoTV, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INCallDestinationTypeResolutionResult { @@ -8288,7 +8931,13 @@ interface INCallDestinationTypeResolutionResult { INCallDestinationTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), Mac (10,13), iOS (11,0)] +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [Watch (4,0), iOS (11,0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INCallRecord : NSCopying, NSSecureCoding { @@ -8330,9 +8979,15 @@ interface INCallRecord : NSCopying, NSSecureCoding { NSNumber NumberOfCalls { get; } } - [Watch (4,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [Watch (4,0), NoTV, iOS (11,0)] + [BaseType (typeof (INIntentResolutionResult))] + [DisableDefaultCtor] interface INCallRecordTypeOptionsResolutionResult { [Static] @@ -8374,7 +9029,7 @@ interface INCallRecordTypeOptionsResolutionResult { INCallRecordTypeOptionsResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [NoWatch, NoMac, iOS (11,0)] + [NoWatch, NoMac, iOS (11,0), NoTV] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INCancelRideIntent { @@ -8387,7 +9042,7 @@ interface INCancelRideIntent { string RideIdentifier { get; } } - [NoWatch, NoMac, iOS (11,0)] + [NoWatch, NoMac, NoTV, iOS (11,0)] [Protocol] interface INCancelRideIntentHandling { @@ -8399,7 +9054,7 @@ interface INCancelRideIntentHandling { void Confirm (INCancelRideIntent intent, Action completion); } - [NoWatch, NoMac, iOS (11,0)] + [NoWatch, NoMac, NoTV, iOS (11,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INCancelRideIntentResponse { @@ -8418,7 +9073,7 @@ interface INCancelRideIntentResponse { NSDateComponents CancellationFeeThreshold { get; set; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INCreateNoteIntent { @@ -8437,7 +9092,7 @@ interface INCreateNoteIntent { INSpeakableString GroupName { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Protocol] interface INCreateNoteIntentHandling { @@ -8458,7 +9113,7 @@ interface INCreateNoteIntentHandling { void ResolveGroupName (INCreateNoteIntent intent, Action completion); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INCreateNoteIntentResponse { @@ -8474,7 +9129,7 @@ interface INCreateNoteIntentResponse { INNote CreatedNote { get; set; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INCreateTaskListIntent { @@ -8493,7 +9148,7 @@ interface INCreateTaskListIntent { INSpeakableString GroupName { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Protocol] interface INCreateTaskListIntentHandling { @@ -8514,7 +9169,7 @@ interface INCreateTaskListIntentHandling { void ResolveGroupName (INCreateTaskListIntent intent, Action completion); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INCreateTaskListIntentResponse { @@ -8530,7 +9185,7 @@ interface INCreateTaskListIntentResponse { INTaskList CreatedTaskList { get; set; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INDateSearchTypeResolutionResult { @@ -8574,7 +9229,7 @@ interface INDateSearchTypeResolutionResult { INDateSearchTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INGetVisualCodeIntent { @@ -8587,7 +9242,7 @@ interface INGetVisualCodeIntent { INVisualCodeType VisualCodeType { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Protocol] interface INGetVisualCodeIntentHandling { @@ -8602,7 +9257,7 @@ interface INGetVisualCodeIntentHandling { void ResolveVisualCodeType (INGetVisualCodeIntent intent, Action completion); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INGetVisualCodeIntentResponse { @@ -8618,7 +9273,7 @@ interface INGetVisualCodeIntentResponse { INImage VisualCodeImage { get; set; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INNoteContent))] interface INImageNoteContent : NSSecureCoding, NSCopying { @@ -8629,7 +9284,7 @@ interface INImageNoteContent : NSSecureCoding, NSCopying { INImage Image { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INLocationSearchTypeResolutionResult { @@ -8673,7 +9328,7 @@ interface INLocationSearchTypeResolutionResult { INLocationSearchTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (NSObject))] interface INNote : NSCopying, NSSecureCoding { @@ -8700,12 +9355,12 @@ interface INNote : NSCopying, NSSecureCoding { string Identifier { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (NSObject))] interface INNoteContent : NSSecureCoding, NSCopying { } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INNoteContentResolutionResult { @@ -8755,7 +9410,7 @@ interface INNoteContentResolutionResult { [Deprecated (PlatformName.iOS, 13, 0, message: "Not used anymore.")] [Deprecated (PlatformName.WatchOS, 6, 0, message: "Not used anymore.")] - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] interface INNoteContentTypeResolutionResult { @@ -8798,7 +9453,7 @@ interface INNoteContentTypeResolutionResult { INNoteContentTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] interface INNoteResolutionResult { @@ -8845,7 +9500,7 @@ interface INNoteResolutionResult { INNoteResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] interface INNotebookItemTypeResolutionResult { @@ -8892,7 +9547,13 @@ interface INNotebookItemTypeResolutionResult { INNotebookItemTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), Mac (10,14), iOS (11,0)] +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [Watch (4,0), iOS (11,0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INParameter : NSCopying, NSSecureCoding { @@ -8924,7 +9585,13 @@ interface INParameter : NSCopying, NSSecureCoding { nuint GetIndex (string subKeyPath); } - [Watch (4,0), Mac (10,13), iOS (11,0)] +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [Watch (4,0), NoTV, iOS (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INRecurrenceRule : NSCopying, NSSecureCoding { @@ -8932,14 +9599,23 @@ interface INRecurrenceRule : NSCopying, NSSecureCoding { [Export ("initWithInterval:frequency:")] IntPtr Constructor (nuint interval, INRecurrenceFrequency frequency); + [Watch (7,0), NoMac, iOS (14,0)] + [Export ("initWithInterval:frequency:weeklyRecurrenceDays:")] + [DesignatedInitializer] + IntPtr Constructor (nuint interval, INRecurrenceFrequency frequency, INDayOfWeekOptions weeklyRecurrenceDays); + [Export ("interval")] nuint Interval { get; } [Export ("frequency")] INRecurrenceFrequency Frequency { get; } + + [Watch (7,0), NoMac, iOS (14,0)] + [Export ("weeklyRecurrenceDays")] + INDayOfWeekOptions WeeklyRecurrenceDays { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INCurrencyAmountResolutionResult))] [DisableDefaultCtor] interface INRequestPaymentCurrencyAmountResolutionResult { @@ -8982,7 +9658,7 @@ interface INRequestPaymentCurrencyAmountResolutionResult { INRequestPaymentCurrencyAmountResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INPersonResolutionResult))] [DisableDefaultCtor] interface INRequestPaymentPayerResolutionResult { @@ -9041,7 +9717,7 @@ interface INRequestPaymentPayerResolutionResult { INRequestPaymentPayerResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntent))] interface INSearchForAccountsIntent { @@ -9062,7 +9738,7 @@ interface INSearchForAccountsIntent { INBalanceType RequestedBalanceType { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Protocol] interface INSearchForAccountsIntentHandling { @@ -9086,7 +9762,7 @@ interface INSearchForAccountsIntentHandling { void ResolveRequestedBalanceType (INSearchForAccountsIntent intent, Action completion); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSearchForAccountsIntentResponse { @@ -9102,7 +9778,7 @@ interface INSearchForAccountsIntentResponse { INPaymentAccount [] Accounts { get; set; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntent))] interface INSearchForNotebookItemsIntent { @@ -9159,7 +9835,7 @@ interface INSearchForNotebookItemsIntent { string NotebookItemIdentifier { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Protocol] interface INSearchForNotebookItemsIntentHandling { @@ -9203,7 +9879,7 @@ interface INSearchForNotebookItemsIntentHandling { void ResolveTaskPriority (INSearchForNotebookItemsIntent intent, Action completion); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSearchForNotebookItemsIntentResponse { @@ -9228,7 +9904,13 @@ interface INSearchForNotebookItemsIntentResponse { INSortType SortType { get; set; } } - [Watch (4,0), Mac (10,13), iOS (11,0)] +#if XAMCORE_4_0 + [NoMac] +#elif MONOMAC + [Obsolete ("Unavailable on macOS, will be removed in the future.")] + [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] +#endif + [Watch (4,0), NoTV, iOS (11,0)] [BaseType (typeof (INPersonResolutionResult))] [DisableDefaultCtor] interface INSendMessageRecipientResolutionResult { @@ -9287,7 +9969,7 @@ interface INSendMessageRecipientResolutionResult { INSendMessageRecipientResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INCurrencyAmountResolutionResult))] [DisableDefaultCtor] interface INSendPaymentCurrencyAmountResolutionResult { @@ -9330,7 +10012,7 @@ interface INSendPaymentCurrencyAmountResolutionResult { INSendPaymentCurrencyAmountResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INPersonResolutionResult))] [DisableDefaultCtor] interface INSendPaymentPayeeResolutionResult { @@ -9389,7 +10071,7 @@ interface INSendPaymentPayeeResolutionResult { INSendPaymentPayeeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [NoWatch, NoMac, iOS (11,0)] + [NoWatch, NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INSendRideFeedbackIntent { @@ -9408,7 +10090,7 @@ interface INSendRideFeedbackIntent { INCurrencyAmount Tip { get; set; } } - [NoWatch, NoMac, iOS (11,0)] + [NoWatch, NoTV, NoMac, iOS (11,0)] [Protocol] interface INSendRideFeedbackIntentHandling { @@ -9420,7 +10102,7 @@ interface INSendRideFeedbackIntentHandling { void Confirm (INSendRideFeedbackIntent sendRideFeedbackIntent, Action completion); } - [NoWatch, NoMac, iOS (11,0)] + [NoWatch, NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSendRideFeedbackIntentResponse { @@ -9433,7 +10115,7 @@ interface INSendRideFeedbackIntentResponse { INSendRideFeedbackIntentResponseCode Code { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntent))] interface INSetTaskAttributeIntent { @@ -9468,7 +10150,7 @@ interface INSetTaskAttributeIntent { INTemporalEventTrigger TemporalEventTrigger { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Protocol] interface INSetTaskAttributeIntentHandling { @@ -9506,7 +10188,7 @@ interface INSetTaskAttributeIntentHandling { void ResolveTemporalEventTrigger (INSetTaskAttributeIntent intent, Action completionHandler); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSetTaskAttributeIntentResponse { @@ -9522,7 +10204,7 @@ interface INSetTaskAttributeIntentResponse { INTask ModifiedTask { get; set; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INSpatialEventTrigger : NSCopying, NSSecureCoding { @@ -9538,7 +10220,7 @@ interface INSpatialEventTrigger : NSCopying, NSSecureCoding { INSpatialEvent Event { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INSpatialEventTriggerResolutionResult { @@ -9586,7 +10268,7 @@ interface INSpatialEventTriggerResolutionResult { INSpatialEventTriggerResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INTask : NSCopying, NSSecureCoding { @@ -9628,7 +10310,7 @@ interface INTask : NSCopying, NSSecureCoding { INTaskPriority Priority { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INTaskList : NSCopying, NSSecureCoding { @@ -9656,7 +10338,7 @@ interface INTaskList : NSCopying, NSSecureCoding { string Identifier { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INTaskListResolutionResult { @@ -9704,7 +10386,7 @@ interface INTaskListResolutionResult { INTaskListResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INTaskResolutionResult { @@ -9752,7 +10434,7 @@ interface INTaskResolutionResult { INTaskResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INTaskStatusResolutionResult { @@ -9796,7 +10478,7 @@ interface INTaskStatusResolutionResult { INTaskStatusResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INTemporalEventTrigger : NSCopying, NSSecureCoding { @@ -9809,7 +10491,7 @@ interface INTemporalEventTrigger : NSCopying, NSSecureCoding { INDateComponentsRange DateComponentsRange { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INTemporalEventTriggerResolutionResult { @@ -9857,7 +10539,7 @@ interface INTemporalEventTriggerResolutionResult { INTemporalEventTriggerResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INNoteContent))] [DisableDefaultCtor] interface INTextNoteContent : NSSecureCoding, NSCopying { @@ -9869,7 +10551,7 @@ interface INTextNoteContent : NSSecureCoding, NSCopying { string Text { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INTransferMoneyIntent { @@ -9894,7 +10576,7 @@ interface INTransferMoneyIntent { string TransactionNote { get; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [Protocol] interface INTransferMoneyIntentHandling { @@ -9921,7 +10603,7 @@ interface INTransferMoneyIntentHandling { void ResolveTransactionNote (INTransferMoneyIntent intent, Action completion); } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INTransferMoneyIntentResponse { @@ -9952,7 +10634,7 @@ interface INTransferMoneyIntentResponse { INCurrencyAmount TransferFee { get; set; } } - [Watch (4,0), NoMac, iOS (11,0)] + [Watch (4,0), NoTV, NoMac, iOS (11,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INVisualCodeTypeResolutionResult { @@ -9996,7 +10678,7 @@ interface INVisualCodeTypeResolutionResult { INVisualCodeTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoMac, NoTV, iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INDefaultCardTemplate : NSCopying, NSSecureCoding { @@ -10015,7 +10697,7 @@ interface INDefaultCardTemplate : NSCopying, NSSecureCoding { IntPtr Constructor (string title); } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), TV (14,0), NoMac, iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INMediaItem : NSCopying, NSSecureCoding { @@ -10045,7 +10727,7 @@ interface INMediaItem : NSCopying, NSSecureCoding { string Artist { get; } } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, Mac (11,0), iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INObject : INSpeakable, NSCopying, NSSecureCoding { @@ -10057,6 +10739,14 @@ interface INObject : INSpeakable, NSCopying, NSSecureCoding { [Export ("initWithIdentifier:displayString:")] IntPtr Constructor ([NullAllowed] string identifier, string displayString); + [Watch (7,0), iOS (14,0)] + [Export ("initWithIdentifier:displayString:subtitleString:displayImage:")] + IntPtr Constructor ([NullAllowed] string identifier, string displayString, [NullAllowed] string subtitleString, [NullAllowed] INImage displayImage); + + [Watch (7,0), iOS (14,0)] + [Export ("initWithIdentifier:displayString:pronunciationHint:subtitleString:displayImage:")] + IntPtr Constructor ([NullAllowed] string identifier, string displayString, [NullAllowed] string pronunciationHint, [NullAllowed] string subtitleString, [NullAllowed] INImage displayImage); + // Inlined by INSpeakable //[NullAllowed, Export ("identifier", ArgumentSemantic.Strong)] //string Identifier { get; } @@ -10069,18 +10759,26 @@ interface INObject : INSpeakable, NSCopying, NSSecureCoding { //string PronunciationHint { get; } [Sealed] - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), iOS (13,0)] [Export ("alternativeSpeakableMatches")] [return: NullAllowed] INSpeakableString [] GetAlternativeSpeakableMatches (); + [Watch (7,0), iOS (14,0)] + [NullAllowed, Export ("subtitleString")] + string SubtitleString { get; set; } + + [Watch (7,0), iOS (14,0)] + [NullAllowed, Export ("displayImage", ArgumentSemantic.Strong)] + INImage DisplayImage { get; set; } + // Not [Sealed] since the 'AlternativeSpeakableMatches' inlined property is read-only - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), iOS (13,0)] [Export ("setAlternativeSpeakableMatches:")] void SetAlternativeSpeakableMatches ([NullAllowed] INSpeakableString [] alternativeSpeakableMatches); } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), TV (14,0), NoMac, iOS (12,0)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INPlayMediaIntent { @@ -10126,7 +10824,7 @@ interface INPlayMediaIntent { INMediaSearch MediaSearch { get; } } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), TV (14,0), NoMac, iOS (12,0)] [Protocol] interface INPlayMediaIntentHandling { @@ -10162,7 +10860,7 @@ interface INPlayMediaIntentHandling { void ResolvePlaybackSpeed (INPlayMediaIntent intent, Action completion); } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), TV (14,0), NoMac, iOS (12,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INPlayMediaIntentResponse { @@ -10180,13 +10878,13 @@ interface INPlayMediaIntentResponse { } [Abstract] - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, NoMac, iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INRelevanceProvider : NSCopying, NSSecureCoding { } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, NoMac, iOS (12,0)] [BaseType (typeof (INRelevanceProvider))] [DisableDefaultCtor] interface INDateRelevanceProvider { @@ -10202,7 +10900,7 @@ interface INDateRelevanceProvider { IntPtr Constructor (NSDate startDate, [NullAllowed] NSDate endDate); } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, NoMac, iOS (12,0)] [BaseType (typeof (INRelevanceProvider))] [DisableDefaultCtor] interface INLocationRelevanceProvider { @@ -10215,7 +10913,7 @@ interface INLocationRelevanceProvider { IntPtr Constructor (CLRegion region); } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, NoMac, iOS (12,0)] [BaseType (typeof (INRelevanceProvider))] [DisableDefaultCtor] interface INDailyRoutineRelevanceProvider { @@ -10228,7 +10926,7 @@ interface INDailyRoutineRelevanceProvider { IntPtr Constructor (INDailyRoutineSituation situation); } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, NoMac, iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INRelevantShortcut : NSSecureCoding, NSCopying { @@ -10250,7 +10948,7 @@ interface INRelevantShortcut : NSSecureCoding, NSCopying { IntPtr Constructor (INShortcut shortcut); } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, NoMac, iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INRelevantShortcutStore { @@ -10264,7 +10962,7 @@ interface INRelevantShortcutStore { void SetRelevantShortcuts (INRelevantShortcut [] shortcuts, [NullAllowed] Action completionHandler); } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, Mac (11,0), iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INShortcut : NSSecureCoding, NSCopying { @@ -10282,7 +10980,7 @@ interface INShortcut : NSSecureCoding, NSCopying { IntPtr Constructor (NSUserActivity userActivity); } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, NoMac, iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INUpcomingMediaManager { @@ -10298,7 +10996,7 @@ interface INUpcomingMediaManager { void SetPredictionMode (INUpcomingMediaPredictionMode mode, INMediaItemType type); } - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, NoMac, iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INVoiceShortcut : NSSecureCoding, NSCopying { @@ -10315,7 +11013,7 @@ interface INVoiceShortcut : NSSecureCoding, NSCopying { delegate void INVoiceShortcutCenterGetVoiceShortcutsHandler ([NullAllowed] INVoiceShortcut [] voiceShortcuts, NSError error); - [Watch (5,0), NoMac, iOS (12,0)] + [Watch (5,0), NoTV, NoMac, iOS (12,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INVoiceShortcutCenter { @@ -10357,7 +11055,7 @@ interface INVoiceShortcutCenter { // string DeferredLocalizedIntentsStringWithFormat (string format, [NullAllowed] string table, IntPtr arguments); //} - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INAddMediaIntent { @@ -10376,7 +11074,7 @@ interface INAddMediaIntent { INMediaDestination MediaDestination { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Protocol] interface INAddMediaIntentHandling { @@ -10394,7 +11092,7 @@ interface INAddMediaIntentHandling { void ResolveMediaDestination (INAddMediaIntent intent, Action completion); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INAddMediaIntentResponse { @@ -10407,7 +11105,7 @@ interface INAddMediaIntentResponse { INAddMediaIntentResponseCode Code { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INMediaItemResolutionResult))] [DisableDefaultCtor] interface INAddMediaMediaItemResolutionResult { @@ -10585,7 +11283,7 @@ interface INAddTasksTemporalEventTriggerResolutionResult { INAddTasksTemporalEventTriggerResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INAirline : NSCopying, NSSecureCoding { @@ -10604,7 +11302,7 @@ interface INAirline : NSCopying, NSSecureCoding { string IcaoCode { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INAirport : NSCopying, NSSecureCoding { @@ -10623,7 +11321,7 @@ interface INAirport : NSCopying, NSSecureCoding { string IcaoCode { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface INAirportGate : NSCopying, NSSecureCoding { @@ -10852,7 +11550,7 @@ interface INDeleteTasksTaskResolutionResult { INDeleteTasksTaskResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), Mac (11,0), iOS (13,0), NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INEnergyResolutionResult { @@ -10898,7 +11596,7 @@ interface INEnergyResolutionResult { INEnergyResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), Mac (11,0), iOS (13,0), NoTV] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INEnumResolutionResult { @@ -10940,10 +11638,10 @@ interface INEnumResolutionResult { INEnumResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface INFile { + interface INFile : NSSecureCoding { [Static] [Export ("fileWithData:filename:typeIdentifier:")] @@ -10966,7 +11664,7 @@ interface INFile { NSUrl FileUrl { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INFileResolutionResult { @@ -11012,7 +11710,7 @@ interface INFileResolutionResult { INFileResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INFlight : NSCopying, NSSecureCoding { @@ -11040,13 +11738,17 @@ interface INFlight : NSCopying, NSSecureCoding { INAirportGate ArrivalAirportGate { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] interface INFlightReservation : NSCopying, NSSecureCoding { - [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:reservedSeat:flight:")] + [Watch (7,0), iOS (14,0)] + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservedSeat:flight:")] [DesignatedInitializer] + IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, [NullAllowed] NSUrl url, [NullAllowed] INSeat reservedSeat, INFlight flight); + + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:reservedSeat:flight:")] IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, [NullAllowed] INSeat reservedSeat, INFlight flight); [NullAllowed, Export ("reservedSeat", ArgumentSemantic.Copy)] @@ -11056,7 +11758,7 @@ interface INFlightReservation : NSCopying, NSSecureCoding { INFlight Flight { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INGetReservationDetailsIntent { @@ -11072,7 +11774,7 @@ interface INGetReservationDetailsIntent { INSpeakableString[] ReservationItemReferences { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INGetReservationDetailsIntentResponse { @@ -11088,7 +11790,7 @@ interface INGetReservationDetailsIntentResponse { INReservation[] Reservations { get; set; } } - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INLengthResolutionResult { @@ -11134,13 +11836,17 @@ interface INLengthResolutionResult { INLengthResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] interface INLodgingReservation : NSCopying, NSSecureCoding { - [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:lodgingBusinessLocation:reservationDuration:numberOfAdults:numberOfChildren:")] + [Watch (7,0), iOS (14,0)] + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:lodgingBusinessLocation:reservationDuration:numberOfAdults:numberOfChildren:")] [DesignatedInitializer] + IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, [NullAllowed] NSUrl url, CLPlacemark lodgingBusinessLocation, INDateComponentsRange reservationDuration, [NullAllowed] [BindAs (typeof (int?))] NSNumber numberOfAdults, [NullAllowed] [BindAs (typeof (int?))] NSNumber numberOfChildren); + + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:lodgingBusinessLocation:reservationDuration:numberOfAdults:numberOfChildren:")] IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, CLPlacemark lodgingBusinessLocation, INDateComponentsRange reservationDuration, [NullAllowed] [BindAs (typeof (int?))] NSNumber numberOfAdults, [NullAllowed] [BindAs (typeof (int?))] NSNumber numberOfChildren); [Export ("lodgingBusinessLocation", ArgumentSemantic.Copy)] @@ -11158,7 +11864,7 @@ interface INLodgingReservation : NSCopying, NSSecureCoding { NSNumber NumberOfChildren { get; } } - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INMassResolutionResult { @@ -11204,7 +11910,7 @@ interface INMassResolutionResult { INMassResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INMediaAffinityTypeResolutionResult { @@ -11246,7 +11952,7 @@ interface INMediaAffinityTypeResolutionResult { INMediaAffinityTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INMediaDestination : NSCopying, NSSecureCoding { @@ -11266,7 +11972,7 @@ interface INMediaDestination : NSCopying, NSSecureCoding { string PlaylistName { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INMediaDestinationResolutionResult { @@ -11312,7 +12018,7 @@ interface INMediaDestinationResolutionResult { INMediaDestinationResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INMediaItemResolutionResult { @@ -11362,7 +12068,7 @@ interface INMediaItemResolutionResult { INMediaItemResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INMediaSearch : NSCopying, NSSecureCoding { @@ -11402,7 +12108,7 @@ interface INMediaSearch : NSCopying, NSSecureCoding { string MediaIdentifier { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INUserContext))] interface INMediaUserContext { @@ -11414,7 +12120,7 @@ interface INMediaUserContext { NSNumber NumberOfLibraryItems { get; set; } } - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INObjectResolutionResult { @@ -11460,7 +12166,7 @@ interface INObjectResolutionResult { INObjectResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INPaymentMethodResolutionResult { @@ -11506,7 +12212,7 @@ interface INPaymentMethodResolutionResult { INPaymentMethodResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INMediaItemResolutionResult))] [DisableDefaultCtor] interface INPlayMediaMediaItemResolutionResult { @@ -11569,7 +12275,7 @@ interface INPlayMediaMediaItemResolutionResult { INPlayMediaMediaItemResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INDoubleResolutionResult))] [DisableDefaultCtor] interface INPlayMediaPlaybackSpeedResolutionResult { @@ -11621,7 +12327,7 @@ interface INPlayMediaPlaybackSpeedResolutionResult { INDoubleResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] interface INPlaybackQueueLocationResolutionResult { @@ -11662,7 +12368,7 @@ interface INPlaybackQueueLocationResolutionResult { INPlaybackQueueLocationResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INPlaybackRepeatModeResolutionResult { @@ -11704,7 +12410,7 @@ interface INPlaybackRepeatModeResolutionResult { INPlaybackRepeatModeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INRentalCar : NSCopying, NSSecureCoding { @@ -11729,13 +12435,17 @@ interface INRentalCar : NSCopying, NSSecureCoding { string RentalCarDescription { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] interface INRentalCarReservation : NSCopying, NSSecureCoding { - [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:rentalCar:rentalDuration:pickupLocation:dropOffLocation:")] + [Watch (7,0), iOS (14,0)] + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:rentalCar:rentalDuration:pickupLocation:dropOffLocation:")] [DesignatedInitializer] + IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, [NullAllowed] NSUrl url, INRentalCar rentalCar, INDateComponentsRange rentalDuration, [NullAllowed] CLPlacemark pickupLocation, [NullAllowed] CLPlacemark dropOffLocation); + + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:rentalCar:rentalDuration:pickupLocation:dropOffLocation:")] IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, INRentalCar rentalCar, INDateComponentsRange rentalDuration, [NullAllowed] CLPlacemark pickupLocation, [NullAllowed] CLPlacemark dropOffLocation); [Export ("rentalCar", ArgumentSemantic.Copy)] @@ -11751,7 +12461,7 @@ interface INRentalCarReservation : NSCopying, NSSecureCoding { CLPlacemark DropOffLocation { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INReservation : NSCopying, NSSecureCoding { @@ -11773,9 +12483,13 @@ interface INReservation : NSCopying, NSSecureCoding { [NullAllowed, Export ("actions", ArgumentSemantic.Copy)] INReservationAction [] Actions { get; } + + [Watch (7,0), iOS (14,0)] + [NullAllowed, Export ("URL", ArgumentSemantic.Copy)] + NSUrl Url { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INReservationAction : NSCopying, NSSecureCoding { @@ -11794,13 +12508,17 @@ interface INReservationAction : NSCopying, NSSecureCoding { NSUserActivity UserActivity { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] interface INRestaurantReservation : NSCopying, NSSecureCoding { - [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:reservationDuration:partySize:restaurantLocation:")] + [Watch (7,0), iOS (14,0)] + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservationDuration:partySize:restaurantLocation:")] [DesignatedInitializer] + IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, [NullAllowed] NSUrl url, INDateComponentsRange reservationDuration, [NullAllowed] [BindAs (typeof (int?))] NSNumber partySize, CLPlacemark restaurantLocation); + + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:reservationDuration:partySize:restaurantLocation:")] IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction [] actions, INDateComponentsRange reservationDuration, [NullAllowed] [BindAs (typeof (int?))] NSNumber partySize, CLPlacemark restaurantLocation); [Export ("reservationDuration", ArgumentSemantic.Copy)] @@ -11814,7 +12532,7 @@ interface INRestaurantReservation : NSCopying, NSSecureCoding { CLPlacemark RestaurantLocation { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INSearchForMediaIntent { @@ -11830,7 +12548,7 @@ interface INSearchForMediaIntent { INMediaSearch MediaSearch { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Protocol] interface INSearchForMediaIntentHandling { @@ -11845,7 +12563,7 @@ interface INSearchForMediaIntentHandling { void ResolveMediaItems (INSearchForMediaIntent intent, Action completion); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INSearchForMediaIntentResponse { @@ -11861,7 +12579,7 @@ interface INSearchForMediaIntentResponse { INMediaItem[] MediaItems { get; set; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INSeat : NSCopying, NSSecureCoding { @@ -12052,7 +12770,7 @@ interface INSnoozeTasksTaskResolutionResult { INSnoozeTasksTaskResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INSpeedResolutionResult { @@ -12212,10 +12930,26 @@ interface INStartCallContactResolutionResult { [DisableDefaultCtor] interface INStartCallIntent { - [Export ("initWithAudioRoute:destinationType:contacts:recordTypeForRedialing:callCapability:")] + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Export ("initWithCallRecordFilter:callRecordToCallBack:audioRoute:destinationType:contacts:callCapability:")] [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] INCallRecordFilter callRecordFilter, [NullAllowed] INCallRecord callRecordToCallBack, INCallAudioRoute audioRoute, INCallDestinationType destinationType, [NullAllowed] INPerson[] contacts, INCallCapability callCapability); + + [Deprecated (PlatformName.iOS, 14, 0, message: "Use '.ctor (INCallRecordFilter, INCallRecord, INCallAudioRoute, INCallDestinationType, INPerson[], INCallCapability)' overload instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use '.ctor (INCallRecordFilter, INCallRecord, INCallAudioRoute, INCallDestinationType, INPerson[], INCallCapability)' overload instead.")] + [Export ("initWithAudioRoute:destinationType:contacts:recordTypeForRedialing:callCapability:")] IntPtr Constructor (INCallAudioRoute audioRoute, INCallDestinationType destinationType, [NullAllowed] INPerson[] contacts, INCallRecordType recordTypeForRedialing, INCallCapability callCapability); + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [NullAllowed] + [Export ("callRecordFilter", ArgumentSemantic.Copy)] + INCallRecordFilter CallRecordFilter { get; } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [NullAllowed] + [Export ("callRecordToCallBack", ArgumentSemantic.Copy)] + INCallRecord CallRecordToCallBack { get; } + [Export ("audioRoute", ArgumentSemantic.Assign)] INCallAudioRoute AudioRoute { get; } @@ -12225,6 +12959,8 @@ interface INStartCallIntent { [NullAllowed, Export ("contacts", ArgumentSemantic.Copy)] INPerson[] Contacts { get; } + [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.WatchOS, 7, 0)] [Export ("recordTypeForRedialing", ArgumentSemantic.Assign)] INCallRecordType RecordTypeForRedialing { get; } @@ -12243,6 +12979,10 @@ interface INStartCallIntentHandling { [Export ("confirmStartCall:completion:")] void Confirm (INStartCallIntent intent, Action completion); + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Export ("resolveCallRecordToCallBackForStartCall:withCompletion:")] + void ResolveCallRecordToCallBack (INStartCallIntent intent, Action completion); + [Export ("resolveDestinationTypeForStartCall:withCompletion:")] void ResolveDestinationType (INStartCallIntent intent, Action completion); @@ -12377,8 +13117,12 @@ interface INTicketedEvent : NSCopying, NSSecureCoding { [DisableDefaultCtor] interface INTicketedEventReservation : NSCopying, NSSecureCoding { - [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:reservedSeat:event:")] + [Watch (7,0), iOS (14,0)] + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservedSeat:event:")] [DesignatedInitializer] + IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, [NullAllowed] NSUrl url, [NullAllowed] INSeat reservedSeat, INTicketedEvent @event); + + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:reservedSeat:event:")] IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, [NullAllowed] INSeat reservedSeat, INTicketedEvent @event); [Export ("event", ArgumentSemantic.Copy)] @@ -12388,7 +13132,7 @@ interface INTicketedEventReservation : NSCopying, NSSecureCoding { INSeat ReservedSeat { get; } } - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INTimeIntervalResolutionResult { @@ -12430,13 +13174,17 @@ interface INTimeIntervalResolutionResult { INTimeIntervalResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] interface INTrainReservation : NSCopying, NSSecureCoding { - [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:reservedSeat:trainTrip:")] + [Watch (7,0), iOS (14,0)] + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservedSeat:trainTrip:")] [DesignatedInitializer] + IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, [NullAllowed] NSUrl url, [NullAllowed] INSeat reservedSeat, INTrainTrip trainTrip); + + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:reservedSeat:trainTrip:")] IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, [NullAllowed] INSeat reservedSeat, INTrainTrip trainTrip); [NullAllowed, Export ("reservedSeat", ArgumentSemantic.Copy)] @@ -12446,7 +13194,7 @@ interface INTrainReservation : NSCopying, NSSecureCoding { INTrainTrip TrainTrip { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INTrainTrip : NSCopying, NSSecureCoding { @@ -12480,7 +13228,7 @@ interface INTrainTrip : NSCopying, NSSecureCoding { string ArrivalPlatform { get; } } - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INIntentResolutionResult), Name = "INURLResolutionResult")] [DisableDefaultCtor] interface INUrlResolutionResult { @@ -12526,7 +13274,7 @@ interface INUrlResolutionResult { INUrlResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INUpdateMediaAffinityIntent { @@ -12545,7 +13293,7 @@ interface INUpdateMediaAffinityIntent { INMediaAffinityType AffinityType { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [Protocol] interface INUpdateMediaAffinityIntentHandling { @@ -12563,7 +13311,7 @@ interface INUpdateMediaAffinityIntentHandling { void ResolveAffinityType (INUpdateMediaAffinityIntent intent, Action completion); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INUpdateMediaAffinityIntentResponse { @@ -12576,7 +13324,7 @@ interface INUpdateMediaAffinityIntentResponse { INUpdateMediaAffinityIntentResponseCode Code { get; } } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INMediaItemResolutionResult))] [DisableDefaultCtor] interface INUpdateMediaAffinityMediaItemResolutionResult { @@ -12639,7 +13387,7 @@ interface INUpdateMediaAffinityMediaItemResolutionResult { INUpdateMediaAffinityMediaItemResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INUserContext : NSSecureCoding { @@ -12648,7 +13396,7 @@ interface INUserContext : NSSecureCoding { void BecomeCurrent (); } - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), NoTV, Mac (11,0), iOS (13,0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] interface INVolumeResolutionResult { @@ -12694,7 +13442,7 @@ interface INVolumeResolutionResult { INVolumeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INMediaDestinationResolutionResult))] [DisableDefaultCtor] interface INAddMediaMediaDestinationResolutionResult { @@ -12752,7 +13500,7 @@ interface INAddMediaMediaDestinationResolutionResult { INAddMediaMediaDestinationResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6,0), NoTV, NoMac, iOS (13,0)] + [Watch (6,0), TV (14,0), NoMac, iOS (13,0)] [BaseType (typeof (INMediaItemResolutionResult))] interface INSearchForMediaMediaItemResolutionResult { @@ -12816,7 +13564,7 @@ interface INSearchForMediaMediaItemResolutionResult { - [Watch (6,0), NoMac, iOS (13,0)] + [Watch (6,0), NoTV, NoMac, iOS (13,0)] [Category] [BaseType (typeof (NSExtensionContext))] interface NSExtensionContext_ShareExtension { @@ -12825,4 +13573,408 @@ interface NSExtensionContext_ShareExtension { [Export ("intent")] INIntent GetIntent (); } + + [Watch (7,0), NoTV, Mac (11,0), iOS (14,0)] + [BaseType (typeof (INReservation))] + [DisableDefaultCtor] + interface INBoatReservation : NSCopying, NSSecureCoding { + + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservedSeat:boatTrip:")] + [DesignatedInitializer] + IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction [] actions, [NullAllowed] NSUrl url, [NullAllowed] INSeat reservedSeat, [NullAllowed] INBoatTrip boatTrip); + + [NullAllowed, Export ("reservedSeat", ArgumentSemantic.Copy)] + INSeat ReservedSeat { get; } + + [NullAllowed, Export ("boatTrip", ArgumentSemantic.Copy)] + INBoatTrip BoatTrip { get; } + } + + [Watch (7,0), NoTV, Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface INBoatTrip : NSCopying, NSSecureCoding { + + [Export ("initWithProvider:boatName:boatNumber:tripDuration:departureBoatTerminalLocation:arrivalBoatTerminalLocation:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] string provider, [NullAllowed] string boatName, [NullAllowed] string boatNumber, INDateComponentsRange tripDuration, CLPlacemark departureBoatTerminalLocation, CLPlacemark arrivalBoatTerminalLocation); + + [NullAllowed, Export ("provider")] + string Provider { get; } + + [NullAllowed, Export ("boatName")] + string BoatName { get; } + + [NullAllowed, Export ("boatNumber")] + string BoatNumber { get; } + + [Export ("tripDuration", ArgumentSemantic.Copy)] + INDateComponentsRange TripDuration { get; } + + [Export ("departureBoatTerminalLocation", ArgumentSemantic.Copy)] + CLPlacemark DepartureBoatTerminalLocation { get; } + + [Export ("arrivalBoatTerminalLocation", ArgumentSemantic.Copy)] + CLPlacemark ArrivalBoatTerminalLocation { get; } + } + + [Watch (7,0), NoTV, Mac (11,0), iOS (14,0)] + [BaseType (typeof (INReservation))] + [DisableDefaultCtor] + interface INBusReservation : NSCopying, NSSecureCoding { + + [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservedSeat:busTrip:")] + [DesignatedInitializer] + IntPtr Constructor (INSpeakableString itemReference, [NullAllowed] string reservationNumber, [NullAllowed] NSDate bookingTime, INReservationStatus reservationStatus, [NullAllowed] string reservationHolderName, [NullAllowed] INReservationAction[] actions, [NullAllowed] NSUrl url, [NullAllowed] INSeat reservedSeat, [NullAllowed] INBusTrip busTrip); + + [NullAllowed, Export ("reservedSeat", ArgumentSemantic.Copy)] + INSeat ReservedSeat { get; } + + [Export ("busTrip", ArgumentSemantic.Copy)] + INBusTrip BusTrip { get; } + } + + [Watch (7,0), NoTV, Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface INBusTrip : NSCopying, NSSecureCoding { + + [Export ("initWithProvider:busName:busNumber:tripDuration:departureBusStopLocation:departurePlatform:arrivalBusStopLocation:arrivalPlatform:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] string provider, [NullAllowed] string busName, [NullAllowed] string busNumber, INDateComponentsRange tripDuration, CLPlacemark departureBusStopLocation, [NullAllowed] string departurePlatform, CLPlacemark arrivalBusStopLocation, [NullAllowed] string arrivalPlatform); + + [NullAllowed, Export ("provider")] + string Provider { get; } + + [NullAllowed, Export ("busName")] + string BusName { get; } + + [NullAllowed, Export ("busNumber")] + string BusNumber { get; } + + [Export ("tripDuration", ArgumentSemantic.Copy)] + INDateComponentsRange TripDuration { get; } + + [Export ("departureBusStopLocation", ArgumentSemantic.Copy)] + CLPlacemark DepartureBusStopLocation { get; } + + [NullAllowed, Export ("departurePlatform")] + string DeparturePlatform { get; } + + [Export ("arrivalBusStopLocation", ArgumentSemantic.Copy)] + CLPlacemark ArrivalBusStopLocation { get; } + + [NullAllowed, Export ("arrivalPlatform")] + string ArrivalPlatform { get; } + } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface INCallRecordFilter : NSCopying, NSSecureCoding { + + [Export ("initWithParticipants:callTypes:callCapability:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] INPerson [] participants, INCallRecordTypeOptions callTypes, INCallCapability callCapability); + + [NullAllowed, Export ("participants", ArgumentSemantic.Copy)] + INPerson [] Participants { get; } + + [Export ("callTypes", ArgumentSemantic.Assign)] + INCallRecordTypeOptions CallTypes { get; } + + [Export ("callCapability", ArgumentSemantic.Assign)] + INCallCapability CallCapability { get; } + } + + [Watch (4,0), NoTV, NoMac, iOS (11,0)] + [BaseType (typeof (INIntentResolutionResult))] + interface INCallRecordResolutionResult { + + [Static] + [Export ("successWithResolvedCallRecord:")] + INCallRecordResolutionResult GetSuccess (INCallRecord resolvedCallRecord); + + [Static] + [Export ("disambiguationWithCallRecordsToDisambiguate:")] + INCallRecordResolutionResult GetDisambiguation (INCallRecord [] callRecordsToDisambiguate); + + [Static] + [Export ("confirmationRequiredWithCallRecordToConfirm:")] + INCallRecordResolutionResult GetConfirmationRequired ([NullAllowed] INCallRecord callRecordToConfirm); + + // Fixes bug 43205. We need to return the inherited type not the base type + // because users won't be able to downcast easily + + [New] + [Static] + [Export ("needsValue")] + INCallRecordResolutionResult NeedsValue { get; } + + [New] + [Static] + [Export ("notRequired")] + INCallRecordResolutionResult NotRequired { get; } + + [New] + [Static] + [Export ("unsupported")] + INCallRecordResolutionResult Unsupported { get; } + + [New] + [Static] + [Export ("unsupportedWithReason:")] + INCallRecordResolutionResult GetUnsupported (nint reason); + + [New] + [Static] + [Export ("confirmationRequiredWithItemToConfirm:forReason:")] + INCallRecordResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); + } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface INCar : NSCopying, NSSecureCoding { + + [Export ("initWithCarIdentifier:displayName:year:make:model:color:headUnit:supportedChargingConnectors:")] + [DesignatedInitializer] + IntPtr Constructor (string carIdentifier, [NullAllowed] string displayName, [NullAllowed] string year, [NullAllowed] string make, [NullAllowed] string model, [NullAllowed] CGColor color, [NullAllowed] INCarHeadUnit headUnit, [BindAs (typeof (INCarChargingConnectorType []))] NSString [] supportedChargingConnectors); + + [Export ("carIdentifier")] + string CarIdentifier { get; } + + [NullAllowed, Export ("displayName")] + string DisplayName { get; } + + [NullAllowed, Export ("year")] + string Year { get; } + + [NullAllowed, Export ("make")] + string Make { get; } + + [NullAllowed, Export ("model")] + string Model { get; } + + [NullAllowed, Export ("color")] + CGColor Color { get; } + + [NullAllowed, Export ("headUnit", ArgumentSemantic.Copy)] + INCarHeadUnit HeadUnit { get; } + + [BindAs (typeof (INCarChargingConnectorType []))] + [Export ("supportedChargingConnectors", ArgumentSemantic.Copy)] + NSString [] SupportedChargingConnectors { get; } + + [Export ("setMaximumPower:forChargingConnectorType:")] + void SetMaximumPower (NSMeasurement power, [BindAs (typeof (INCarChargingConnectorType))] NSString chargingConnectorType); + + [Export ("maximumPowerForChargingConnectorType:")] + [return: NullAllowed] + NSMeasurement GetMaximumPower ([BindAs (typeof (INCarChargingConnectorType))] NSString chargingConnectorType); + } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface INCarHeadUnit : NSCopying, NSSecureCoding { + + [Export ("initWithBluetoothIdentifier:iAP2Identifier:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] string bluetoothIdentifier, [NullAllowed] string iAP2Identifier); + + [NullAllowed, Export ("bluetoothIdentifier")] + string BluetoothIdentifier { get; } + + [NullAllowed, Export ("iAP2Identifier")] + string Iap2Identifier { get; } + } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (INIntent))] + [DesignatedDefaultCtor] + interface INListCarsIntent { + + } + + interface IINListCarsIntentHandling { } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Protocol] + interface INListCarsIntentHandling { + + [Abstract] + [Export ("handleListCars:completion:")] + void HandleListCars (INListCarsIntent intent, Action completion); + + [Export ("confirmListCars:completion:")] + void ConfirmListCars (INListCarsIntent intent, Action completion); + } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (INIntentResponse))] + [DisableDefaultCtor] + interface INListCarsIntentResponse { + + [Export ("initWithCode:userActivity:")] + [DesignatedInitializer] + IntPtr Constructor (INListCarsIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); + + [Export ("code")] + INListCarsIntentResponseCode Code { get; } + + [NullAllowed, Export ("cars", ArgumentSemantic.Copy)] + INCar [] Cars { get; set; } + } + + [Watch (7,0), NoTV, Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface INObjectCollection : NSCopying, NSSecureCoding + where ObjectType : NSObject { + + [Export ("sections", ArgumentSemantic.Copy)] + INObjectSection [] Sections { get; } + + [Export ("allItems", ArgumentSemantic.Copy)] + ObjectType [] AllItems { get; } + + [Export ("usesIndexedCollation")] + bool UsesIndexedCollation { get; set; } + + [Export ("initWithSections:")] + [DesignatedInitializer] + IntPtr Constructor (INObjectSection [] sections); + + [Export ("initWithItems:")] + IntPtr Constructor (ObjectType[] items); + } + + [Watch (7,0), NoTV, Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface INObjectSection : NSCopying, NSSecureCoding + where ObjectType : NSObject { + + [NullAllowed, Export ("title")] + string Title { get; } + + [Export ("items", ArgumentSemantic.Copy)] + ObjectType [] Items { get; } + + [Export ("initWithTitle:items:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] string title, ObjectType[] items); + } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (INIntentResolutionResult))] + [DisableDefaultCtor] + interface INOutgoingMessageTypeResolutionResult { + + [Static] + [Export ("successWithResolvedOutgoingMessageType:")] + INOutgoingMessageTypeResolutionResult GetSuccess (INOutgoingMessageType resolvedOutgoingMessageType); + + [Static] + [Export ("confirmationRequiredWithOutgoingMessageTypeToConfirm:")] + INOutgoingMessageTypeResolutionResult GetConfirmationRequired (INOutgoingMessageType outgoingMessageTypeToConfirm); + + // Fixes bug 43205. We need to return the inherited type not the base type + // because users won't be able to downcast easily + + [New] + [Static] + [Export ("needsValue")] + INOutgoingMessageTypeResolutionResult NeedsValue { get; } + + [New] + [Static] + [Export ("notRequired")] + INOutgoingMessageTypeResolutionResult NotRequired { get; } + + [New] + [Static] + [Export ("unsupported")] + INOutgoingMessageTypeResolutionResult Unsupported { get; } + + [New] + [Static] + [Export ("unsupportedWithReason:")] + INOutgoingMessageTypeResolutionResult GetUnsupported (nint reason); + + [New] + [Static] + [Export ("confirmationRequiredWithItemToConfirm:forReason:")] + INOutgoingMessageTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); + } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface INSendMessageAttachment { + + [Static] + [Export ("attachmentWithAudioMessageFile:")] + INSendMessageAttachment Create (INFile audioMessageFile); + + [NullAllowed, Export ("audioMessageFile", ArgumentSemantic.Copy)] + INFile AudioMessageFile { get; } + } + + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (INCallRecordResolutionResult))] + [DisableDefaultCtor] + interface INStartCallCallRecordToCallBackResolutionResult { + + [Static] + [Export ("successWithResolvedCallRecord:")] + INStartCallCallRecordToCallBackResolutionResult GetSuccess (INCallRecord resolvedCallRecord); + + [Static] + [Export ("disambiguationWithCallRecordsToDisambiguate:")] + INStartCallCallRecordToCallBackResolutionResult GetDisambiguation (INCallRecord [] callRecordsToDisambiguate); + + [Static] + [Export ("confirmationRequiredWithCallRecordToConfirm:")] + INStartCallCallRecordToCallBackResolutionResult GetConfirmationRequired ([NullAllowed] INCallRecord callRecordToConfirm); + + [Static] + [Export ("unsupportedForReason:")] + INStartCallCallRecordToCallBackResolutionResult GetUnsupported (INStartCallCallRecordToCallBackUnsupportedReason reason); + + [Export ("initWithCallRecordResolutionResult:")] + IntPtr Constructor (INCallRecordResolutionResult callRecordResolutionResult); + + // Fixes bug 43205. We need to return the inherited type not the base type + // because users won't be able to downcast easily + + [New] + [Static] + [Export ("needsValue")] + INStartCallCallRecordToCallBackResolutionResult NeedsValue { get; } + + [New] + [Static] + [Export ("notRequired")] + INStartCallCallRecordToCallBackResolutionResult NotRequired { get; } + + [New] + [Static] + [Export ("unsupported")] + INStartCallCallRecordToCallBackResolutionResult Unsupported { get; } + + [New] + [Static] + [Export ("unsupportedWithReason:")] + INStartCallCallRecordToCallBackResolutionResult GetUnsupported (nint reason); + + [New] + [Static] + [Export ("confirmationRequiredWithItemToConfirm:forReason:")] + INStartCallCallRecordToCallBackResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); + } + + + } diff --git a/src/linkpresentation.cs b/src/linkpresentation.cs index b4aaf3aa4149..6ded577b7743 100644 --- a/src/linkpresentation.cs +++ b/src/linkpresentation.cs @@ -23,6 +23,7 @@ namespace LinkPresentation { [ErrorDomain ("LPErrorDomain")] [Mac (10,15), iOS (13,0)] + [TV (14,0)] [Native] public enum LPErrorCode : long { Unknown = 1, @@ -32,6 +33,7 @@ public enum LPErrorCode : long { } [Mac (10,15), iOS (13,0)] + [TV (14,0)] [BaseType (typeof (NSObject))] interface LPLinkMetadata : NSCopying, NSSecureCoding { @@ -58,6 +60,7 @@ interface LPLinkMetadata : NSCopying, NSSecureCoding { } [Mac (10,15), iOS (13,0)] + [TV (14,0)] [BaseType (typeof (UIView))] interface LPLinkView { @@ -76,6 +79,7 @@ interface LPLinkView { } [Mac (10,15), iOS (13,0)] + [NoTV] [BaseType (typeof (NSObject))] interface LPMetadataProvider { diff --git a/src/mapkit.cs b/src/mapkit.cs index 2dc7d29392e7..9d2fbed7d35f 100644 --- a/src/mapkit.cs +++ b/src/mapkit.cs @@ -192,6 +192,14 @@ interface MKAnnotationView { [Export ("prepareForDisplay")] [RequiresSuper] void PrepareForDisplay (); + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("zPriority")] + float ZPriority { get; set; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("selectedZPriority")] + float SelectedZPriority { get; set; } } [ThreadSafe] @@ -547,13 +555,13 @@ interface MKMapView { [Export ("annotationsInMapRect:")] NSSet GetAnnotations (MKMapRect mapRect); -#if !MONOMAC + [Mac (11, 0)] [Export ("userTrackingMode")] MKUserTrackingMode UserTrackingMode { get; set; } + [Mac (11, 0)] [Export ("setUserTrackingMode:animated:")] void SetUserTrackingMode (MKUserTrackingMode trackingMode, bool animated); -#endif [iOS (7,0), Export ("camera", ArgumentSemantic.Copy)] MKMapCamera Camera { get; set; } @@ -647,6 +655,11 @@ interface MKMapView { [TV (13, 0), NoWatch, Mac (10, 15), iOS (13, 0)] [NullAllowed, Export ("pointOfInterestFilter", ArgumentSemantic.Copy)] MKPointOfInterestFilter PointOfInterestFilter { get; set; } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, NoiOS, Mac (11, 0)] + [Export ("showsPitchControl")] + bool ShowsPitchControl { get; set; } } [Static] @@ -724,10 +737,9 @@ interface MKMapViewDelegate { [Export ("mapView:didUpdateUserLocation:"), EventArgs ("MKUserLocation")] void DidUpdateUserLocation (MKMapView mapView, MKUserLocation userLocation); -#if !MONOMAC + [Mac (11, 0)] [Export ("mapView:didChangeUserTrackingMode:animated:"), EventArgs ("MMapViewUserTracking")] void DidChangeUserTrackingMode (MKMapView mapView, MKUserTrackingMode mode, bool animated); -#endif // !MONOMAC [iOS (7,0), Export ("mapView:rendererForOverlay:"), DelegateName ("MKRendererForOverlayDelegate"), DefaultValue (null)] MKOverlayRenderer OverlayRenderer (MKMapView mapView, IMKOverlay overlay); @@ -1124,6 +1136,15 @@ interface MKMultiPoint : MKGeoJsonObject { [Export ("getCoordinates:range:"), Internal] void GetCoords (IntPtr dest, NSRange range); + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("locationAtPointIndex:")] + nfloat GetLocation (nuint pointIndex); + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [return: BindAs (typeof (nfloat []))] + [Export ("locationsAtPointIndexes:")] + NSNumber[] GetLocations (NSIndexSet indexes); } [BaseType (typeof (NSObject))] @@ -1180,6 +1201,11 @@ interface MKLocalSearch { [Export ("initWithRequest:")] IntPtr Constructor (MKLocalSearchRequest request); + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("initWithPointsOfInterestRequest:")] + [DesignatedInitializer] + IntPtr Constructor (MKLocalPointsOfInterestRequest request); + [Export ("startWithCompletionHandler:")] [Async] void Start (MKLocalSearchCompletionHandler completionHandler); @@ -1252,6 +1278,14 @@ partial interface MKCircleRenderer { [Export ("circle")] MKCircle Circle { get; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("strokeStart")] + nfloat StrokeStart { get; set; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("strokeEnd")] + nfloat StrokeEnd { get; set; } } [TV (9,2)] @@ -1675,6 +1709,14 @@ partial interface MKPolygonRenderer { [Export ("polygon")] MKPolygon Polygon { get; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("strokeStart")] + nfloat StrokeStart { get; set; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("strokeEnd")] + nfloat StrokeEnd { get; set; } } [TV (9,2)] @@ -1687,6 +1729,29 @@ partial interface MKPolylineRenderer { [Export ("polyline")] MKPolyline Polyline { get; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("strokeStart")] + nfloat StrokeStart { get; set; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Export ("strokeEnd")] + nfloat StrokeEnd { get; set; } + } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (MKPolylineRenderer))] + partial interface MKGradientPolylineRenderer + { + [Export ("locations", ArgumentSemantic.Copy)] + [BindAs (typeof (nfloat[]))] + NSNumber[] Locations { get; } + + [Export ("colors", ArgumentSemantic.Copy)] + UIColor[] Colors { get; } + + [Export ("setColors:atLocations:")] + void SetColors (UIColor[] colors, [BindAs (typeof (nfloat[]))]NSNumber[] locations); } [ThreadSafe] @@ -1851,7 +1916,7 @@ interface MKClusterAnnotation : MKAnnotation { IntPtr Constructor (IMKAnnotation[] memberAnnotations); } - [NoTV][iOS (11,0)][NoMac][NoWatch] + [NoTV][iOS (11,0)][Mac (11, 0)][NoWatch] [BaseType (typeof (UIView))] [DisableDefaultCtor] interface MKCompassButton { @@ -1866,7 +1931,7 @@ interface MKCompassButton { MKFeatureVisibility CompassVisibility { get; set; } } - [TV (11,0)][NoWatch][iOS (11,0)][NoMac] + [TV (11,0)][NoWatch][iOS (11,0)][Mac (11, 0)] [BaseType (typeof (MKAnnotationView))] interface MKMarkerAnnotationView { @@ -2086,4 +2151,83 @@ interface MKMultiPolylineRenderer [Export ("multiPolyline")] MKMultiPolyline MultiPolyline { get; } } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (MKAnnotationView))] + interface MKUserLocationView { + [DesignatedInitializer] + [Export ("initWithAnnotation:reuseIdentifier:")] + IntPtr Constructor ([NullAllowed] IMKAnnotation annotation, [NullAllowed] string reuseIdentifier); + + [Export ("initWithFrame:")] + IntPtr Constructor (CGRect frame); + } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface MKLocalPointsOfInterestRequest : NSCopying + { + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Field ("MKPointsOfInterestRequestMaxRadius")] + double RequestMaxRadius { get; } + + [Export ("initWithCenterCoordinate:radius:")] + [DesignatedInitializer] + IntPtr Constructor (CLLocationCoordinate2D centerCoordinate, double radius); + + [Export ("initWithCoordinateRegion:")] + [DesignatedInitializer] + IntPtr Constructor (MKCoordinateRegion region); + + [Export ("coordinate")] + CLLocationCoordinate2D Coordinate { get; } + + [Export ("radius")] + double Radius { get; } + + [Export ("region")] + MKCoordinateRegion Region { get; } + + [NullAllowed, Export ("pointOfInterestFilter", ArgumentSemantic.Copy)] + MKPointOfInterestFilter PointOfInterestFilter { get; set; } + } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, NoiOS, Mac (11, 0)] + [DisableDefaultCtor] + [BaseType (typeof (UIView))] + interface MKPitchControl + { + [DesignatedInitializer] + [Export ("initWithFrame:")] + IntPtr Constructor (CGRect frameRect); + + [Static] + [Export ("pitchControlWithMapView:")] + MKPitchControl Create ([NullAllowed] MKMapView mapView); + + [NullAllowed, Export ("mapView", ArgumentSemantic.Weak)] + MKMapView MapView { get; set; } + } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, NoiOS, Mac (11, 0)] + [DisableDefaultCtor] + [BaseType (typeof (UIView))] + interface MKZoomControl + { + + [DesignatedInitializer] + [Export ("initWithFrame:")] + IntPtr Constructor (CGRect frameRect); + + [Static] + [Export ("zoomControlWithMapView:")] + MKZoomControl Create ([NullAllowed] MKMapView mapView); + + [NullAllowed, Export ("mapView", ArgumentSemantic.Weak)] + MKMapView MapView { get; set; } + } + } diff --git a/src/mediaplayer.cs b/src/mediaplayer.cs index f7b1546380da..618d3b58bc09 100644 --- a/src/mediaplayer.cs +++ b/src/mediaplayer.cs @@ -24,9 +24,14 @@ namespace MediaPlayer { [Mac (10,12,2)] // type exists only to expose fields [BaseType (typeof (NSObject))] -#if IOS || WATCH - // introduced in 4.2 +#if !MONOMAC +#if XAMCORE_4_0 + [NoWatch] // marked as unavailable in xcode 12 beta 1 +#else [Watch (5,0)] + [Obsoleted (PlatformName.WatchOS, 7,0, message: "Removed in Xcode 12.")] +#endif // XAMCORE_4_0 + [TV (14,0)] interface MPMediaEntity : NSSecureCoding { #else interface MPMediaItem : NSSecureCoding { @@ -36,25 +41,32 @@ interface MPMediaItem : NSSecureCoding { bool CanFilterByProperty (NSString property); [Export ("valueForProperty:")] + [return: NullAllowed] NSObject ValueForProperty (NSString property); [Export ("enumerateValuesForProperties:usingBlock:")] void EnumerateValues (NSSet propertiesToEnumerate, MPMediaItemEnumerator enumerator); [iOS (8,0)] + [return: NullAllowed] [Export ("objectForKeyedSubscript:")] NSObject GetObject (NSObject key); +#if XAMCORE_4_0 + [NoWatch] // marked as unavailable in xcode 12 beta 1 +#else + [Obsoleted (PlatformName.WatchOS, 7,0, message: "Removed in Xcode 12.")] +#endif [Field ("MPMediaEntityPropertyPersistentID")] NSString PropertyPersistentID { get; } - [NoiOS, NoMac, NoTV, Watch (5,0)] + [NoiOS, NoMac, Watch (5,0)] [Export ("persistentID")] ulong PersistentID { get; } -#if IOS || WATCH +#if IOS || WATCH || TVOS } -#if MONOMAC || TVOS || WATCH +#if MONOMAC || WATCH [Mac (10,12,2)] [Watch (5,0)] [Static] @@ -453,9 +465,14 @@ interface MPMediaPlaylist : NSSecureCoding { [Async] [Export ("addMediaItems:completionHandler:")] void AddMediaItems (MPMediaItem[] mediaItems, [NullAllowed] Action completionHandler); + + [iOS (14,0)] + [NullAllowed, Export ("cloudGlobalID")] + string CloudGlobalId { get; } } - [NoMac, Watch (5,0)] + [Mac (10,16)] + [Watch (5,0)] [Static] interface MPMediaPlaylistProperty { [Field ("MPMediaPlaylistPropertyPersistentID")] @@ -479,6 +496,10 @@ interface MPMediaPlaylistProperty { [NoTV] // do not work on AppleTV devices (only in simulator) [Field ("MPMediaPlaylistPropertyAuthorDisplayName")] NSString AuthorDisplayName { get; } + + [iOS (14,0)][TV (14,0)][Watch (7,0)] + [Field ("MPMediaPlaylistPropertyCloudGlobalID")] + NSString CloudGlobalId { get; } } [NoMac] @@ -721,9 +742,15 @@ interface MPMoviePlayerTimedMetadataEventArgs { MPTimedMetadata [] TimedMetadata { get; } } - // no [Model] yet... it can be easily created in user code (all abstract) if needed [NoMac] +#if XAMCORE_4_0 + [NoWatch] // marked as unavailable in xcode 12 beta 1 + [NoTV] +#else [Watch (5,0)] + [Obsoleted (PlatformName.TvOS, 14,0, message: "Removed in Xcode 12.")] + [Obsoleted (PlatformName.WatchOS, 5,0, message: "Removed in Xcode 12.")] +#endif [Protocol] interface MPMediaPlayback { [Abstract] @@ -1135,7 +1162,7 @@ interface MPMoviePlayerViewController { #endif [NoMac] - [NoTV] + [TV (14,0)] [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1143,6 +1170,7 @@ interface MPMusicPlayerController : MPMediaPlayback { [Export ("init")] [Deprecated (PlatformName.iOS, 11,3)] + [NoTV] IntPtr Constructor (); [Static, Export ("applicationMusicPlayer")] @@ -1155,6 +1183,7 @@ interface MPMusicPlayerController : MPMediaPlayback { [Static, Export ("iPodMusicPlayer")] [Availability (Deprecated = Platform.iOS_8_0, Message="Use 'SystemMusicPlayer' instead.")] + [NoTV] MPMusicPlayerController iPodMusicPlayer { get; } [iOS (8,0)] @@ -1181,9 +1210,11 @@ interface MPMusicPlayerController : MPMediaPlayback { [Export ("nowPlayingItem", ArgumentSemantic.Copy), NullAllowed] MPMediaItem NowPlayingItem { get; set; } + [NoTV] [Export ("setQueueWithQuery:")] void SetQueue (MPMediaQuery query); + [NoTV] [Export ("setQueueWithItemCollection:")] void SetQueue (MPMediaItemCollection collection); @@ -1231,13 +1262,14 @@ interface MPMusicPlayerController : MPMediaPlayback { [Notification] NSString NowPlayingItemDidChangeNotification { get; } + [NoTV] [Field ("MPMusicPlayerControllerVolumeDidChangeNotification")] [Notification] NSString VolumeDidChangeNotification { get; } } #if !MONOMAC && !WATCH - [NoTV] + [TV (14,0)] [BaseType (typeof (UIView))] interface MPVolumeView { [Export ("initWithFrame:")] @@ -1261,12 +1293,15 @@ interface MPVolumeView { [Export ("setVolumeThumbImage:forState:")] void SetVolumeThumbImage ([NullAllowed] UIImage image, UIControlState state); + [return: NullAllowed] [Export ("minimumVolumeSliderImageForState:")] UIImage GetMinimumVolumeSliderImage (UIControlState state); + [return: NullAllowed] [Export ("maximumVolumeSliderImageForState:")] UIImage GetMaximumVolumeSliderImage (UIControlState state); + [return: NullAllowed] [Export ("volumeThumbImageForState:")] UIImage GetVolumeThumbImage (UIControlState state); @@ -1281,6 +1316,7 @@ interface MPVolumeView { void SetRouteButtonImage ([NullAllowed] UIImage image, UIControlState state); [Deprecated (PlatformName.iOS, 13, 0, message: "See 'AVRoutePickerView' for possible replacements.")] + [return: NullAllowed] [Export ("routeButtonImageForState:")] UIImage GetRouteButtonImage (UIControlState state); @@ -1449,6 +1485,7 @@ interface MPContentItem { [Export ("initWithIdentifier:")] IntPtr Constructor (string identifier); + [NullAllowed] [Export ("artwork")] MPMediaItemArtwork Artwork { get; set; } @@ -1458,9 +1495,11 @@ interface MPContentItem { [Export ("playbackProgress")] float PlaybackProgress { get; set; } // float, not CGFloat + [NullAllowed] [Export ("subtitle")] string Subtitle { get; set; } + [NullAllowed] [Export ("title")] string Title { get; set; } @@ -1510,6 +1549,7 @@ interface MPPlayableContentDataSource { [NoMac] [iOS (10,0)] + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'CarPlay' API instead.")] [Async] [Export ("contentItemForIdentifier:completionHandler:")] void GetContentItem (string identifier, Action completionHandler); @@ -1526,10 +1566,13 @@ interface IMPPlayableContentDataSource { [Model] [Protocol] interface MPPlayableContentDelegate { + + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'CarPlay' API instead.")] [Export ("playableContentManager:initiatePlaybackOfContentItemAtIndexPath:completionHandler:")] void InitiatePlaybackOfContentItem (MPPlayableContentManager contentManager, NSIndexPath indexPath, Action completionHandler); [iOS (8,4)] + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'CarPlay' API instead.")] [Export ("playableContentManager:didUpdateContext:")] void ContextUpdated (MPPlayableContentManager contentManager, MPPlayableContentManagerContext context); @@ -1548,6 +1591,7 @@ interface MPPlayableContentDelegate { [NoTV] [NoWatch] [iOS (7,1)] + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'CarPlay' API instead.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: -init is invalid. Use +sharedManager. <- [sic] interface MPPlayableContentManager { @@ -1592,6 +1636,7 @@ interface MPPlayableContentManager { [NoTV] [NoWatch] [iOS (8,4)] + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'CarPlay' API instead.")] [BaseType (typeof(NSObject))] interface MPPlayableContentManagerContext { [Export ("enforcedContentItemsCount")] @@ -2015,9 +2060,9 @@ interface MPMediaPlaylistCreationMetadata { } [NoMac] - [NoTV] [NoWatch] [iOS (10,1)] + [TV (14,0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface MPMusicPlayerQueueDescriptor : NSSecureCoding { @@ -2057,9 +2102,9 @@ interface MPMusicPlayerMediaItemQueueDescriptor } [NoMac] - [NoTV] [NoWatch] [iOS (10,1)] + [TV (14,0)] [BaseType (typeof(MPMusicPlayerQueueDescriptor))] interface MPMusicPlayerStoreQueueDescriptor { @@ -2079,10 +2124,10 @@ interface MPMusicPlayerStoreQueueDescriptor void SetEndTime (double endTime, string storeID); } - [NoTV] [NoMac] [NoWatch] [iOS (10,3)] + [TV (14,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface MPMusicPlayerControllerQueue @@ -2095,10 +2140,10 @@ interface MPMusicPlayerControllerQueue NSString DidChangeNotification { get; } } - [NoTV] [NoMac] [NoWatch] [iOS (10,3)] + [TV (14,0)] [BaseType (typeof(MPMusicPlayerControllerQueue))] interface MPMusicPlayerControllerMutableQueue { @@ -2109,10 +2154,10 @@ interface MPMusicPlayerControllerMutableQueue void RemoveItem (MPMediaItem item); } - [NoTV] [NoMac] [NoWatch] [iOS (10,3)] + [TV (14,0)] [BaseType (typeof(MPMusicPlayerController))] interface MPMusicPlayerApplicationController { @@ -2121,8 +2166,9 @@ interface MPMusicPlayerApplicationController void Perform (Action queueTransaction, Action completionHandler); } - [NoTV][NoMac] + [NoMac] [iOS (11,0)] + [TV (14,0)] [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2134,9 +2180,10 @@ interface MPMusicPlayerPlayParameters : NSSecureCoding { NSDictionary Dictionary { get; } } - [NoTV][NoMac] + [NoMac] [NoWatch] [iOS (11,0)] + [TV (14,0)] [BaseType (typeof (MPMusicPlayerQueueDescriptor))] [DisableDefaultCtor] interface MPMusicPlayerPlayParametersQueueDescriptor { @@ -2158,7 +2205,8 @@ interface MPMusicPlayerPlayParametersQueueDescriptor { interface IMPSystemMusicPlayerController {} - [NoTV][NoMac] + [NoTV] + [NoMac] // headers have no availability macros on the protocol itself but the only member is not available on macOS [iOS (11,0), Watch (5,0)] [Protocol] interface MPSystemMusicPlayerController { @@ -2173,6 +2221,7 @@ interface MPSystemMusicPlayerController { [TV (10,0,1)][iOS (10,1)] [NoWatch][NoMac] interface NSUserActivity_MediaPlayerAdditions { + [return: NullAllowed] [Export ("externalMediaContentIdentifier")] NSString GetExternalMediaContentIdentifier (); @@ -2199,4 +2248,61 @@ interface AVMediaSelectionGroup_MPNowPlayingInfoLanguageOptionAdditions { [Export ("makeNowPlayingInfoLanguageOptionGroup")] MPNowPlayingInfoLanguageOptionGroup CreateNowPlayingInfoLanguageOptionGroup (); } + + interface IMPNowPlayingSessionDelegate {} + + [TV (14,0)] + [NoWatch, NoMac, NoiOS] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface MPNowPlayingSessionDelegate { + + [Export ("nowPlayingSessionDidChangeActive:")] + void DidChangeActive (MPNowPlayingSession nowPlayingSession); + + [Export ("nowPlayingSessionDidChangeCanBecomeActive:")] + void DidChangeCanBecomeActive (MPNowPlayingSession nowPlayingSession); + } + + [TV (14,0)] + [NoWatch, NoMac, NoiOS] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MPNowPlayingSession { + + [Export ("initWithPlayers:")] + IntPtr Constructor (AVPlayer[] players); + + [Export ("players", ArgumentSemantic.Strong)] + AVPlayer[] Players { get; } + + [Wrap ("WeakDelegate")] + [NullAllowed] + IMPNowPlayingSessionDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [Export ("nowPlayingInfoCenter", ArgumentSemantic.Strong)] + MPNowPlayingInfoCenter NowPlayingInfoCenter { get; } + + [Export ("remoteCommandCenter", ArgumentSemantic.Strong)] + MPRemoteCommandCenter RemoteCommandCenter { get; } + + [Export ("canBecomeActive")] + bool CanBecomeActive { get; } + + [Export ("active")] + bool Active { [Bind ("isActive")] get; } + + [Async] + [Export ("becomeActiveIfPossibleWithCompletion:")] + void BecomeActiveIfPossible ([NullAllowed] Action completion); + + [Export ("addPlayer:")] + void AddPlayer (AVPlayer player); + + [Export ("removePlayer:")] + void RemovePlayer (AVPlayer player); + } } diff --git a/src/mediasetup.cs b/src/mediasetup.cs new file mode 100644 index 000000000000..9aead8ec0db4 --- /dev/null +++ b/src/mediasetup.cs @@ -0,0 +1,70 @@ +using System; +using Foundation; +using ObjCRuntime; +using UIKit; + +namespace MediaSetup { + + [NoTV][NoWatch][NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MSServiceAccount { + + [Export ("initWithServiceName:accountName:")] + [DesignatedInitializer] + IntPtr Constructor (string serviceName, string accountName); + + [Export ("serviceName")] + string ServiceName { get; } + + [Export ("accountName")] + string AccountName { get; } + + [NullAllowed, Export ("clientID")] + string ClientId { get; set; } + + [NullAllowed, Export ("clientSecret")] + string ClientSecret { get; set; } + + [NullAllowed, Export ("configurationURL", ArgumentSemantic.Copy)] + NSUrl ConfigurationUrl { get; set; } + + [NullAllowed, Export ("authorizationTokenURL", ArgumentSemantic.Copy)] + NSUrl AuthorizationTokenUrl { get; set; } + + [NullAllowed, Export ("authorizationScope")] + string AuthorizationScope { get; set; } + } + + interface IMSAuthenticationPresentationContext {} + + [NoTV][NoWatch][NoMac] + [iOS (14,0)] + [Protocol] + interface MSAuthenticationPresentationContext { + + [Abstract] + [NullAllowed, Export ("presentationAnchor")] + UIWindow PresentationAnchor { get; } + } + + [NoTV][NoWatch][NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MSSetupSession { + + [Export ("initWithServiceAccount:")] + IntPtr Constructor (MSServiceAccount serviceAccount); + + [Export ("startWithError:")] + bool Start ([NullAllowed] out NSError error); + + [NullAllowed, Export ("presentationContext", ArgumentSemantic.Weak)] + IMSAuthenticationPresentationContext PresentationContext { get; set; } + + [Export ("account", ArgumentSemantic.Strong)] + MSServiceAccount Account { get; } + } +} diff --git a/src/messageui.cs b/src/messageui.cs index abea001b87da..d6ea09332f04 100644 --- a/src/messageui.cs +++ b/src/messageui.cs @@ -71,7 +71,7 @@ interface MFMessageAvailabilityChangedEventArgs { [BaseType (typeof (UINavigationController))] interface MFMessageComposeViewController : UIAppearance { - [Export ("messageComposeDelegate", ArgumentSemantic.Assign), NullAllowed] + [Export ("messageComposeDelegate", ArgumentSemantic.Weak), NullAllowed] NSObject WeakMessageComposeDelegate { get; set; } [Wrap ("WeakMessageComposeDelegate")] diff --git a/src/metal.cs b/src/metal.cs index 64dafeacc33c..56d266740d18 100644 --- a/src/metal.cs +++ b/src/metal.cs @@ -371,9 +371,52 @@ partial interface MTLCommandBuffer { #if XAMCORE_4_0 [Abstract] // @required but we can't add abstract members in C# and keep binary compatibility #endif - [NoMac, iOS (13, 0), NoTV] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Mac (11,0), iOS (13, 0), NoTV] [NullAllowed, Export ("resourceStateCommandEncoder")] IMTLResourceStateCommandEncoder ResourceStateCommandEncoder { get; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("errorOptions")] + MTLCommandBufferErrorOption ErrorOptions { get; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("logs")] + IMTLLogContainer Logs { get; } + + [Mac (11,0), iOS (14,0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("computeCommandEncoderWithDescriptor:")] + IMTLComputeCommandEncoder CreateComputeCommandEncoder (MTLComputePassDescriptor computePassDescriptor); + + [Mac (11,0), iOS (14,0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("blitCommandEncoderWithDescriptor:")] + IMTLBlitCommandEncoder CreateBlitCommandEncoder (MTLBlitPassDescriptor blitPassDescriptor); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("resourceStateCommandEncoderWithDescriptor:")] + IMTLResourceStateCommandEncoder CreateResourceStateCommandEncoder (MTLResourceStatePassDescriptor resourceStatePassDescriptor); + + [Mac (11, 0), iOS (14, 0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("accelerationStructureCommandEncoder")] + IMTLAccelerationStructureCommandEncoder CreateAccelerationStructureCommandEncoder (); } interface IMTLCommandQueue {} @@ -402,6 +445,14 @@ partial interface MTLCommandQueue { [Deprecated (PlatformName.MacOSX, 10, 13, message : "Use 'MTLCaptureScope' instead.")] [Abstract, Export ("insertDebugCaptureBoundary")] void InsertDebugCaptureBoundary (); + + [Mac (11,0), iOS (14,0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("commandBufferWithDescriptor:")] + [return: NullAllowed] + IMTLCommandBuffer CreateCommandBuffer (MTLCommandBufferDescriptor descriptor); } interface IMTLComputeCommandEncoder {} @@ -534,7 +585,8 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { [Export ("useHeaps:count:")] void UseHeaps (IMTLHeap[] heaps, nuint count); - [iOS (11,0), NoTV, NoMac, NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [iOS (11,0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif @@ -555,14 +607,14 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { [Export ("memoryBarrierWithResources:count:")] void MemoryBarrier (IMTLResource[] resources, nuint count); - [TV (13,0), NoMac, iOS (13,0)] + [TV (13,0), Mac (11,0), iOS (13,0)] #if XAMCORE_4_0 [Abstract] #endif [Export ("executeCommandsInBuffer:withRange:")] void ExecuteCommands (IMTLIndirectCommandBuffer indirectCommandBuffer, NSRange executionRange); - [TV (13,0), NoMac, iOS (13,0)] + [TV (13,0), Mac (11,0), iOS (13,0)] #if XAMCORE_4_0 [Abstract] #endif @@ -572,7 +624,7 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { #if XAMCORE_4_0 [Abstract] #endif - [NoiOS, NoTV, Mac (10,15)] + [iOS (14,0), TV (14,0), Mac (10,15)] [Export ("sampleCountersInBuffer:atSampleIndex:withBarrier:")] #if XAMCORE_4_0 void SampleCounters (IMTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier); @@ -580,6 +632,42 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { [Obsolete ("Use the overload that takes an IMTLCounterSampleBuffer instead.")] void SampleCounters (MTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier); #endif + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setVisibleFunctionTable:atBufferIndex:")] + void SetVisibleFunctionTable ([NullAllowed] IMTLVisibleFunctionTable visibleFunctionTable, nuint bufferIndex); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setVisibleFunctionTables:withBufferRange:")] + void SetVisibleFunctionTables (IMTLVisibleFunctionTable[] visibleFunctionTables, NSRange range); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setIntersectionFunctionTable:atBufferIndex:")] + void SetIntersectionFunctionTable ([NullAllowed] IMTLIntersectionFunctionTable intersectionFunctionTable, nuint bufferIndex); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setIntersectionFunctionTables:withBufferRange:")] + void SetIntersectionFunctionTables (IMTLIntersectionFunctionTable[] intersectionFunctionTables, NSRange range); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setAccelerationStructure:atBufferIndex:")] + void SetAccelerationStructure ([NullAllowed] IMTLAccelerationStructure accelerationStructure, nuint bufferIndex); + } [iOS (8,0)][Mac (10,11)] @@ -620,19 +708,47 @@ partial interface MTLComputePipelineState { [Export ("staticThreadgroupMemoryLength")] nuint StaticThreadgroupMemoryLength { get; } - [iOS (11,0), NoTV, NoMac, NoWatch] + [iOS (11,0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("imageblockMemoryLengthForDimensions:")] nuint GetImageblockMemoryLength (MTLSize imageblockDimensions); - [TV (13, 0), NoMac, iOS (13, 0)] + [TV (13, 0), Mac (11,0), iOS (13, 0)] #if XAMCORE_4_0 [Abstract] #endif [Export ("supportIndirectCommandBuffers")] bool SupportIndirectCommandBuffers { get; } + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("functionHandleWithFunction:")] + IMTLFunctionHandle CreateFunctionHandle (IMTLFunction function); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newComputePipelineStateWithAdditionalBinaryFunctions:error:")] + IMTLComputePipelineState CreateComputePipelineState (IMTLFunction[] functions, [NullAllowed] out NSError error); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newVisibleFunctionTableWithDescriptor:")] + IMTLVisibleFunctionTable CreateVisibleFunctionTable (MTLVisibleFunctionTableDescriptor descriptor); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newIntersectionFunctionTableWithDescriptor:")] + IMTLIntersectionFunctionTable CreateIntersectionFunctionTable (MTLIntersectionFunctionTableDescriptor descriptor); } interface IMTLBlitCommandEncoder {} @@ -750,7 +866,7 @@ partial interface MTLBlitCommandEncoder : MTLCommandEncoder { [Abstract] #endif [Unavailable (PlatformName.MacCatalyst)] - [NoMac, NoTV, iOS (13,0)] + [Mac (11,0), NoTV, iOS (13,0)] [Advice ("This API is not available when using UIKit on macOS.")] [Export ("getTextureAccessCounters:region:mipLevel:slice:resetCounters:countersBuffer:countersBufferOffset:")] void GetTextureAccessCounters (IMTLTexture texture, MTLRegion region, nuint mipLevel, nuint slice, bool resetCounters, IMTLBuffer countersBuffer, nuint countersBufferOffset); @@ -759,7 +875,7 @@ partial interface MTLBlitCommandEncoder : MTLCommandEncoder { [Abstract] #endif [Unavailable (PlatformName.MacCatalyst)] - [NoMac, NoTV, iOS (13,0)] + [Mac (11,0), NoTV, iOS (13,0)] [Advice ("This API is not available when using UIKit on macOS.")] [Export ("resetTextureAccessCounters:region:mipLevel:slice:")] void ResetTextureAccessCounters (IMTLTexture texture, MTLRegion region, nuint mipLevel, nuint slice); @@ -781,14 +897,14 @@ partial interface MTLBlitCommandEncoder : MTLCommandEncoder { #if XAMCORE_4_0 [Abstract] #endif - [NoiOS, NoTV, Mac (10,15)] + [iOS (14,0), TV (14,0), Mac (10,15)] [Export ("sampleCountersInBuffer:atSampleIndex:withBarrier:")] void SampleCounters (MTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier); #if XAMCORE_4_0 [Abstract] #endif - [NoiOS, NoTV, Mac (10,15)] + [iOS (14,0), TV (14,0), Mac (10,15)] [Export ("resolveCounters:inRange:destinationBuffer:destinationOffset:")] void ResolveCounters (MTLCounterSampleBuffer sampleBuffer, NSRange range, IMTLBuffer destinationBuffer, nuint destinationOffset); } @@ -1119,7 +1235,7 @@ partial interface MTLDevice { [Export ("maxArgumentBufferSamplerCount")] nuint MaxArgumentBufferSamplerCount { get; } -[Mac (10,13), iOS (11,0), TV (11,0), NoWatch] + [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif @@ -1216,7 +1332,8 @@ partial interface MTLDevice { NSString DeviceWasRemoved { get; } #endif - [iOS (11,0), NoTV, NoMac, NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [iOS (11,0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif @@ -1225,7 +1342,8 @@ partial interface MTLDevice { [return: Release] IMTLRenderPipelineState CreateRenderPipelineState (MTLTileRenderPipelineDescriptor descriptor, MTLPipelineOption options, [NullAllowed] out MTLRenderPipelineReflection reflection, [NullAllowed] out NSError error); - [iOS (11,0), NoTV, NoMac, NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [iOS (11,0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif @@ -1251,8 +1369,8 @@ partial interface MTLDevice { #if XAMCORE_4_0 [Abstract] #endif - [Unavailable (PlatformName.MacCatalyst)] - [NoMac, NoTV, iOS (13,0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Mac (11,0), NoTV, iOS (13,0)] [Advice ("This API is not available when using UIKit on macOS.")] [Export ("sparseTileSizeWithTextureType:pixelFormat:sampleCount:")] MTLSize GetSparseTileSize (MTLTextureType textureType, MTLPixelFormat pixelFormat, nuint sampleCount); @@ -1260,9 +1378,8 @@ partial interface MTLDevice { #if XAMCORE_4_0 [Abstract] #endif - [Unavailable (PlatformName.MacCatalyst)] - [NoMac, NoTV, iOS (13, 0)] - [Advice ("This API is not available when using UIKit on macOS.")] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Mac (11,0), NoTV, iOS (13, 0)] [Export ("sparseTileSizeInBytes")] nuint SparseTileSizeInBytes { get; } @@ -1275,14 +1392,14 @@ partial interface MTLDevice { [return: NullAllowed] IMTLRasterizationRateMap CreateRasterizationRateMap (MTLRasterizationRateMapDescriptor descriptor); - [Unavailable (PlatformName.MacCatalyst)] - [NoMac, NoTV, iOS (13,0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Mac (11,0), NoTV, iOS (13,0)] [Advice ("This API is not available when using UIKit on macOS.")] [Export ("convertSparseTileRegions:toPixelRegions:withTileSize:numRegions:")] void ConvertSparseTileRegions (IntPtr tileRegions, IntPtr pixelRegions, MTLSize tileSize, nuint numRegions); - [Unavailable (PlatformName.MacCatalyst)] - [NoMac, NoTV, iOS (13,0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Mac (11,0), NoTV, iOS (13,0)] [Advice ("This API is not available when using UIKit on macOS.")] [Export ("convertSparsePixelRegions:toTileRegions:withTileSize:alignmentMode:numRegions:")] void ConvertSparsePixelRegions (IntPtr pixelRegions, IntPtr tileRegions, MTLSize tileSize, MTLSparseTextureRegionAlignmentMode mode, nuint numRegions); @@ -1304,14 +1421,14 @@ partial interface MTLDevice { #if XAMCORE_4_0 [Abstract] #endif - [NoiOS, NoTV, Mac (10, 15)] + [iOS (14,0), NoTV, Mac (10, 15)] [Export ("barycentricCoordsSupported")] bool BarycentricCoordsSupported { [Bind ("areBarycentricCoordsSupported")] get; } #if XAMCORE_4_0 [Abstract] #endif - [NoiOS, NoTV, Mac (10, 15)] + [iOS (14,0), NoTV, Mac (10, 15)] [Export ("supportsShaderBarycentricCoordinates")] bool SupportsShaderBarycentricCoordinates { get; } @@ -1332,7 +1449,7 @@ partial interface MTLDevice { #if XAMCORE_4_0 [Abstract] #endif - [NoiOS, NoTV, Mac (10, 15)] + [iOS (14,0), TV (14,0), Mac (10, 15)] [NullAllowed, Export ("counterSets")] #if XAMCORE_4_0 IMTLCounterSet[] CounterSets { get; } @@ -1344,7 +1461,7 @@ partial interface MTLDevice { #if XAMCORE_4_0 [Abstract] #endif - [NoiOS, NoTV, Mac (10,15)] + [iOS (14,0), TV (14,0), Mac (10,15)] [Export ("newCounterSampleBufferWithDescriptor:error:")] [return: NullAllowed] #if XAMCORE_4_0 @@ -1357,7 +1474,7 @@ partial interface MTLDevice { #if XAMCORE_4_0 [Abstract] #endif - [NoiOS, NoTV, Mac (10,15)] + [iOS (14,0), TV (14,0), Mac (10,15)] [Export ("sampleTimestamps:gpuTimestamp:")] void GetSampleTimestamps (nuint cpuTimestamp, nuint gpuTimestamp); @@ -1388,6 +1505,117 @@ partial interface MTLDevice { [NoiOS, NoTV, Mac (10, 15)] [Export ("locationNumber")] nuint LocationNumber { get; } + + [NoiOS, Mac (11, 0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("supports32BitFloatFiltering")] + bool Supports32BitFloatFiltering { get; } + + [NoiOS, Mac (11, 0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("supports32BitMSAA")] + bool Supports32BitMsaa { get; } + + [NoiOS, Mac (11, 0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("supportsBCTextureCompression")] + bool SupportsBCTextureCompression { get; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("supportsPullModelInterpolation")] + bool SupportsPullModelInterpolation { get; } + + [Mac (11,0), iOS (14,0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("supportsCounterSampling:")] + bool SupportsCounterSampling (MTLCounterSamplingPoint samplingPoint); + + [Mac (11, 0), iOS (14, 0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("supportsDynamicLibraries")] + bool SupportsDynamicLibraries { get; } + + [Mac (11,0), iOS (14,0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newDynamicLibrary:error:")] + [return: NullAllowed] + IMTLDynamicLibrary CreateDynamicLibrary (IMTLLibrary library, [NullAllowed] out NSError error); + + [Mac (11,0), iOS (14,0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newDynamicLibraryWithURL:error:")] + [return: NullAllowed] + IMTLDynamicLibrary CreateDynamicLibrary (NSUrl url, [NullAllowed] out NSError error); + + [Mac (11,0), iOS (14,0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newBinaryArchiveWithDescriptor:error:")] + [return: NullAllowed] + IMTLBinaryArchive CreateBinaryArchive (MTLBinaryArchiveDescriptor descriptor, [NullAllowed] out NSError error); + + [Mac (11, 0), iOS (14, 0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("supportsRaytracing")] + bool SupportsRaytracing { get; } + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("accelerationStructureSizesWithDescriptor:")] + MTLAccelerationStructureSizes CreateAccelerationStructureSizes (MTLAccelerationStructureDescriptor descriptor); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newAccelerationStructureWithSize:")] + [return: NullAllowed] + IMTLAccelerationStructure CreateAccelerationStructure (nuint size); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newAccelerationStructureWithDescriptor:")] + [return: NullAllowed] + IMTLAccelerationStructure CreateAccelerationStructure (MTLAccelerationStructureDescriptor descriptor); + + [Mac (11, 0), iOS (14, 0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("supportsFunctionPointers")] + bool SupportsFunctionPointers { get; } + + [NoiOS, Mac (11, 0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("supportsQueryTextureLOD")] + bool SupportsQueryTextureLod { get; } + } interface IMTLDrawable {} @@ -1592,7 +1820,7 @@ partial interface MTLTexture : MTLResource { [Abstract] #endif [Unavailable (PlatformName.MacCatalyst)] - [NoMac, NoTV, iOS (13, 0)] + [Mac (11,0), NoTV, iOS (13, 0)] [Advice ("This API is not available when using UIKit on macOS.")] [Export ("firstMipmapInTail")] nuint FirstMipmapInTail { get; } @@ -1601,7 +1829,7 @@ partial interface MTLTexture : MTLResource { [Abstract] #endif [Unavailable (PlatformName.MacCatalyst)] - [NoMac, NoTV, iOS (13, 0)] + [Mac (11,0), NoTV, iOS (13, 0)] [Advice ("This API is not available when using UIKit on macOS.")] [Export ("tailSizeInBytes")] nuint TailSizeInBytes { get; } @@ -1610,7 +1838,7 @@ partial interface MTLTexture : MTLResource { [Abstract] #endif [Unavailable (PlatformName.MacCatalyst)] - [NoMac, NoTV, iOS (13, 0)] + [Mac (11,0), NoTV, iOS (13, 0)] [Advice ("This API is not available when using UIKit on macOS.")] [Export ("isSparse")] bool IsSparse { get; } @@ -1747,13 +1975,11 @@ partial interface MTLSamplerDescriptor : NSCopying { [Export ("lodMaxClamp")] float LodMaxClamp { get; set; } /* float, not CGFloat */ -#if !MONOMAC - [iOS (9,0)] + [iOS (9,0), Mac (11,0)] [Export ("lodAverage")] bool LodAverage { get; set; } -#endif - [NoiOS, NoTV, NoWatch, Mac (10,12)] + [iOS (14,0), NoTV, NoWatch, Mac (10,12)] [Export ("borderColor", ArgumentSemantic.Assign)] MTLSamplerBorderColor BorderColor { get; set; } @@ -1880,6 +2106,11 @@ partial interface MTLRenderPipelineDescriptor : NSCopying { [Mac (10,15,4), NoTV, iOS (13, 0)] [Export ("maxVertexAmplificationCount")] nuint MaxVertexAmplificationCount { get; set; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] + [NullAllowed, Export ("binaryArchives", ArgumentSemantic.Copy)] + IMTLBinaryArchive[] BinaryArchives { get; set; } + } [iOS (8,0)][Mac (10,11)] @@ -1905,28 +2136,28 @@ partial interface MTLRenderPipelineState { [Abstract, Export ("device")] IMTLDevice Device { get; } - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("maxTotalThreadsPerThreadgroup")] nuint MaxTotalThreadsPerThreadgroup { get; } - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("threadgroupSizeMatchesTileSize")] bool ThreadgroupSizeMatchesTileSize { get; } - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("imageblockSampleLength")] nuint ImageblockSampleLength { get; } - [iOS (11,0), NoTV, NoMac, NoWatch] + [iOS (11,0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif @@ -2185,6 +2416,13 @@ partial interface MTLFunction { [Export ("newArgumentEncoderWithBufferIndex:reflection:")] [return: Release] IMTLArgumentEncoder CreateArgumentEncoder (nuint bufferIndex, [NullAllowed] out MTLArgument reflection); + + [Mac (11, 0), iOS (14, 0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("options")] + MTLFunctionOptions Options { get; } } interface IMTLLibrary {} @@ -2225,6 +2463,51 @@ partial interface MTLLibrary { [Field ("MTLLibraryErrorDomain")] NSString ErrorDomain { get; } + + [Mac (11,0), iOS (14,0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newFunctionWithDescriptor:completionHandler:")] + void CreateFunction (MTLFunctionDescriptor descriptor, Action completionHandler); + + [Mac (11,0), iOS (14,0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newFunctionWithDescriptor:error:")] + [return: NullAllowed] + IMTLFunction CreateFunction (MTLFunctionDescriptor descriptor, [NullAllowed] out NSError error); + + // protocol, so no Async + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newIntersectionFunctionWithDescriptor:completionHandler:")] + void CreateIntersectionFunction (MTLIntersectionFunctionDescriptor descriptor, Action completionHandler); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newIntersectionFunctionWithDescriptor:error:")] + [return: NullAllowed] + IMTLFunction CreateIntersectionFunction (MTLIntersectionFunctionDescriptor descriptor, [NullAllowed] out NSError error); + + [Mac (11, 0), iOS (14, 0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("type")] + MTLLibraryType Type { get; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [NullAllowed, Export ("installName")] + string InstallName { get; } } [iOS (8,0)][Mac (10,11)] @@ -2245,6 +2528,23 @@ partial interface MTLCompileOptions : NSCopying { [iOS (9,0)][Mac (10,11)] [Export ("languageVersion", ArgumentSemantic.Assign)] MTLLanguageVersion LanguageVersion { get; set; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] + [Export ("libraryType", ArgumentSemantic.Assign)] + MTLLibraryType LibraryType { get; set; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] + [NullAllowed, Export ("installName")] + string InstallName { get; set; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] + [NullAllowed, Export ("libraries", ArgumentSemantic.Copy)] + IMTLDynamicLibrary[] Libraries { get; set; } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Mac (11, 0), iOS (13, 0), TV (14,0)] + [Export ("preserveInvariance")] + bool PreserveInvariance { get; set; } } [iOS (8,0)][Mac (10,11)] @@ -2755,98 +3055,98 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("memoryBarrierWithResources:count:afterStages:beforeStages:")] void MemoryBarrier (IMTLResource[] resources, nuint count, MTLRenderStages after, MTLRenderStages before); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("tileWidth")] nuint TileWidth { get; } - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("tileHeight")] nuint TileHeight { get; } - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("setTileBytes:length:atIndex:")] void SetTileBytes (IntPtr /* void* */ bytes, nuint length, nuint index); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("setTileBuffer:offset:atIndex:")] void SetTileBuffer ([NullAllowed] IMTLBuffer buffer, nuint offset, nuint index); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("setTileBufferOffset:atIndex:")] void SetTileBufferOffset (nuint offset, nuint index); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("setTileBuffers:offsets:withRange:")] void SetTileBuffers (IMTLBuffer[] buffers, IntPtr offsets, NSRange range); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("setTileTexture:atIndex:")] void SetTileTexture ([NullAllowed] IMTLTexture texture, nuint index); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("setTileTextures:withRange:")] void SetTileTextures (IMTLTexture[] textures, NSRange range); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("setTileSamplerState:atIndex:")] void SetTileSamplerState ([NullAllowed] IMTLSamplerState sampler, nuint index); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("setTileSamplerStates:withRange:")] void SetTileSamplerStates (IMTLSamplerState[] samplers, NSRange range); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex:")] void SetTileSamplerState ([NullAllowed] IMTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, nuint index); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange:")] void SetTileSamplerStates (IMTLSamplerState[] samplers, IntPtr /* float[] */ lodMinClamps, IntPtr /* float[] */ lodMaxClamps, NSRange range); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif [Export ("dispatchThreadsPerTile:")] void DispatchThreadsPerTile (MTLSize threadsPerTile); - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] #if XAMCORE_4_0 [Abstract] #endif @@ -2892,7 +3192,7 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { #if XAMCORE_4_0 [Abstract] #endif - [NoiOS, NoTV, Mac (10,15)] + [iOS (14,0), TV (14,0), Mac (10,15)] [Export ("sampleCountersInBuffer:atSampleIndex:withBarrier:")] void SampleCounters (MTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier); } @@ -2946,7 +3246,7 @@ interface MTLRenderPipelineReflection { NSObject [] FragmentArguments { get; } #endif - [iOS (11, 0), NoTV, NoMac, NoWatch] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] [NullAllowed, Export ("tileArguments")] MTLArgument[] TileArguments { get; } } @@ -3071,19 +3371,19 @@ interface MTLRenderPassDescriptor : NSCopying { [Export ("getSamplePositions:count:")] nuint GetSamplePositions ([NullAllowed] IntPtr positions, nuint count); - [iOS (11, 0), NoTV, NoWatch, NoMac] + [iOS (11, 0), NoTV, NoWatch, Mac (11,0)] [Export ("imageblockSampleLength")] nuint ImageblockSampleLength { get; set; } - [iOS (11, 0), NoTV, NoWatch, NoMac] + [iOS (11, 0), NoTV, NoWatch, Mac (11,0)] [Export ("threadgroupMemoryLength")] nuint ThreadgroupMemoryLength { get; set; } - [iOS (11, 0), NoTV, NoWatch, NoMac] + [iOS (11, 0), NoTV, NoWatch, Mac (11,0)] [Export ("tileWidth")] nuint TileWidth { get; set; } - [iOS (11, 0), NoTV, NoWatch, NoMac] + [iOS (11, 0), NoTV, NoWatch, Mac (11,0)] [Export ("tileHeight")] nuint TileHeight { get; set; } @@ -3111,6 +3411,10 @@ interface MTLRenderPassDescriptor : NSCopying { [Mac (10,15,4), NoTV, iOS (13, 0)] [NullAllowed, Export ("rasterizationRateMap", ArgumentSemantic.Strong)] IMTLRasterizationRateMap RasterizationRateMap { get; set; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] + [Export ("sampleBufferAttachments")] + MTLRenderPassSampleBufferAttachmentDescriptorArray SampleBufferAttachments { get; } } @@ -3342,9 +3646,29 @@ interface MTLComputePipelineDescriptor : NSCopying { [Export ("buffers")] MTLPipelineBufferDescriptorArray Buffers { get; } - [NoMac, iOS (13, 0), TV (13,0)] + [Mac (11,0), iOS (13, 0), TV (13,0)] [Export ("supportIndirectCommandBuffers")] bool SupportIndirectCommandBuffers { get; set; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] + [NullAllowed, Export ("insertLibraries", ArgumentSemantic.Copy)] + IMTLDynamicLibrary[] InsertLibraries { get; set; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] + [NullAllowed, Export ("binaryArchives", ArgumentSemantic.Copy)] + IMTLBinaryArchive[] BinaryArchives { get; set; } + + [Mac (11, 0), iOS (14, 0), TV (14,0)] + [NullAllowed, Export ("linkedFunctions", ArgumentSemantic.Copy)] + MTLLinkedFunctions LinkedFunctions { get; set; } + + [Mac (11, 0), iOS (14, 0), NoTV] + [Export ("supportAddingBinaryFunctions")] + bool SupportAddingBinaryFunctions { get; set; } + + [Mac (11, 0), iOS (14, 0), NoTV] + [Export ("maxCallStackDepth")] + nuint MaxCallStackDepth { get; set; } } [iOS (10,0), TV (10,0), NoWatch, Mac (10,12)] @@ -3649,30 +3973,67 @@ interface MTLArgumentEncoder [return: Release] IMTLArgumentEncoder CreateArgumentEncoder (nuint index); - [TV (13,0), NoMac, iOS (13,0)] + [TV (13,0), Mac (11,0), iOS (13,0)] #if XAMCORE_4_0 [Abstract] #endif [Export ("setComputePipelineState:atIndex:")] void SetComputePipelineState ([NullAllowed] IMTLComputePipelineState pipeline, nuint index); - [TV (13,0), NoMac, iOS (13,0)] + [TV (13,0), Mac (11,0), iOS (13,0)] #if XAMCORE_4_0 [Abstract] #endif [Export ("setComputePipelineStates:withRange:")] void SetComputePipelineStates (IMTLComputePipelineState[] pipelines, NSRange range); + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setAccelerationStructure:atIndex:")] + void SetAccelerationStructure ([NullAllowed] IMTLAccelerationStructure accelerationStructure, nuint index); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setVisibleFunctionTable:atIndex:")] + void SetVisibleFunctionTable ([NullAllowed] IMTLVisibleFunctionTable visibleFunctionTable, nuint index); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setVisibleFunctionTables:withRange:")] + void SetVisibleFunctionTables (IMTLVisibleFunctionTable[] visibleFunctionTables, NSRange range); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setIntersectionFunctionTable:atIndex:")] + void SetIntersectionFunctionTable ([NullAllowed] IMTLIntersectionFunctionTable intersectionFunctionTable, nuint index); + + [Mac (11,0), iOS (14,0), NoTV] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setIntersectionFunctionTables:withRange:")] + void SetIntersectionFunctionTables (IMTLIntersectionFunctionTable[] intersectionFunctionTables, NSRange range); + } - [iOS (11, 0), NoTV, NoMac, NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] [BaseType (typeof (NSObject))] interface MTLTileRenderPipelineColorAttachmentDescriptor : NSCopying { [Export ("pixelFormat", ArgumentSemantic.Assign)] MTLPixelFormat PixelFormat { get; set; } } - [iOS (11, 0), NoTV, NoMac, NoWatch] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] [BaseType (typeof (NSObject))] interface MTLTileRenderPipelineColorAttachmentDescriptorArray { [Internal] @@ -3684,9 +4045,44 @@ interface MTLTileRenderPipelineColorAttachmentDescriptorArray { void SetObject (MTLTileRenderPipelineColorAttachmentDescriptor attachment, nuint attachmentIndex); } - [iOS (11, 0), NoTV, NoMac, NoWatch] + interface IMTLBinaryArchive {} + + [Mac (11,0), iOS (14,0), TV (14,0)] + [Protocol] + interface MTLBinaryArchive { + + [Abstract] + [NullAllowed, Export ("label")] + string Label { get; set; } + + [Abstract] + [Export ("device")] + IMTLDevice Device { get; } + + [Abstract] + [Export ("addComputePipelineFunctionsWithDescriptor:error:")] + bool AddComputePipelineFunctions (MTLComputePipelineDescriptor descriptor, [NullAllowed] out NSError error); + + [Abstract] + [Export ("addRenderPipelineFunctionsWithDescriptor:error:")] + bool AddRenderPipelineFunctions (MTLRenderPipelineDescriptor descriptor, [NullAllowed] out NSError error); + + [NoTV] + [Abstract] + [Export ("addTileRenderPipelineFunctionsWithDescriptor:error:")] + bool AddTileRenderPipelineFunctions (MTLTileRenderPipelineDescriptor descriptor, [NullAllowed] out NSError error); + + [Abstract] + [Export ("serializeToURL:error:")] + bool Serialize (NSUrl url, [NullAllowed] out NSError error); + } + + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [iOS (11, 0), NoTV, Mac (11,0), NoWatch] [BaseType (typeof (NSObject))] interface MTLTileRenderPipelineDescriptor : NSCopying { + [NullAllowed] [Export ("label")] string Label { get; set; } @@ -3711,6 +4107,10 @@ interface MTLTileRenderPipelineDescriptor : NSCopying { [Export ("reset")] void Reset (); + + [Mac (11, 0), iOS (14,0)] + [NullAllowed, Export ("binaryArchives", ArgumentSemantic.Copy)] + IMTLBinaryArchive[] BinaryArchives { get; set; } } interface IMTLEvent {} @@ -3816,7 +4216,7 @@ interface MTLIndirectRenderCommand { [Mac (10,14), iOS (12,0), TV (12,0)] [BaseType (typeof(NSObject))] - interface MTLIndirectCommandBufferDescriptor { + interface MTLIndirectCommandBufferDescriptor : NSCopying { [Export ("commandTypes", ArgumentSemantic.Assign)] MTLIndirectCommandType CommandTypes { get; set; } @@ -3832,11 +4232,10 @@ interface MTLIndirectCommandBufferDescriptor { [Export ("maxFragmentBufferBindCount")] nuint MaxFragmentBufferBindCount { get; set; } -/* Fails introspection issue: https://github.com/xamarin/maccore/issues/1979 - [NoMac, iOS (13, 0)] + + [Mac (11,0), iOS (14, 0), TV (14,0)] [Export ("maxKernelBufferBindCount")] nuint MaxKernelBufferBindCount { get; set; } -*/ } interface IMTLIndirectCommandBuffer {} @@ -3859,7 +4258,7 @@ interface MTLIndirectCommandBuffer : MTLResource { #if XAMCORE_4_0 [Abstract] #endif - [TV (13,0), NoMac, iOS (13,0)] + [TV (13,0), Mac (11,0), iOS (13,0)] [Export ("indirectComputeCommandAtIndex:")] IMTLIndirectComputeCommand GetIndirectComputeCommand (nuint commandIndex); } @@ -4019,36 +4418,37 @@ interface MTLRasterizationRateMap { interface IMTLResourceStateCommandEncoder {} - [NoMac, iOS (13,0), NoTV] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Mac (11,0), iOS (13,0), NoTV] [Protocol] interface MTLResourceStateCommandEncoder : MTLCommandEncoder { - [Unavailable (PlatformName.MacCatalyst)] - [NoMac] - [Advice ("This API is not available when using UIKit on macOS."), Abstract] +#if !MONOMAC + [Abstract] +#endif [Export ("updateTextureMappings:mode:regions:mipLevels:slices:numRegions:")] void Update (IMTLTexture texture, MTLSparseTextureMappingMode mode, IntPtr regions, IntPtr mipLevels, IntPtr slices, nuint numRegions); - [Unavailable (PlatformName.MacCatalyst)] - [NoMac] - [Advice ("This API is not available when using UIKit on macOS."), Abstract] +#if !MONOMAC + [Abstract] +#endif [Export ("updateTextureMapping:mode:region:mipLevel:slice:")] void Update (IMTLTexture texture, MTLSparseTextureMappingMode mode, MTLRegion region, nuint mipLevel, nuint slice); - [Unavailable (PlatformName.MacCatalyst)] - [NoMac] - [Advice ("This API is not available when using UIKit on macOS."), Abstract] +#if !MONOMAC + [Abstract] +#endif [Export ("updateTextureMapping:mode:indirectBuffer:indirectBufferOffset:")] void Update (IMTLTexture texture, MTLSparseTextureMappingMode mode, IMTLBuffer indirectBuffer, nuint indirectBufferOffset); - [Unavailable (PlatformName.MacCatalyst)] - [NoMac] - [Advice ("This API is not available when using UIKit on macOS."), Abstract] +#if !MONOMAC + [Abstract] +#endif [Export ("updateFence:")] void Update (IMTLFence fence); - [Unavailable (PlatformName.MacCatalyst)] - [NoMac] - [Advice ("This API is not available when using UIKit on macOS."), Abstract] +#if !MONOMAC + [Abstract] +#endif [Export ("waitForFence:")] void Wait (IMTLFence fence); } @@ -4068,7 +4468,7 @@ interface MTLCaptureDescriptor : NSCopying { interface IMTLIndirectComputeCommand {} - [TV (13,0), iOS (13,0), NoMac] + [TV (13,0), iOS (13,0), Mac (11,0)] [Protocol] interface MTLIndirectComputeCommand { [Abstract] @@ -4106,11 +4506,18 @@ interface MTLIndirectComputeCommand { [Abstract] [Export ("setStageInRegion:")] void SetStageInRegion (MTLRegion region); + + [Mac (11,0), iOS (14,0), TV (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setImageblockWidth:height:")] + void SetImageblock (nuint width, nuint height); } interface IMTLCounter {} - [NoiOS, NoTV, Mac (10,15)] + [iOS (14,0), TV (14,0), Mac (10,15)] [Protocol] #if !XAMCORE_4_0 [BaseType (typeof(NSObject))] @@ -4123,7 +4530,7 @@ interface MTLCounter { interface IMTLCounterSet {} - [NoiOS, NoTV, Mac (10,15)] + [iOS (14,0), TV (14,0), Mac (10,15)] [Protocol] #if !XAMCORE_4_0 [BaseType (typeof(NSObject))] @@ -4140,10 +4547,10 @@ interface MTLCounterSet { interface IMTLCounterSampleBuffer {} - [NoiOS, NoTV, Mac (10,15)] + [iOS (14,0), TV (14,0), Mac (10,15)] [Protocol] #if !XAMCORE_4_0 - [BaseType (typeof(NSObject))] + [BaseType (typeof (NSObject))] #endif interface MTLCounterSampleBuffer { [Abstract] @@ -4164,24 +4571,587 @@ interface MTLCounterSampleBuffer { NSData ResolveCounterRange (NSRange range); } - [NoiOS, NoTV, Mac (10,15)] - [BaseType (typeof(NSObject))] + [iOS (14,0), TV (14,0), Mac (10,15)] + [BaseType (typeof (NSObject))] interface MTLCounterSampleBufferDescriptor : NSCopying { - [NoiOS, Mac (10, 15)] + [Mac (10, 15)] + [NullAllowed] [Export ("counterSet", ArgumentSemantic.Retain)] IMTLCounterSet CounterSet { get; set; } - [NoiOS, Mac (10, 15)] + [Mac (10, 15)] [Export ("label")] string Label { get; set; } - [NoiOS, Mac (10, 15)] + [Mac (10, 15)] [Export ("storageMode", ArgumentSemantic.Assign)] MTLStorageMode StorageMode { get; set; } - [NoiOS, Mac (10, 15)] + [Mac (10, 15)] [Export ("sampleCount")] nuint SampleCount { get; set; } } + + [Mac (11,0), iOS (14,0), NoTV] + interface IMTLAccelerationStructure {} + + [Mac (11,0), iOS (14,0), NoTV] + [Protocol] + interface MTLAccelerationStructure : MTLResource + { + [Abstract] + [Export ("size")] + nuint Size { get; } + } + + [Mac (11,0), iOS (14,0), NoTV] + [DisableDefaultCtor] + [BaseType (typeof (MTLAccelerationStructureGeometryDescriptor))] + interface MTLAccelerationStructureBoundingBoxGeometryDescriptor { + [NullAllowed, Export ("boundingBoxBuffer", ArgumentSemantic.Retain)] + IMTLBuffer BoundingBoxBuffer { get; set; } + + [Export ("boundingBoxBufferOffset")] + nuint BoundingBoxBufferOffset { get; set; } + + [Export ("boundingBoxStride")] + nuint BoundingBoxStride { get; set; } + + [Export ("boundingBoxCount")] + nuint BoundingBoxCount { get; set; } + + [Static] + [Export ("descriptor")] + MTLAccelerationStructureBoundingBoxGeometryDescriptor Create (); + } + + [Mac (11,0), iOS (14,0), NoTV] + [BaseType (typeof (NSObject))] + interface MTLAccelerationStructureDescriptor : NSCopying { + [Export ("usage", ArgumentSemantic.Assign)] + MTLAccelerationStructureUsage Usage { get; set; } + } + + [Mac (11,0), iOS (14,0), NoTV] + [BaseType (typeof (NSObject))] + interface MTLAccelerationStructureGeometryDescriptor : NSCopying { + [Export ("intersectionFunctionTableOffset")] + nuint IntersectionFunctionTableOffset { get; set; } + + [Export ("opaque")] + bool Opaque { get; set; } + + [Export ("allowDuplicateIntersectionFunctionInvocation")] + bool AllowDuplicateIntersectionFunctionInvocation { get; set; } + } + + [Mac (11,0), iOS (14,0), NoTV] + [BaseType (typeof (MTLAccelerationStructureGeometryDescriptor))] + interface MTLAccelerationStructureTriangleGeometryDescriptor { + [NullAllowed, Export ("vertexBuffer", ArgumentSemantic.Retain)] + IMTLBuffer VertexBuffer { get; set; } + + [Export ("vertexBufferOffset")] + nuint VertexBufferOffset { get; set; } + + [Export ("vertexStride")] + nuint VertexStride { get; set; } + + [NullAllowed, Export ("indexBuffer", ArgumentSemantic.Retain)] + IMTLBuffer IndexBuffer { get; set; } + + [Export ("indexBufferOffset")] + nuint IndexBufferOffset { get; set; } + + [Export ("indexType", ArgumentSemantic.Assign)] + MTLIndexType IndexType { get; set; } + + [Export ("triangleCount")] + nuint TriangleCount { get; set; } + + [Static] + [Export ("descriptor")] + MTLAccelerationStructureTriangleGeometryDescriptor Create (); + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [BaseType (typeof (NSObject))] + interface MTLBinaryArchiveDescriptor : NSCopying { + [NullAllowed, Export ("url", ArgumentSemantic.Copy)] + NSUrl Url { get; set; } + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [BaseType (typeof (NSObject))] + interface MTLBlitPassDescriptor : NSCopying + { + [Static] + [Export ("blitPassDescriptor")] + MTLBlitPassDescriptor Create (); + + [Export ("sampleBufferAttachments")] + MTLBlitPassSampleBufferAttachmentDescriptorArray SampleBufferAttachments { get; } + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [BaseType (typeof (NSObject))] + interface MTLBlitPassSampleBufferAttachmentDescriptor : NSCopying { + [NullAllowed, Export ("sampleBuffer", ArgumentSemantic.Retain)] + IMTLCounterSampleBuffer SampleBuffer { get; set; } + + [Export ("startOfEncoderSampleIndex")] + nuint StartOfEncoderSampleIndex { get; set; } + + [Export ("endOfEncoderSampleIndex")] + nuint EndOfEncoderSampleIndex { get; set; } + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [BaseType (typeof (NSObject))] + interface MTLBlitPassSampleBufferAttachmentDescriptorArray { + [Export ("objectAtIndexedSubscript:")] + MTLBlitPassSampleBufferAttachmentDescriptor GetObject (nuint attachmentIndex); + + [Export ("setObject:atIndexedSubscript:")] + void SetObject ([NullAllowed] MTLBlitPassSampleBufferAttachmentDescriptor attachment, nuint attachmentIndex); + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [BaseType (typeof (NSObject))] + interface MTLCommandBufferDescriptor : NSCopying { + + [Field ("MTLCommandBufferEncoderInfoErrorKey")] + NSString BufferEncoderInfoErrorKey { get; } + + [Export ("retainedReferences")] + bool RetainedReferences { get; set; } + + [Export ("errorOptions", ArgumentSemantic.Assign)] + MTLCommandBufferErrorOption ErrorOptions { get; set; } + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [BaseType (typeof (NSObject))] + interface MTLComputePassDescriptor : NSCopying { + [Static] + [Export ("computePassDescriptor")] + MTLComputePassDescriptor Create (); + + [Export ("dispatchType", ArgumentSemantic.Assign)] + MTLDispatchType DispatchType { get; set; } + + [Export ("sampleBufferAttachments")] + MTLComputePassSampleBufferAttachmentDescriptorArray SampleBufferAttachments { get; } + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [BaseType (typeof (NSObject))] + interface MTLComputePassSampleBufferAttachmentDescriptor : NSCopying { + + [NullAllowed, Export ("sampleBuffer", ArgumentSemantic.Retain)] + IMTLCounterSampleBuffer SampleBuffer { get; set; } + + [Export ("startOfEncoderSampleIndex")] + nuint StartOfEncoderSampleIndex { get; set; } + + [Export ("endOfEncoderSampleIndex")] + nuint EndOfEncoderSampleIndex { get; set; } + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [BaseType (typeof (NSObject))] + interface MTLComputePassSampleBufferAttachmentDescriptorArray { + [Export ("objectAtIndexedSubscript:")] + MTLComputePassSampleBufferAttachmentDescriptor GetObject (nuint attachmentIndex); + + [Export ("setObject:atIndexedSubscript:")] + void SetObject ([NullAllowed] MTLComputePassSampleBufferAttachmentDescriptor attachment, nuint attachmentIndex); + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [DisableDefaultCtor] + [BaseType (typeof (NSObject))] + interface MTLFunctionDescriptor : NSCopying { + [Static] + [Export ("functionDescriptor")] + MTLFunctionDescriptor Create (); + + [NullAllowed, Export ("name")] + string Name { get; set; } + + [NullAllowed, Export ("specializedName")] + string SpecializedName { get; set; } + + [NullAllowed, Export ("constantValues", ArgumentSemantic.Copy)] + MTLFunctionConstantValues ConstantValues { get; set; } + + [Export ("options", ArgumentSemantic.Assign)] + MTLFunctionOptions Options { get; set; } + } + + [Mac (11,0), iOS (14,0), NoTV] + [DisableDefaultCtor] + [BaseType (typeof (MTLAccelerationStructureDescriptor))] + interface MTLInstanceAccelerationStructureDescriptor { + [NullAllowed, Export ("instanceDescriptorBuffer", ArgumentSemantic.Retain)] + IMTLBuffer InstanceDescriptorBuffer { get; set; } + + [Export ("instanceDescriptorBufferOffset")] + nuint InstanceDescriptorBufferOffset { get; set; } + + [Export ("instanceDescriptorStride")] + nuint InstanceDescriptorStride { get; set; } + + [Export ("instanceCount")] + nuint InstanceCount { get; set; } + + [NullAllowed, Export ("instancedAccelerationStructures", ArgumentSemantic.Retain)] + IMTLAccelerationStructure[] InstancedAccelerationStructures { get; set; } + + [Static] + [Export ("descriptor")] + MTLInstanceAccelerationStructureDescriptor Create (); + } + + [Mac (11,0), iOS (14,0), NoTV] + [DisableDefaultCtor] + [BaseType (typeof (MTLFunctionDescriptor))] + interface MTLIntersectionFunctionDescriptor : NSCopying {} + + [Mac (11,0), iOS (14,0), NoTV] + [DisableDefaultCtor] + [BaseType (typeof (NSObject))] + interface MTLIntersectionFunctionTableDescriptor : NSCopying { + [Static] + [Export ("intersectionFunctionTableDescriptor")] + MTLIntersectionFunctionTableDescriptor Create (); + + [Export ("functionCount")] + nuint FunctionCount { get; set; } + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [DisableDefaultCtor] + [BaseType (typeof (NSObject))] + interface MTLLinkedFunctions : NSCopying { + [Static] + [Export ("linkedFunctions")] + MTLLinkedFunctions Create (); + + [NullAllowed, Export ("functions", ArgumentSemantic.Copy)] + IMTLFunction[] Functions { get; set; } + + [NoTV] + [NullAllowed, Export ("binaryFunctions", ArgumentSemantic.Copy)] + IMTLFunction[] BinaryFunctions { get; set; } + + [NullAllowed, Export ("groups", ArgumentSemantic.Copy)] + NSDictionary> Groups { get; set; } + } + + [Mac (11,0), iOS (14,0), NoTV] + [DisableDefaultCtor] + [BaseType (typeof (MTLAccelerationStructureDescriptor))] + interface MTLPrimitiveAccelerationStructureDescriptor { + [NullAllowed, Export ("geometryDescriptors", ArgumentSemantic.Retain)] + MTLAccelerationStructureGeometryDescriptor[] GeometryDescriptors { get; set; } + + [Static] + [Export ("descriptor")] + MTLPrimitiveAccelerationStructureDescriptor Create (); + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [BaseType (typeof (NSObject))] + interface MTLRenderPassSampleBufferAttachmentDescriptor : NSCopying { + [NullAllowed, Export ("sampleBuffer", ArgumentSemantic.Retain)] + IMTLCounterSampleBuffer SampleBuffer { get; set; } + + [Export ("startOfVertexSampleIndex")] + nuint StartOfVertexSampleIndex { get; set; } + + [Export ("endOfVertexSampleIndex")] + nuint EndOfVertexSampleIndex { get; set; } + + [Export ("startOfFragmentSampleIndex")] + nuint StartOfFragmentSampleIndex { get; set; } + + [Export ("endOfFragmentSampleIndex")] + nuint EndOfFragmentSampleIndex { get; set; } + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [BaseType (typeof (NSObject))] + interface MTLRenderPassSampleBufferAttachmentDescriptorArray { + [Export ("objectAtIndexedSubscript:")] + MTLRenderPassSampleBufferAttachmentDescriptor GetObject (nuint attachmentIndex); + + [Export ("setObject:atIndexedSubscript:")] + void SetObject ([NullAllowed] MTLRenderPassSampleBufferAttachmentDescriptor attachment, nuint attachmentIndex); + + } + + [Mac (11,0), iOS (14,0), NoTV] + [DisableDefaultCtor] + [BaseType (typeof (NSObject))] + interface MTLResourceStatePassDescriptor : NSCopying { + [Static] + [Export ("resourceStatePassDescriptor")] + MTLResourceStatePassDescriptor Create (); + + [Export ("sampleBufferAttachments")] + MTLResourceStatePassSampleBufferAttachmentDescriptorArray SampleBufferAttachments { get; } + } + + [Mac (11,0), iOS (14,0), NoTV] + [BaseType (typeof (NSObject))] + interface MTLResourceStatePassSampleBufferAttachmentDescriptor : NSCopying { + [NullAllowed, Export ("sampleBuffer", ArgumentSemantic.Retain)] + IMTLCounterSampleBuffer SampleBuffer { get; set; } + + [Export ("startOfEncoderSampleIndex")] + nuint StartOfEncoderSampleIndex { get; set; } + + [Export ("endOfEncoderSampleIndex")] + nuint EndOfEncoderSampleIndex { get; set; } + } + + [Mac (11,0), iOS (14,0), NoTV] + [BaseType (typeof (NSObject))] + interface MTLResourceStatePassSampleBufferAttachmentDescriptorArray { + [Export ("objectAtIndexedSubscript:")] + MTLResourceStatePassSampleBufferAttachmentDescriptor GetObject (nuint attachmentIndex); + + [Export ("setObject:atIndexedSubscript:")] + void SetObject ([NullAllowed] MTLResourceStatePassSampleBufferAttachmentDescriptor attachment, nuint attachmentIndex); + + } + + [Mac (11,0), iOS (14,0), NoTV] + [DisableDefaultCtor] + [BaseType (typeof (NSObject))] + interface MTLVisibleFunctionTableDescriptor : NSCopying { + [Static] + [Export ("visibleFunctionTableDescriptor")] + MTLVisibleFunctionTableDescriptor Create (); + + [Export ("functionCount")] + nuint FunctionCount { get; set; } + } + + interface IMTLFunctionHandle {} + + [Mac (11,0), iOS (14,0), NoTV] + [Protocol] + interface MTLFunctionHandle { + [Abstract] + [Export ("functionType")] + MTLFunctionType FunctionType { get; } + + [Abstract] + [Export ("name")] + string Name { get; } + + [Abstract] + [Export ("device")] + IMTLDevice Device { get; } + } + + interface IMTLAccelerationStructureCommandEncoder {} + + [Mac (11,0), iOS (14,0), NoTV] + [Protocol] + interface MTLAccelerationStructureCommandEncoder : MTLCommandEncoder { + [Abstract] + [Export ("buildAccelerationStructure:descriptor:scratchBuffer:scratchBufferOffset:")] + void BuildAccelerationStructure (IMTLAccelerationStructure accelerationStructure, MTLAccelerationStructureDescriptor descriptor, IMTLBuffer scratchBuffer, nuint scratchBufferOffset); + + [Abstract] + [Export ("refitAccelerationStructure:descriptor:destination:scratchBuffer:scratchBufferOffset:")] + void RefitAccelerationStructure (IMTLAccelerationStructure sourceAccelerationStructure, MTLAccelerationStructureDescriptor descriptor, [NullAllowed] IMTLAccelerationStructure destinationAccelerationStructure, IMTLBuffer scratchBuffer, nuint scratchBufferOffset); + + [Abstract] + [Export ("copyAccelerationStructure:toAccelerationStructure:")] + void CopyAccelerationStructure (IMTLAccelerationStructure sourceAccelerationStructure, IMTLAccelerationStructure destinationAccelerationStructure); + + [Abstract] + [Export ("writeCompactedAccelerationStructureSize:toBuffer:offset:")] + void WriteCompactedAccelerationStructureSize (IMTLAccelerationStructure accelerationStructure, IMTLBuffer buffer, nuint offset); + + [Abstract] + [Export ("copyAndCompactAccelerationStructure:toAccelerationStructure:")] + void CopyAndCompactAccelerationStructure (IMTLAccelerationStructure sourceAccelerationStructure, IMTLAccelerationStructure destinationAccelerationStructure); + + [Abstract] + [Export ("updateFence:")] + void UpdateFence (IMTLFence fence); + + [Abstract] + [Export ("waitForFence:")] + void WaitForFence (IMTLFence fence); + + [Abstract] + [Export ("useResource:usage:")] + void UseResource (IMTLResource resource, MTLResourceUsage usage); + + [Abstract] + [Export ("useResources:count:usage:")] + void UseResources (IMTLResource[] resources, nuint count, MTLResourceUsage usage); + + [Abstract] + [Export ("useHeap:")] + void UseHeap (IMTLHeap heap); + + [Abstract] + [Export ("useHeaps:count:")] + void UseHeaps (IMTLHeap[] heaps, nuint count); + + [Abstract] + [Export ("sampleCountersInBuffer:atSampleIndex:withBarrier:")] + void SampleCountersInBuffer (MTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier); + } + + interface IMTLVisibleFunctionTable {} + + [Mac (11,0), iOS (14,0), NoTV] + [Protocol] + interface MTLVisibleFunctionTable : MTLResource { + [Abstract] + [Export ("setFunction:atIndex:")] + void SetFunction ([NullAllowed] IMTLFunctionHandle function, nuint index); + + [Abstract] + [Export ("setFunctions:withRange:")] + void SetFunctions (IMTLFunctionHandle[] functions, NSRange range); + } + + interface IMTLIntersectionFunctionTable {} + + [Mac (11,0), iOS (14,0), NoTV] + [Protocol] + interface MTLIntersectionFunctionTable : MTLResource { + [Abstract] + [Export ("setBuffer:offset:atIndex:")] + void SetBuffer ([NullAllowed] IMTLBuffer buffer, nuint offset, nuint index); + + [Abstract] + [Export ("setBuffers:offsets:withRange:")] + void SetBuffers (IntPtr /* IMTLBuffer[] */ buffers, /* nuint[]*/ IntPtr offsets, NSRange range); + + [Abstract] + [Export ("setFunction:atIndex:")] + void SetFunction ([NullAllowed] IMTLFunctionHandle function, nuint index); + + [Abstract] + [Export ("setFunctions:withRange:")] + void SetFunctions (IMTLFunctionHandle[] functions, NSRange range); + + [Abstract] + [Export ("setOpaqueTriangleIntersectionFunctionWithSignature:atIndex:")] + void SetOpaqueTriangleIntersectionFunction (MTLIntersectionFunctionSignature signature, nuint index); + + [Abstract] + [Export ("setOpaqueTriangleIntersectionFunctionWithSignature:withRange:")] + void SetOpaqueTriangleIntersectionFunction (MTLIntersectionFunctionSignature signature, NSRange range); + + [Abstract] + [Export ("setVisibleFunctionTable:atBufferIndex:")] + void SetVisibleFunctionTable ([NullAllowed] IMTLVisibleFunctionTable functionTable, nuint bufferIndex); + + [Abstract] + [Export ("setVisibleFunctionTables:withBufferRange:")] + void SetVisibleFunctionTables (IMTLVisibleFunctionTable[] functionTables, NSRange bufferRange); + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [Protocol] + interface MTLCommandBufferEncoderInfo { + + [Abstract] + [Export ("label")] + string Label { get; } + + [Abstract] + [Export ("debugSignposts")] + string[] DebugSignposts { get; } + + [Abstract] + [Export ("errorState")] + MTLCommandEncoderErrorState ErrorState { get; } + } + + interface IMTLDynamicLibrary {} + + [Mac (11,0), iOS (14,0), TV (14,0)] + [Protocol] + interface MTLDynamicLibrary { + + [Abstract] + [NullAllowed, Export ("label")] + string Label { get; set; } + + [Abstract] + [Export ("device")] + IMTLDevice Device { get; } + + [Abstract] + [Export ("installName")] + string InstallName { get; } + + [Abstract] + [Export ("serializeToURL:error:")] + bool Serialize (NSUrl url, [NullAllowed] out NSError error); + } + + interface IMTLLogContainer {} + + [Mac (11,0), iOS (14,0), TV (14,0)] + [Protocol] + interface MTLLogContainer { + + } + + [Mac (11,0), iOS (14,0), TV (14,0)] + [Protocol] + interface MTLFunctionLog { + [Abstract] + [Export ("type")] + MTLFunctionLogType Type { get; } + + [Abstract] + [NullAllowed, Export ("encoderLabel")] + string EncoderLabel { get; } + + [Abstract] + [NullAllowed, Export ("function")] + IMTLFunction Function { get; } + + [Abstract] + [NullAllowed, Export ("debugLocation")] + IMTLFunctionLogDebugLocation DebugLocation { get; } + } + + interface IMTLFunctionLogDebugLocation {} + + [Mac (11,0), iOS (14,0), TV (14,0)] + [Protocol] + interface MTLFunctionLogDebugLocation { + [Abstract] + [NullAllowed, Export ("functionName")] + string FunctionName { get; } + + [Abstract] + [NullAllowed, Export ("URL")] + NSUrl Url { get; } + + [Abstract] + [Export ("line")] + nuint Line { get; } + + [Abstract] + [Export ("column")] + nuint Column { get; } + } + } diff --git a/src/metalkit.cs b/src/metalkit.cs index 36b579384d7c..efd3d3ae1289 100644 --- a/src/metalkit.cs +++ b/src/metalkit.cs @@ -51,7 +51,7 @@ interface MTKView : NSCoding, CALayerDelegate { [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] NSObject WeakDelegate { get; set; } - [NullAllowed, Export ("device", ArgumentSemantic.Assign)] + [NullAllowed, Export ("device", ArgumentSemantic.Retain)] IMTLDevice Device { get; set; } [NullAllowed, Export ("currentDrawable")] diff --git a/src/metrickit.cs b/src/metrickit.cs index eac485e5c3bf..0232e02a475d 100644 --- a/src/metrickit.cs +++ b/src/metrickit.cs @@ -24,8 +24,20 @@ interface MXMetric : NSSecureCoding { [Export ("JSONRepresentation")] NSData JsonRepresentation { get; } +#if IOS + [Internal] + [Deprecated (PlatformName.iOS, 14,0)] [Export ("DictionaryRepresentation")] + NSDictionary _DictionaryRepresentation13 { get; } + + [Internal] + [iOS (14,0)] + [Export ("dictionaryRepresentation")] + NSDictionary _DictionaryRepresentation14 { get; } +#else + [Export ("dictionaryRepresentation")] NSDictionary DictionaryRepresentation { get; } +#endif } [NoWatch, NoTV, NoMac, iOS (13,0)] @@ -33,6 +45,10 @@ interface MXMetric : NSSecureCoding { interface MXCpuMetric { [Export ("cumulativeCPUTime", ArgumentSemantic.Strong)] NSMeasurement CumulativeCpuTime { get; } + + [iOS (14,0)] + [Export ("cumulativeCPUInstructions", ArgumentSemantic.Strong)] + NSMeasurement CumulativeCpuInstructions { get; } } [NoWatch, NoTV, NoMac, iOS (13,0)] @@ -124,8 +140,24 @@ interface MXMetaData : NSSecureCoding { [Export ("JSONRepresentation")] NSData JsonRepresentation { get; } +#if IOS + [Internal] + [Deprecated (PlatformName.iOS, 14,0)] [Export ("DictionaryRepresentation")] + NSDictionary _DictionaryRepresentation13 { get; } + + [Internal] + [iOS (14,0)] + [Export ("dictionaryRepresentation")] + NSDictionary _DictionaryRepresentation14 { get; } +#else + [Export ("dictionaryRepresentation")] NSDictionary DictionaryRepresentation { get; } +#endif + + [iOS (14,0)] + [Export ("platformArchitecture", ArgumentSemantic.Strong)] + string PlatformArchitecture { get; } } [NoWatch, NoTV, NoMac, iOS (13,0)] @@ -327,8 +359,30 @@ interface MXMetricPayload : NSSecureCoding { [Export ("JSONRepresentation")] NSData JsonRepresentation { get; } +#if IOS + [Internal] + [Deprecated (PlatformName.iOS, 14,0)] [Export ("DictionaryRepresentation")] + NSDictionary _DictionaryRepresentation13 { get; } + + [Internal] + [iOS (14,0)] + [Export ("dictionaryRepresentation")] + NSDictionary _DictionaryRepresentation14 { get; } +#else + [Export ("dictionaryRepresentation")] NSDictionary DictionaryRepresentation { get; } +#endif + + [iOS (14,0)] + [NullAllowed] + [Export ("animationMetrics", ArgumentSemantic.Strong)] + MXAnimationMetric AnimationMetrics { get; } + + [iOS (14,0)] + [NullAllowed] + [Export ("applicationExitMetrics", ArgumentSemantic.Strong)] + MXAppExitMetric ApplicationExitMetrics { get; } } [NoWatch, NoTV, NoMac, iOS (13,0)] @@ -347,6 +401,10 @@ interface MXMetricManager { [Export ("removeSubscriber:")] void Remove (IMXMetricManagerSubscriber subscriber); + + [iOS (14,0)] + [Export ("pastDiagnosticPayloads", ArgumentSemantic.Strong)] + MXDiagnosticPayload[] PastDiagnosticPayloads { get; } } interface IMXMetricManagerSubscriber { } @@ -357,5 +415,227 @@ interface MXMetricManagerSubscriber { [Abstract] [Export ("didReceiveMetricPayloads:")] void DidReceiveMetricPayloads (MXMetricPayload[] payloads); + + [iOS (14,0)] + [Export ("didReceiveDiagnosticPayloads:")] + void DidReceiveDiagnosticPayloads (MXDiagnosticPayload[] payloads); + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (MXMetric))] + [DisableDefaultCtor] + interface MXAnimationMetric { + + [Export ("scrollHitchTimeRatio", ArgumentSemantic.Strong)] + NSMeasurement ScrollHitchTimeRatio { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (MXMetric))] + [DisableDefaultCtor] + interface MXAppExitMetric { + + [Export ("foregroundExitData", ArgumentSemantic.Strong)] + MXForegroundExitData ForegroundExitData { get; } + + [Export ("backgroundExitData", ArgumentSemantic.Strong)] + MXBackgroundExitData BackgroundExitData { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MXBackgroundExitData : NSSecureCoding { + + [Export ("cumulativeNormalAppExitCount")] + nuint CumulativeNormalAppExitCount { get; } + + [Export ("cumulativeMemoryResourceLimitExitCount")] + nuint CumulativeMemoryResourceLimitExitCount { get; } + + [Export ("cumulativeCPUResourceLimitExitCount")] + nuint CumulativeCpuResourceLimitExitCount { get; } + + [Export ("cumulativeMemoryPressureExitCount")] + nuint CumulativeMemoryPressureExitCount { get; } + + [Export ("cumulativeBadAccessExitCount")] + nuint CumulativeBadAccessExitCount { get; } + + [Export ("cumulativeAbnormalExitCount")] + nuint CumulativeAbnormalExitCount { get; } + + [Export ("cumulativeIllegalInstructionExitCount")] + nuint CumulativeIllegalInstructionExitCount { get; } + + [Export ("cumulativeAppWatchdogExitCount")] + nuint CumulativeAppWatchdogExitCount { get; } + + [Export ("cumulativeSuspendedWithLockedFileExitCount")] + nuint CumulativeSuspendedWithLockedFileExitCount { get; } + + [Export ("cumulativeBackgroundTaskAssertionTimeoutExitCount")] + nuint CumulativeBackgroundTaskAssertionTimeoutExitCount { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MXForegroundExitData : NSSecureCoding { + + [Export ("cumulativeNormalAppExitCount")] + nuint CumulativeNormalAppExitCount { get; } + + [Export ("cumulativeMemoryResourceLimitExitCount")] + nuint CumulativeMemoryResourceLimitExitCount { get; } + + [Export ("cumulativeBadAccessExitCount")] + nuint CumulativeBadAccessExitCount { get; } + + [Export ("cumulativeAbnormalExitCount")] + nuint CumulativeAbnormalExitCount { get; } + + [Export ("cumulativeIllegalInstructionExitCount")] + nuint CumulativeIllegalInstructionExitCount { get; } + + [Export ("cumulativeAppWatchdogExitCount")] + nuint CumulativeAppWatchdogExitCount { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MXCallStackTree : NSSecureCoding { + + [Export ("JSONRepresentation")] + NSData JsonRepresentation { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (MXDiagnostic), Name = "MXCPUExceptionDiagnostic")] + [DisableDefaultCtor] + interface MXCpuExceptionDiagnostic { + + [Export ("callStackTree", ArgumentSemantic.Strong)] + MXCallStackTree CallStackTree { get; } + + [Export ("totalCPUTime", ArgumentSemantic.Strong)] + NSMeasurement TotalCpuTime { get; } + + [Export ("totalSampledTime", ArgumentSemantic.Strong)] + NSMeasurement TotalSampledTime { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (MXDiagnostic))] + [DisableDefaultCtor] + interface MXCrashDiagnostic { + + [Export ("callStackTree", ArgumentSemantic.Strong)] + MXCallStackTree CallStackTree { get; } + + [NullAllowed, Export ("terminationReason", ArgumentSemantic.Strong)] + string TerminationReason { get; } + + [NullAllowed, Export ("virtualMemoryRegionInfo", ArgumentSemantic.Strong)] + string VirtualMemoryRegionInfo { get; } + + // exception_type_t -> int (exception_types.h) + [BindAs (typeof (int?))] + [NullAllowed, Export ("exceptionType", ArgumentSemantic.Strong)] + NSNumber ExceptionType { get; } + + // mach_exception_code_t -> mach_exception_data_type_t -> int64_t (exception_types.h) + [BindAs (typeof (long?))] + [NullAllowed, Export ("exceptionCode", ArgumentSemantic.Strong)] + NSNumber ExceptionCode { get; } + + // signal number (various structs) always an `int` (signal.h) + [BindAs (typeof (int?))] + [NullAllowed, Export ("signal", ArgumentSemantic.Strong)] + NSNumber Signal { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MXDiagnostic : NSSecureCoding { + + [Export ("metaData", ArgumentSemantic.Strong)] + MXMetaData MetaData { get; } + + [Export ("applicationVersion", ArgumentSemantic.Strong)] + string ApplicationVersion { get; } + + [Export ("JSONRepresentation")] + NSData JsonRepresentation { get; } + + [Export ("dictionaryRepresentation")] + NSDictionary DictionaryRepresentation { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MXDiagnosticPayload : NSSecureCoding { + + [NullAllowed, Export ("cpuExceptionDiagnostics", ArgumentSemantic.Strong)] + MXCpuExceptionDiagnostic[] CpuExceptionDiagnostics { get; } + + [NullAllowed, Export ("diskWriteExceptionDiagnostics", ArgumentSemantic.Strong)] + MXDiskWriteExceptionDiagnostic[] DiskWriteExceptionDiagnostics { get; } + + [NullAllowed, Export ("hangDiagnostics", ArgumentSemantic.Strong)] + MXHangDiagnostic[] HangDiagnostics { get; } + + [NullAllowed, Export ("crashDiagnostics", ArgumentSemantic.Strong)] + MXCrashDiagnostic[] CrashDiagnostics { get; } + + [Export ("timeStampBegin", ArgumentSemantic.Strong)] + NSDate TimeStampBegin { get; } + + [Export ("timeStampEnd", ArgumentSemantic.Strong)] + NSDate TimeStampEnd { get; } + + [Export ("JSONRepresentation")] + NSData JsonRepresentation { get; } + + [Export ("dictionaryRepresentation")] + NSDictionary DictionaryRepresentation { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (MXDiagnostic))] + [DisableDefaultCtor] + interface MXDiskWriteExceptionDiagnostic { + + [Export ("callStackTree", ArgumentSemantic.Strong)] + MXCallStackTree CallStackTree { get; } + + [Export ("totalWritesCaused", ArgumentSemantic.Strong)] + NSMeasurement TotalWritesCaused { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (MXDiagnostic))] + [DisableDefaultCtor] + interface MXHangDiagnostic { + + [Export ("callStackTree", ArgumentSemantic.Strong)] + MXCallStackTree CallStackTree { get; } + + [Export ("hangDuration", ArgumentSemantic.Strong)] + NSMeasurement HangDuration { get; } } } \ No newline at end of file diff --git a/src/mlcompute.cs b/src/mlcompute.cs new file mode 100644 index 000000000000..4f2082728175 --- /dev/null +++ b/src/mlcompute.cs @@ -0,0 +1,2114 @@ +using System; +using System.Runtime.InteropServices; + +using Foundation; +using Metal; +using ObjCRuntime; + +namespace MLCompute { + + // compilation helper for async custom types + interface MLCExecutionResult {} + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCActivationType { + None = 0, + ReLU = 1, + Linear = 2, + Sigmoid = 3, + HardSigmoid = 4, + Tanh = 5, + Absolute = 6, + SoftPlus = 7, + SoftSign = 8, + Elu = 9, + ReLun = 10, + LogSigmoid = 11, + Selu = 12, + Celu = 13, + HardShrink = 14, + SoftShrink = 15, + TanhShrink = 16, + Threshold = 17, + Gelu = 18, + // Count, // must be last, not available in swift + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCArithmeticOperation { + Add = 0, + Subtract = 1, + Multiply = 2, + Divide = 3, + Floor = 4, + Round = 5, + Ceil = 6, + Sqrt = 7, + Rsqrt = 8, + Sin = 9, + Cos = 10, + Tan = 11, + Asin = 12, + Acos = 13, + Atan = 14, + Sinh = 15, + Cosh = 16, + Tanh = 17, + Asinh = 18, + Acosh = 19, + Atanh = 20, + Pow = 21, + Exp = 22, + Exp2 = 23, + Log = 24, + Log2 = 25, + // Count, // must be last, not available in swift + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCConvolutionType { + Standard = 0, + Transposed = 1, + Depthwise = 2, + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCDataType { + Invalid = 0, + Float32 = 1, + Boolean = 4, + Int64 = 5, + // Count, // must be last, not available in swift + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCDeviceType /* int32_t */ { + Cpu = 0, + Gpu = 1, + Any = 2, + // Count, // must be last, not available in swift + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [Flags] + enum MLCExecutionOptions : ulong { + None = 0x0, + SkipWritingInputDataToDevice = 0x1, + Synchronous = 0x2, + Profiling = 0x4, + ForwardForInference = 0x8, + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [Flags] + enum MLCGraphCompilationOptions : ulong { + None = 0x0, + DebugLayers = 0x1, + DisableLayerFusion = 0x2, + LinkGraphs = 0x4, + ComputeAllGradients = 0x8, + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCLossType { + MeanAbsoluteError = 0, + MeanSquaredError = 1, + SoftmaxCrossEntropy = 2, + SigmoidCrossEntropy = 3, + CategoricalCrossEntropy = 4, + Hinge = 5, + Huber = 6, + CosineDistance = 7, + Log = 8, + // Count, // must be last, not available in swift + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCLstmResultMode : ulong /* uint64_t */ { + Output = 0, + OutputAndStates = 1, + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCPaddingPolicy { + Same = 0, + Valid = 1, + UsePaddingSize = 2, + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCPaddingType { + Zero = 0, + Reflect = 1, + Symmetric = 2, + Constant = 3, + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCPoolingType + { + Max = 1, + Average = 2, + L2Norm = 3, + // Count, // must be last, not available in swift + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCRandomInitializerType { + Invalid = 0, + Uniform = 1, + GlorotUniform = 2, + Xavier = 3, + // Count, // must be last, not available in swift + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCReductionType { + None = 0, + Sum = 1, + Mean = 2, + Max = 3, + Min = 4, + ArgMax = 5, + ArgMin = 6, + // Count, // must be last, not available in swift + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCRegularizationType { + None = 0, + L1 = 1, + L2 = 2, + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCSampleMode { + Nearest = 0, + Linear = 1, + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + enum MLCSoftmaxOperation { + Softmax = 0, + LogSoftmax = 1, + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCActivationDescriptor : NSCopying { + + [Export ("activationType")] + MLCActivationType ActivationType { get; } + + [Export ("a")] + float A { get; } + + [Export ("b")] + float B { get; } + + [Export ("c")] + float C { get; } + + [Static] + [Export ("descriptorWithType:")] + [return: NullAllowed] + MLCActivationDescriptor Create (MLCActivationType activationType); + + [Static] + [Export ("descriptorWithType:a:")] + [return: NullAllowed] + MLCActivationDescriptor Create (MLCActivationType activationType, float a); + + [Static] + [Export ("descriptorWithType:a:b:")] + [return: NullAllowed] + MLCActivationDescriptor Create (MLCActivationType activationType, float a, float b); + + [Static] + [Export ("descriptorWithType:a:b:c:")] + [return: NullAllowed] + MLCActivationDescriptor Create (MLCActivationType activationType, float a, float b, float c); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCLayer { + + [Export ("layerID")] + nuint LayerId { get; } + + [Export ("label")] + string Label { get; set; } + + [Export ("isDebuggingEnabled")] + bool IsDebuggingEnabled { get; set; } + + [Static] + [Export ("supportsDataType:onDevice:")] + bool SupportsDataType (MLCDataType dataType, MLCDeviceType device); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCActivationLayer { + + [Export ("descriptor", ArgumentSemantic.Copy)] + MLCActivationDescriptor Descriptor { get; } + + [Static] + [Export ("layerWithDescriptor:")] + MLCActivationLayer Create (MLCActivationDescriptor descriptor); + + [Static] + [Export ("reluLayer")] + MLCActivationLayer ReluLayer { get; } + + [Static] + [Export ("relu6Layer")] + MLCActivationLayer Relu6Layer { get; } + + [Static] + [Export ("leakyReLULayer")] + MLCActivationLayer LeakyReLULayer { get; } + + [Static] + [Export ("leakyReLULayerWithNegativeSlope:")] + MLCActivationLayer CreateLeakyReLULayer (float negativeSlope); + + [Static] + [Export ("linearLayerWithScale:bias:")] + MLCActivationLayer CreateLinearLayer (float scale, float bias); + + [Static] + [Export ("sigmoidLayer")] + MLCActivationLayer SigmoidLayer { get; } + + [Static] + [Export ("hardSigmoidLayer")] + MLCActivationLayer HardSigmoidLayer { get; } + + [Static] + [Export ("tanhLayer")] + MLCActivationLayer TanhLayer { get; } + + [Static] + [Export ("absoluteLayer")] + MLCActivationLayer AbsoluteLayer { get; } + + [Static] + [Export ("softPlusLayer")] + MLCActivationLayer SoftPlusLayer { get; } + + [Static] + [Export ("softPlusLayerWithBeta:")] + MLCActivationLayer CreateSoftPlusLayer (float beta); + + [Static] + [Export ("softSignLayer")] + MLCActivationLayer SoftSignLayer { get; } + + [Static] + [Export ("eluLayer")] + MLCActivationLayer EluLayer { get; } + + [Static] + [Export ("eluLayerWithA:")] + MLCActivationLayer CreateEluLayer (float a); + + [Static] + [Export ("relunLayerWithA:b:")] + MLCActivationLayer CreateRelunLayer (float a, float b); + + [Static] + [Export ("logSigmoidLayer")] + MLCActivationLayer LogSigmoidLayer { get; } + + [Static] + [Export ("seluLayer")] + MLCActivationLayer SeluLayer { get; } + + [Static] + [Export ("celuLayer")] + MLCActivationLayer CeluLayer { get; } + + [Static] + [Export ("celuLayerWithA:")] + MLCActivationLayer CreateCeluLayer (float a); + + [Static] + [Export ("hardShrinkLayer")] + MLCActivationLayer HardShrinkLayer { get; } + + [Static] + [Export ("hardShrinkLayerWithA:")] + MLCActivationLayer CreateHardShrinkLayer (float a); + + [Static] + [Export ("softShrinkLayer")] + MLCActivationLayer SoftShrinkLayer { get; } + + [Static] + [Export ("softShrinkLayerWithA:")] + MLCActivationLayer CreateSoftShrinkLayer (float a); + + [Static] + [Export ("tanhShrinkLayer")] + MLCActivationLayer TanhShrinkLayer { get; } + + [Static] + [Export ("thresholdLayerWithThreshold:replacement:")] + MLCActivationLayer CreateThresholdLayer (float threshold, float replacement); + + [Static] + [Export ("geluLayer")] + MLCActivationLayer GeluLayer { get; } + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCOptimizer : NSCopying { + + [Export ("learningRate")] + float LearningRate { get; set; } + + [Export ("gradientRescale")] + float GradientRescale { get; } + + [Export ("appliesGradientClipping")] + bool AppliesGradientClipping { get; set; } + + [Export ("gradientClipMax")] + float GradientClipMax { get; } + + [Export ("gradientClipMin")] + float GradientClipMin { get; } + + [Export ("regularizationScale")] + float RegularizationScale { get; } + + [Export ("regularizationType")] + MLCRegularizationType RegularizationType { get; } + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCOptimizerDescriptor : NSCopying { + + [Export ("learningRate")] + float LearningRate { get; } + + [Export ("gradientRescale")] + float GradientRescale { get; } + + [Export ("appliesGradientClipping")] + bool AppliesGradientClipping { get; } + + [Export ("gradientClipMax")] + float GradientClipMax { get; } + + [Export ("gradientClipMin")] + float GradientClipMin { get; } + + [Export ("regularizationScale")] + float RegularizationScale { get; } + + [Export ("regularizationType")] + MLCRegularizationType RegularizationType { get; } + + [Static] + [Export ("descriptorWithLearningRate:gradientRescale:regularizationType:regularizationScale:")] + MLCOptimizerDescriptor Create (float learningRate, float gradientRescale, MLCRegularizationType regularizationType, float regularizationScale); + + [Static] + [Export ("descriptorWithLearningRate:gradientRescale:appliesGradientClipping:gradientClipMax:gradientClipMin:regularizationType:regularizationScale:")] + MLCOptimizerDescriptor Create (float learningRate, float gradientRescale, bool appliesGradientClipping, float gradientClipMax, float gradientClipMin, MLCRegularizationType regularizationType, float regularizationScale); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCOptimizer))] + [DisableDefaultCtor] + [TV (14,0), Mac (10,15), iOS (14,0)] + interface MLCAdamOptimizer : NSCopying { + + [Export ("beta1")] + float Beta1 { get; } + + [Export ("beta2")] + float Beta2 { get; } + + [Export ("epsilon")] + float Epsilon { get; } + + [Export ("timeStep")] + nuint TimeStep { get; } + + [Static] + [Export ("optimizerWithDescriptor:")] + MLCAdamOptimizer Create (MLCOptimizerDescriptor optimizerDescriptor); + + [Static] + [Export ("optimizerWithDescriptor:beta1:beta2:epsilon:timeStep:")] + MLCAdamOptimizer Create (MLCOptimizerDescriptor optimizerDescriptor, float beta1, float beta2, float epsilon, nuint timeStep); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCDevice : NSCopying { + + [Export ("type")] + MLCDeviceType Type { get; } + + [Export ("gpuDevices")] + IMTLDevice[] GpuDevices { get; } + + [Static] + [Export ("cpuDevice")] + MLCDevice GetCpu (); + + [Static] + [Export ("gpuDevice")] + [return: NullAllowed] + MLCDevice GetGpu (); + + [Static] + [Export ("deviceWithType:")] + [return: NullAllowed] + MLCDevice GetDevice (MLCDeviceType type); + + [Static] + [Export ("deviceWithGPUDevices:")] + [return: NullAllowed] + MLCDevice GetDevice (IMTLDevice[] gpus); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCTensor : NSCopying { + + [Export ("tensorID")] + nuint TensorId { get; } + + [Export ("descriptor", ArgumentSemantic.Copy)] + MLCTensorDescriptor Descriptor { get; } + + [NullAllowed, Export ("data", ArgumentSemantic.Retain)] + NSData Data { get; } + + [Export ("label")] + string Label { get; set; } + + [NullAllowed, Export ("device", ArgumentSemantic.Retain)] + MLCDevice Device { get; } + + [Export ("optimizerData", ArgumentSemantic.Copy)] + MLCTensorData[] OptimizerData { get; set; } + + [Export ("optimizerDeviceData", ArgumentSemantic.Copy)] + MLCTensorOptimizerDeviceData[] OptimizerDeviceData { get; } + + [Static] + [Export ("tensorWithDescriptor:")] + MLCTensor Create (MLCTensorDescriptor tensorDescriptor); + + [Static] + [Export ("tensorWithDescriptor:randomInitializerType:")] + MLCTensor Create (MLCTensorDescriptor tensorDescriptor, MLCRandomInitializerType randomInitializerType); + + [Static] + [Export ("tensorWithDescriptor:data:")] + MLCTensor Create (MLCTensorDescriptor tensorDescriptor, MLCTensorData data); + + [Static] + [Export ("tensorWithShape:")] + MLCTensor Create ([BindAs (typeof (nint[]))] NSNumber[] shape); + + [Static] + [Export ("tensorWithShape:randomInitializerType:")] + MLCTensor Create ([BindAs (typeof (nint[]))] NSNumber[] shape, MLCRandomInitializerType randomInitializerType); + + [Static] + [Export ("tensorWithShape:dataType:")] + MLCTensor Create ([BindAs (typeof (nint[]))] NSNumber[] shape, MLCDataType dataType); + + [Static] + [Export ("tensorWithShape:data:dataType:")] + MLCTensor Create ([BindAs (typeof (nint[]))] NSNumber[] shape, MLCTensorData data, MLCDataType dataType); + + [Static] + [Export ("tensorWithWidth:height:featureChannelCount:batchSize:")] + MLCTensor Create (nuint width, nuint height, nuint featureChannelCount, nuint batchSize); + + [Static] + [Export ("tensorWithWidth:height:featureChannelCount:batchSize:fillWithData:dataType:")] + MLCTensor Create (nuint width, nuint height, nuint featureChannelCount, nuint batchSize, float fillWithData, MLCDataType dataType); + + [Static] + [Export ("tensorWithWidth:height:featureChannelCount:batchSize:randomInitializerType:")] + MLCTensor Create (nuint width, nuint height, nuint featureChannelCount, nuint batchSize, MLCRandomInitializerType randomInitializerType); + + [Static] + [Export ("tensorWithWidth:height:featureChannelCount:batchSize:data:")] + MLCTensor Create (nuint width, nuint height, nuint featureChannelCount, nuint batchSize, MLCTensorData data); + + [Static] + [Export ("tensorWithWidth:height:featureChannelCount:batchSize:data:dataType:")] + MLCTensor Create (nuint width, nuint height, nuint featureChannelCount, nuint batchSize, MLCTensorData data, MLCDataType dataType); + + [Static] + [Export ("tensorWithSequenceLength:featureChannelCount:batchSize:")] + MLCTensor Create (nuint sequenceLength, nuint featureChannelCount, nuint batchSize); + + [Static] + [Export ("tensorWithSequenceLength:featureChannelCount:batchSize:randomInitializerType:")] + MLCTensor Create (nuint sequenceLength, nuint featureChannelCount, nuint batchSize, MLCRandomInitializerType randomInitializerType); + + [Static] + [Export ("tensorWithSequenceLength:featureChannelCount:batchSize:data:")] + MLCTensor Create (nuint sequenceLength, nuint featureChannelCount, nuint batchSize, [NullAllowed] MLCTensorData data); + + [Static] + [Export ("tensorWithSequenceLengths:sortedSequences:featureChannelCount:batchSize:randomInitializerType:")] + [return: NullAllowed] + MLCTensor Create ([BindAs (typeof (nint[]))] NSNumber[] sequenceLengths, bool sortedSequences, nuint featureChannelCount, nuint batchSize, MLCRandomInitializerType randomInitializerType); + + [Static] + [Export ("tensorWithShape:fillWithData:dataType:")] + MLCTensor Create ([BindAs (typeof (nint[]))] NSNumber[] shape, NSNumber fillData, MLCDataType dataType); + + [Static] + [Export ("tensorWithDescriptor:fillWithData:")] + MLCTensor Create (MLCTensorDescriptor tensorDescriptor, NSNumber fillData); + + [Static] + [Export ("tensorWithSequenceLengths:sortedSequences:featureChannelCount:batchSize:data:")] + [return: NullAllowed] + MLCTensor Create ([BindAs (typeof (nint[]))] NSNumber[] sequenceLengths, bool sortedSequences, nuint featureChannelCount, nuint batchSize, [NullAllowed] MLCTensorData data); + + [Export ("hasValidNumerics")] + bool HasValidNumerics { get; } + + [Export ("synchronizeData")] + bool SynchronizeData (); + + [Export ("synchronizeOptimizerData")] + bool SynchronizeOptimizerData (); + + [Export ("copyDataFromDeviceMemoryToBytes:length:synchronizeWithDevice:")] + bool CopyDataFromDeviceMemory (IntPtr bytes, nuint length, bool synchronizeWithDevice); + + [Export ("bindAndWriteData:toDevice:")] + bool BindAndWrite (MLCTensorData data, MLCDevice device); + + [Export ("bindOptimizerData:deviceData:")] + bool BindOptimizer (MLCTensorData[] data, [NullAllowed] MLCTensorOptimizerDeviceData[] deviceData); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCTensorData { + + [Export ("bytes")] + IntPtr Bytes { get; } + + [Export ("length")] + nuint Length { get; } + + [Static] + [Export ("dataWithBytesNoCopy:length:")] + MLCTensorData CreateFromBytesNoCopy (IntPtr bytes, nuint length); + + [Static] + [Export ("dataWithImmutableBytesNoCopy:length:")] + MLCTensorData CreateFromImmutableBytesNoCopy (IntPtr bytes, nuint length); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCTensorDescriptor : NSCopying { + + [Export ("dataType")] + MLCDataType DataType { get; } + + [Export ("dimensionCount")] + nuint DimensionCount { get; } + + [Export ("shape", ArgumentSemantic.Copy)] + [BindAs (typeof (nint[]))] // swift `[Int]` + NSNumber[] Shape { get; } + + [Export ("stride", ArgumentSemantic.Copy)] + [BindAs (typeof (nint[]))] // swift `[Int]` + NSNumber[] Stride { get; } + + [Export ("tensorAllocationSizeInBytes")] + nuint TensorAllocationSizeInBytes { get; } + + [NullAllowed] + [Export ("sequenceLengths", ArgumentSemantic.Copy)] + [BindAs (typeof (nint[]))] // swift `[Int]?` + NSNumber[] SequenceLengths { get; } + + [Export ("sortedSequences")] + bool SortedSequences { get; } + + [NullAllowed] + [Export ("batchSizePerSequenceStep", ArgumentSemantic.Copy)] + [BindAs (typeof (nint[]))] // swift `[Int]?` + NSNumber[] BatchSizePerSequenceStep { get; } + + [Static] + [Export ("maxTensorDimensions")] + nuint MaxTensorDimensions { get; } + + [Static] + [Export ("descriptorWithShape:dataType:")] + [return: NullAllowed] + MLCTensorDescriptor Create ([BindAs (typeof (nint[]))] NSNumber[] shape, MLCDataType dataType); + + [Static] + [Export ("descriptorWithShape:sequenceLengths:sortedSequences:dataType:")] + [return: NullAllowed] + MLCTensorDescriptor Create ([BindAs (typeof (nint[]))]NSNumber[] shape, [BindAs (typeof (nint[]))] NSNumber[] sequenceLengths, bool sortedSequences, MLCDataType dataType); + + [Static] + [Export ("descriptorWithWidth:height:featureChannelCount:batchSize:")] + [return: NullAllowed] + MLCTensorDescriptor Create (nuint width, nuint height, nuint featureChannels, nuint batchSize); + + [Static] + [Export ("descriptorWithWidth:height:featureChannelCount:batchSize:dataType:")] + [return: NullAllowed] + MLCTensorDescriptor Create (nuint width, nuint height, nuint featureChannelCount, nuint batchSize, MLCDataType dataType); + + [Static] + [Export ("convolutionWeightsDescriptorWithWidth:height:inputFeatureChannelCount:outputFeatureChannelCount:dataType:")] + [return: NullAllowed] + MLCTensorDescriptor CreateConvolutionWeights (nuint width, nuint height, nuint inputFeatureChannelCount, nuint outputFeatureChannelCount, MLCDataType dataType); + + [Static] + [Export ("convolutionWeightsDescriptorWithInputFeatureChannelCount:outputFeatureChannelCount:dataType:")] + [return: NullAllowed] + MLCTensorDescriptor CreateConvolutionWeights (nuint inputFeatureChannelCount, nuint outputFeatureChannelCount, MLCDataType dataType); + + [Static] + [Export ("convolutionBiasesDescriptorWithFeatureChannelCount:dataType:")] + [return: NullAllowed] + MLCTensorDescriptor CreateConvolutionBiases (nuint featureChannelCount, MLCDataType dataType); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCTensorParameter { + + [Export ("tensor", ArgumentSemantic.Retain)] + MLCTensor Tensor { get; } + + [Export ("isUpdatable")] + bool IsUpdatable { get; set; } + + [Static] + [Export ("parameterWithTensor:")] + MLCTensorParameter Create (MLCTensor tensor); + + [Static] + [Export ("parameterWithTensor:optimizerData:")] + MLCTensorParameter Create (MLCTensor tensor, [NullAllowed] MLCTensorData[] optimizerData); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCArithmeticLayer { + + [Export ("operation")] + MLCArithmeticOperation Operation { get; } + + [Static] + [Export ("layerWithOperation:")] + MLCArithmeticLayer Create (MLCArithmeticOperation operation); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCBatchNormalizationLayer { + + [Export ("featureChannelCount")] + nuint FeatureChannelCount { get; } + + [Export ("mean", ArgumentSemantic.Retain)] + MLCTensor Mean { get; } + + [Export ("variance", ArgumentSemantic.Retain)] + MLCTensor Variance { get; } + + [NullAllowed, Export ("beta", ArgumentSemantic.Retain)] + MLCTensor Beta { get; } + + [NullAllowed, Export ("gamma", ArgumentSemantic.Retain)] + MLCTensor Gamma { get; } + + [NullAllowed, Export ("betaParameter", ArgumentSemantic.Retain)] + MLCTensorParameter BetaParameter { get; } + + [NullAllowed, Export ("gammaParameter", ArgumentSemantic.Retain)] + MLCTensorParameter GammaParameter { get; } + + [Export ("varianceEpsilon")] + float VarianceEpsilon { get; } + + [Export ("momentum")] + float Momentum { get; } + + [Static] + [Export ("layerWithFeatureChannelCount:mean:variance:beta:gamma:varianceEpsilon:")] + [return: NullAllowed] + MLCBatchNormalizationLayer Create (nuint featureChannelCount, MLCTensor mean, MLCTensor variance, [NullAllowed] MLCTensor beta, [NullAllowed] MLCTensor gamma, float varianceEpsilon); + + [Static] + [Export ("layerWithFeatureChannelCount:mean:variance:beta:gamma:varianceEpsilon:momentum:")] + [return: NullAllowed] + MLCBatchNormalizationLayer Create (nuint featureChannelCount, MLCTensor mean, MLCTensor variance, [NullAllowed] MLCTensor beta, [NullAllowed] MLCTensor gamma, float varianceEpsilon, float momentum); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCConcatenationLayer { + + [Export ("dimension")] + nuint Dimension { get; } + + [Static] + [Export ("layer")] + MLCConcatenationLayer Create (); + + [Static] + [Export ("layerWithDimension:")] + MLCConcatenationLayer Create (nuint dimension); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCConvolutionDescriptor : NSCopying { + + [Export ("convolutionType")] + MLCConvolutionType ConvolutionType { get; } + + [Export ("kernelWidth")] + nuint KernelWidth { get; } + + [Export ("kernelHeight")] + nuint KernelHeight { get; } + + [Export ("inputFeatureChannelCount")] + nuint InputFeatureChannelCount { get; } + + [Export ("outputFeatureChannelCount")] + nuint OutputFeatureChannelCount { get; } + + [Export ("strideInX")] + nuint StrideInX { get; } + + [Export ("strideInY")] + nuint StrideInY { get; } + + [Export ("dilationRateInX")] + nuint DilationRateInX { get; } + + [Export ("dilationRateInY")] + nuint DilationRateInY { get; } + + [Export ("groupCount")] + nuint GroupCount { get; } + + [Export ("paddingPolicy")] + MLCPaddingPolicy PaddingPolicy { get; } + + [Export ("paddingSizeInX")] + nuint PaddingSizeInX { get; } + + [Export ("paddingSizeInY")] + nuint PaddingSizeInY { get; } + + [Export ("isConvolutionTranspose")] + bool IsConvolutionTranspose { get; } + + [Export ("usesDepthwiseConvolution")] + bool UsesDepthwiseConvolution { get; } + + [Static] + [Export ("descriptorWithType:kernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:groupCount:strides:dilationRates:paddingPolicy:paddingSizes:")] + MLCConvolutionDescriptor Create (MLCConvolutionType convolutionType, [BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, nuint inputFeatureChannelCount, nuint outputFeatureChannelCount, nuint groupCount, [BindAs (typeof (nuint[]))] NSNumber[] strides, [BindAs (typeof (nuint[]))] NSNumber[] dilationRates, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes); + + [Static] + [Export ("descriptorWithKernelWidth:kernelHeight:inputFeatureChannelCount:outputFeatureChannelCount:")] + MLCConvolutionDescriptor Create (nuint kernelWidth, nuint kernelHeight, nuint inputFeatureChannelCount, nuint outputFeatureChannelCount); + + [Static] + [Export ("descriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:strides:paddingPolicy:paddingSizes:")] + MLCConvolutionDescriptor Create ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, nuint inputFeatureChannelCount, nuint outputFeatureChannelCount, [BindAs (typeof (nuint[]))] NSNumber[] strides, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes); + + [Static] + [Export ("descriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:groupCount:strides:dilationRates:paddingPolicy:paddingSizes:")] + MLCConvolutionDescriptor Create ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, nuint inputFeatureChannelCount, nuint outputFeatureChannelCount, nuint groupCount, [BindAs (typeof (nuint[]))] NSNumber[] strides, [BindAs (typeof (nuint[]))] NSNumber[] dilationRates, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes); + + [Static] + [Export ("convolutionTransposeDescriptorWithKernelWidth:kernelHeight:inputFeatureChannelCount:outputFeatureChannelCount:")] + MLCConvolutionDescriptor CreateConvolutionTranspose (nuint kernelWidth, nuint kernelHeight, nuint inputFeatureChannelCount, nuint outputFeatureChannelCount); + + [Static] + [Export ("convolutionTransposeDescriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:strides:paddingPolicy:paddingSizes:")] + MLCConvolutionDescriptor CreateConvolutionTranspose ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, nuint inputFeatureChannelCount, nuint outputFeatureChannelCount, [BindAs (typeof (nuint[]))] NSNumber[] strides, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes); + + [Static] + [Export ("convolutionTransposeDescriptorWithKernelSizes:inputFeatureChannelCount:outputFeatureChannelCount:groupCount:strides:dilationRates:paddingPolicy:paddingSizes:")] + MLCConvolutionDescriptor CreateConvolutionTranspose ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, nuint inputFeatureChannelCount, nuint outputFeatureChannelCount, nuint groupCount, [BindAs (typeof (nuint[]))] NSNumber[] strides, [BindAs (typeof (nuint[]))] NSNumber[] dilationRates, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes); + + [Static] + [Export ("depthwiseConvolutionDescriptorWithKernelWidth:kernelHeight:inputFeatureChannelCount:channelMultiplier:")] + MLCConvolutionDescriptor CreateDepthwiseConvolution (nuint kernelWidth, nuint kernelHeight, nuint inputFeatureChannelCount, nuint channelMultiplier); + + [Static] + [Export ("depthwiseConvolutionDescriptorWithKernelSizes:inputFeatureChannelCount:channelMultiplier:strides:paddingPolicy:paddingSizes:")] + MLCConvolutionDescriptor CreateDepthwiseConvolution ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, nuint inputFeatureChannelCount, nuint channelMultiplier, [BindAs (typeof (nuint[]))] NSNumber[] strides, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes); + + [Static] + [Export ("depthwiseConvolutionDescriptorWithKernelSizes:inputFeatureChannelCount:channelMultiplier:strides:dilationRates:paddingPolicy:paddingSizes:")] + MLCConvolutionDescriptor CreateDepthwiseConvolution ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, nuint inputFeatureChannelCount, nuint channelMultiplier, [BindAs (typeof (nuint[]))] NSNumber[] strides, [BindAs (typeof (nuint[]))] NSNumber[] dilationRates, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCConvolutionLayer { + + [Export ("descriptor", ArgumentSemantic.Copy)] + MLCConvolutionDescriptor Descriptor { get; } + + [Export ("weights", ArgumentSemantic.Retain)] + MLCTensor Weights { get; } + + [NullAllowed, Export ("biases", ArgumentSemantic.Retain)] + MLCTensor Biases { get; } + + [Export ("weightsParameter", ArgumentSemantic.Retain)] + MLCTensorParameter WeightsParameter { get; } + + [NullAllowed, Export ("biasesParameter", ArgumentSemantic.Retain)] + MLCTensorParameter BiasesParameter { get; } + + [Static] + [Export ("layerWithWeights:biases:descriptor:")] + [return: NullAllowed] + MLCConvolutionLayer Create (MLCTensor weights, [NullAllowed] MLCTensor biases, MLCConvolutionDescriptor descriptor); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCDropoutLayer { + + [Export ("rate")] + float Rate { get; } + + [Export ("seed")] + nuint Seed { get; } + + [Static] + [Export ("layerWithRate:seed:")] + MLCDropoutLayer Create (float rate, nuint seed); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCEmbeddingDescriptor : NSCopying { + + [Export ("embeddingCount")] + [BindAs (typeof (nint))] // swift `Int` + NSNumber EmbeddingCount { get; } + + [Export ("embeddingDimension")] + [BindAs (typeof (nint))] // swift `Int` + NSNumber EmbeddingDimension { get; } + + [NullAllowed] + [Export ("paddingIndex")] + [BindAs (typeof (nint?))] // swift `Int?` + NSNumber PaddingIndex { get; } + + [NullAllowed] + [Export ("maximumNorm")] + [BindAs (typeof (float?))] // swift `Float?` + NSNumber MaximumNorm { get; } + + [NullAllowed] + [Export ("pNorm")] + [BindAs (typeof (float?))] // swift `Float?` + NSNumber PNorm { get; } + + [Export ("scalesGradientByFrequency")] + bool ScalesGradientByFrequency { get; } + + [Static] + [Export ("descriptorWithEmbeddingCount:embeddingDimension:")] + [return: NullAllowed] + MLCEmbeddingDescriptor Create ([BindAs (typeof (nint))] NSNumber embeddingCount, [BindAs (typeof (nint))] NSNumber embeddingDimension); + + [Static] + [Export ("descriptorWithEmbeddingCount:embeddingDimension:paddingIndex:maximumNorm:pNorm:scalesGradientByFrequency:")] + [return: NullAllowed] + MLCEmbeddingDescriptor Create ([BindAs (typeof (nint))] NSNumber embeddingCount, [BindAs (typeof (nint))] NSNumber embeddingDimension, [BindAs (typeof (nint?))] NSNumber paddingIndex, [BindAs (typeof (float?))] NSNumber maximumNorm, [BindAs (typeof (float?))] NSNumber pNorm, bool scalesGradientByFrequency); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCEmbeddingLayer { + + [Export ("descriptor", ArgumentSemantic.Copy)] + MLCEmbeddingDescriptor Descriptor { get; } + + [Export ("weights", ArgumentSemantic.Retain)] + MLCTensor Weights { get; } + + [Export ("weightsParameter", ArgumentSemantic.Retain)] + MLCTensorParameter WeightsParameter { get; } + + [Static] + [Export ("layerWithDescriptor:weights:")] + MLCEmbeddingLayer Create (MLCEmbeddingDescriptor descriptor, MLCTensor weights); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCFullyConnectedLayer { + + [Export ("descriptor", ArgumentSemantic.Copy)] + MLCConvolutionDescriptor Descriptor { get; } + + [Export ("weights", ArgumentSemantic.Retain)] + MLCTensor Weights { get; } + + [NullAllowed, Export ("biases", ArgumentSemantic.Retain)] + MLCTensor Biases { get; } + + [Export ("weightsParameter", ArgumentSemantic.Retain)] + MLCTensorParameter WeightsParameter { get; } + + [NullAllowed, Export ("biasesParameter", ArgumentSemantic.Retain)] + MLCTensorParameter BiasesParameter { get; } + + [Static] + [Export ("layerWithWeights:biases:descriptor:")] + [return: NullAllowed] + MLCFullyConnectedLayer Create (MLCTensor weights, [NullAllowed] MLCTensor biases, MLCConvolutionDescriptor descriptor); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCGramMatrixLayer { + + [Export ("scale")] + float Scale { get; } + + [Static] + [Export ("layerWithScale:")] + MLCGramMatrixLayer Create (float scale); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCGroupNormalizationLayer { + + [Export ("featureChannelCount")] + nuint FeatureChannelCount { get; } + + [Export ("groupCount")] + nuint GroupCount { get; } + + [NullAllowed, Export ("beta", ArgumentSemantic.Retain)] + MLCTensor Beta { get; } + + [NullAllowed, Export ("gamma", ArgumentSemantic.Retain)] + MLCTensor Gamma { get; } + + [NullAllowed, Export ("betaParameter", ArgumentSemantic.Retain)] + MLCTensorParameter BetaParameter { get; } + + [NullAllowed, Export ("gammaParameter", ArgumentSemantic.Retain)] + MLCTensorParameter GammaParameter { get; } + + [Export ("varianceEpsilon")] + float VarianceEpsilon { get; } + + [Static] + [Export ("layerWithFeatureChannelCount:groupCount:beta:gamma:varianceEpsilon:")] + [return: NullAllowed] + MLCGroupNormalizationLayer Create (nuint featureChannelCount, nuint groupCount, [NullAllowed] MLCTensor beta, [NullAllowed] MLCTensor gamma, float varianceEpsilon); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCInstanceNormalizationLayer { + + [Export ("featureChannelCount")] + nuint FeatureChannelCount { get; } + + [NullAllowed, Export ("beta", ArgumentSemantic.Retain)] + MLCTensor Beta { get; } + + [NullAllowed, Export ("gamma", ArgumentSemantic.Retain)] + MLCTensor Gamma { get; } + + [NullAllowed, Export ("betaParameter", ArgumentSemantic.Retain)] + MLCTensorParameter BetaParameter { get; } + + [NullAllowed, Export ("gammaParameter", ArgumentSemantic.Retain)] + MLCTensorParameter GammaParameter { get; } + + [Export ("varianceEpsilon")] + float VarianceEpsilon { get; } + + [Export ("momentum")] + float Momentum { get; } + + [Static] + [Export ("layerWithFeatureChannelCount:beta:gamma:varianceEpsilon:")] + [return: NullAllowed] + MLCInstanceNormalizationLayer Create (nuint featureChannelCount, [NullAllowed] MLCTensor beta, [NullAllowed] MLCTensor gamma, float varianceEpsilon); + + [Static] + [Export ("layerWithFeatureChannelCount:beta:gamma:varianceEpsilon:momentum:")] + [return: NullAllowed] + MLCInstanceNormalizationLayer Create (nuint featureChannelCount, [NullAllowed] MLCTensor beta, [NullAllowed] MLCTensor gamma, float varianceEpsilon, float momentum); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCLayerNormalizationLayer { + + [Export ("normalizedShape", ArgumentSemantic.Copy)] + [BindAs (typeof (nint[]))] // swift `[Int]` + NSNumber[] NormalizedShape { get; } + + [NullAllowed, Export ("beta", ArgumentSemantic.Retain)] + MLCTensor Beta { get; } + + [NullAllowed, Export ("gamma", ArgumentSemantic.Retain)] + MLCTensor Gamma { get; } + + [NullAllowed, Export ("betaParameter", ArgumentSemantic.Retain)] + MLCTensorParameter BetaParameter { get; } + + [NullAllowed, Export ("gammaParameter", ArgumentSemantic.Retain)] + MLCTensorParameter GammaParameter { get; } + + [Export ("varianceEpsilon")] + float VarianceEpsilon { get; } + + [Static] + [Export ("layerWithNormalizedShape:beta:gamma:varianceEpsilon:")] + [return: NullAllowed] + MLCLayerNormalizationLayer Create ([BindAs (typeof (nint[]))] NSNumber[] normalizedShape, [NullAllowed] MLCTensor beta, [NullAllowed] MLCTensor gamma, float varianceEpsilon); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCLossDescriptor : NSCopying { + + [Export ("lossType")] + MLCLossType LossType { get; } + + [Export ("reductionType")] + MLCReductionType ReductionType { get; } + + [Export ("weight")] + float Weight { get; } + + [Export ("labelSmoothing")] + float LabelSmoothing { get; } + + [Export ("classCount")] + nuint ClassCount { get; } + + [Export ("epsilon")] + float Epsilon { get; } + + [Export ("delta")] + float Delta { get; } + + [Static] + [Export ("descriptorWithType:reductionType:")] + MLCLossDescriptor Create (MLCLossType lossType, MLCReductionType reductionType); + + [Static] + [Export ("descriptorWithType:reductionType:weight:")] + MLCLossDescriptor Create (MLCLossType lossType, MLCReductionType reductionType, float weight); + + [Static] + [Export ("descriptorWithType:reductionType:weight:labelSmoothing:classCount:")] + MLCLossDescriptor Create (MLCLossType lossType, MLCReductionType reductionType, float weight, float labelSmoothing, nuint classCount); + + [Static] + [Export ("descriptorWithType:reductionType:weight:labelSmoothing:classCount:epsilon:delta:")] + MLCLossDescriptor Create (MLCLossType lossType, MLCReductionType reductionType, float weight, float labelSmoothing, nuint classCount, float epsilon, float delta); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCLossLayer { + + [Export ("descriptor", ArgumentSemantic.Copy)] + MLCLossDescriptor Descriptor { get; } + + [NullAllowed, Export ("weights", ArgumentSemantic.Retain)] + MLCTensor Weights { get; } + + [Static] + [Export ("layerWithDescriptor:")] + MLCLossLayer Create (MLCLossDescriptor lossDescriptor); + + [Static] + [Export ("layerWithDescriptor:weights:")] + MLCLossLayer Create (MLCLossDescriptor lossDescriptor, MLCTensor weights); + + [Static] + [Export ("softmaxCrossEntropyLossWithReductionType:labelSmoothing:classCount:weight:")] + MLCLossLayer CreateSoftmaxCrossEntropyLoss (MLCReductionType reductionType, float labelSmoothing, nuint classCount, float weight); + + [Static] + [Export ("softmaxCrossEntropyLossWithReductionType:labelSmoothing:classCount:weights:")] + MLCLossLayer CreateSoftmaxCrossEntropyLoss (MLCReductionType reductionType, float labelSmoothing, nuint classCount, [NullAllowed] MLCTensor weights); + + [Static] + [Export ("categoricalCrossEntropyLossWithReductionType:labelSmoothing:classCount:weight:")] + MLCLossLayer CreateCategoricalCrossEntropyLoss (MLCReductionType reductionType, float labelSmoothing, nuint classCount, float weight); + + [Static] + [Export ("categoricalCrossEntropyLossWithReductionType:labelSmoothing:classCount:weights:")] + MLCLossLayer CreateCategoricalCrossEntropyLoss (MLCReductionType reductionType, float labelSmoothing, nuint classCount, [NullAllowed] MLCTensor weights); + + [Static] + [Export ("sigmoidCrossEntropyLossWithReductionType:labelSmoothing:weight:")] + MLCLossLayer CreateSigmoidCrossEntropyLoss (MLCReductionType reductionType, float labelSmoothing, float weight); + + [Static] + [Export ("sigmoidCrossEntropyLossWithReductionType:labelSmoothing:weights:")] + MLCLossLayer CreateSigmoidCrossEntropyLoss (MLCReductionType reductionType, float labelSmoothing, [NullAllowed] MLCTensor weights); + + [Static] + [Export ("logLossWithReductionType:epsilon:weight:")] + MLCLossLayer CreateLogLoss (MLCReductionType reductionType, float epsilon, float weight); + + [Static] + [Export ("logLossWithReductionType:epsilon:weights:")] + MLCLossLayer CreateLogLoss (MLCReductionType reductionType, float epsilon, [NullAllowed] MLCTensor weights); + + [Static] + [Export ("huberLossWithReductionType:delta:weight:")] + MLCLossLayer CreateHuberLoss (MLCReductionType reductionType, float delta, float weight); + + [Static] + [Export ("huberLossWithReductionType:delta:weights:")] + MLCLossLayer CreateHuberLoss (MLCReductionType reductionType, float delta, [NullAllowed] MLCTensor weights); + + [Static] + [Export ("meanAbsoluteErrorLossWithReductionType:weight:")] + MLCLossLayer CreateMeanAbsoluteErrorLoss (MLCReductionType reductionType, float weight); + + [Static] + [Export ("meanAbsoluteErrorLossWithReductionType:weights:")] + MLCLossLayer CreateMeanAbsoluteErrorLoss (MLCReductionType reductionType, [NullAllowed] MLCTensor weights); + + [Static] + [Export ("meanSquaredErrorLossWithReductionType:weight:")] + MLCLossLayer CreateMeanSquaredErrorLoss (MLCReductionType reductionType, float weight); + + [Static] + [Export ("meanSquaredErrorLossWithReductionType:weights:")] + MLCLossLayer CreateMeanSquaredErrorLoss (MLCReductionType reductionType, [NullAllowed] MLCTensor weights); + + [Static] + [Export ("hingeLossWithReductionType:weight:")] + MLCLossLayer CreateHingeLoss (MLCReductionType reductionType, float weight); + + [Static] + [Export ("hingeLossWithReductionType:weights:")] + MLCLossLayer CreateHingeLoss (MLCReductionType reductionType, [NullAllowed] MLCTensor weights); + + [Static] + [Export ("cosineDistanceLossWithReductionType:weight:")] + MLCLossLayer CreateCosineDistanceLoss (MLCReductionType reductionType, float weight); + + [Static] + [Export ("cosineDistanceLossWithReductionType:weights:")] + MLCLossLayer CreateCosineDistanceLoss (MLCReductionType reductionType, [NullAllowed] MLCTensor weights); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject), Name = "MLCLSTMDescriptor")] + [DisableDefaultCtor] + interface MLCLstmDescriptor : NSCopying { + + [Export ("inputSize")] + nuint InputSize { get; } + + [Export ("hiddenSize")] + nuint HiddenSize { get; } + + [Export ("layerCount")] + nuint LayerCount { get; } + + [Export ("usesBiases")] + bool UsesBiases { get; } + + [Export ("batchFirst")] + bool BatchFirst { get; } + + [Export ("isBidirectional")] + bool IsBidirectional { get; } + + [Export ("returnsSequences")] + bool ReturnsSequences { get; } + + [Export ("dropout")] + float Dropout { get; } + + [Export ("resultMode")] + MLCLstmResultMode ResultMode { get; } + + [Static] + [Export ("descriptorWithInputSize:hiddenSize:layerCount:")] + MLCLstmDescriptor Create (nuint inputSize, nuint hiddenSize, nuint layerCount); + + [Static] + [Export ("descriptorWithInputSize:hiddenSize:layerCount:usesBiases:isBidirectional:dropout:")] + MLCLstmDescriptor Create (nuint inputSize, nuint hiddenSize, nuint layerCount, bool usesBiases, bool isBidirectional, float dropout); + + [Static] + [Export ("descriptorWithInputSize:hiddenSize:layerCount:usesBiases:batchFirst:isBidirectional:dropout:")] + MLCLstmDescriptor Create (nuint inputSize, nuint hiddenSize, nuint layerCount, bool usesBiases, bool batchFirst, bool isBidirectional, float dropout); + + [Static] + [Export ("descriptorWithInputSize:hiddenSize:layerCount:usesBiases:batchFirst:isBidirectional:returnsSequences:dropout:")] + MLCLstmDescriptor Create (nuint inputSize, nuint hiddenSize, nuint layerCount, bool usesBiases, bool batchFirst, bool isBidirectional, bool returnsSequences, float dropout); + + [Static] + [Export ("descriptorWithInputSize:hiddenSize:layerCount:usesBiases:batchFirst:isBidirectional:returnsSequences:dropout:resultMode:")] + MLCLstmDescriptor Create (nuint inputSize, nuint hiddenSize, nuint layerCount, bool usesBiases, bool batchFirst, bool isBidirectional, bool returnsSequences, float dropout, MLCLstmResultMode resultMode); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer), Name = "MLCLSTMLayer")] + [DisableDefaultCtor] + interface MLCLstmLayer { + + [Export ("descriptor", ArgumentSemantic.Copy)] + MLCLstmDescriptor Descriptor { get; } + + [Export ("gateActivations", ArgumentSemantic.Copy)] + MLCActivationDescriptor[] GateActivations { get; } + + [Export ("outputResultActivation", ArgumentSemantic.Copy)] + MLCActivationDescriptor OutputResultActivation { get; } + + [Export ("inputWeights", ArgumentSemantic.Retain)] + MLCTensor[] InputWeights { get; } + + [Export ("hiddenWeights", ArgumentSemantic.Retain)] + MLCTensor[] HiddenWeights { get; } + + [NullAllowed, Export ("peepholeWeights", ArgumentSemantic.Retain)] + MLCTensor[] PeepholeWeights { get; } + + [NullAllowed, Export ("biases", ArgumentSemantic.Retain)] + MLCTensor[] Biases { get; } + + [Export ("inputWeightsParameters", ArgumentSemantic.Retain)] + MLCTensorParameter[] InputWeightsParameters { get; } + + [Export ("hiddenWeightsParameters", ArgumentSemantic.Retain)] + MLCTensorParameter[] HiddenWeightsParameters { get; } + + [NullAllowed, Export ("peepholeWeightsParameters", ArgumentSemantic.Retain)] + MLCTensorParameter[] PeepholeWeightsParameters { get; } + + [NullAllowed, Export ("biasesParameters", ArgumentSemantic.Retain)] + MLCTensorParameter[] BiasesParameters { get; } + + [Static] + [Export ("layerWithDescriptor:inputWeights:hiddenWeights:biases:")] + [return: NullAllowed] + MLCLstmLayer Create (MLCLstmDescriptor descriptor, MLCTensor[] inputWeights, MLCTensor[] hiddenWeights, [NullAllowed] MLCTensor[] biases); + + [Static] + [Export ("layerWithDescriptor:inputWeights:hiddenWeights:peepholeWeights:biases:")] + [return: NullAllowed] + MLCLstmLayer Create (MLCLstmDescriptor descriptor, MLCTensor[] inputWeights, MLCTensor[] hiddenWeights, [NullAllowed] MLCTensor[] peepholeWeights, [NullAllowed] MLCTensor[] biases); + + [Static] + [Export ("layerWithDescriptor:inputWeights:hiddenWeights:peepholeWeights:biases:gateActivations:outputResultActivation:")] + [return: NullAllowed] + MLCLstmLayer Create (MLCLstmDescriptor descriptor, MLCTensor[] inputWeights, MLCTensor[] hiddenWeights, [NullAllowed] MLCTensor[] peepholeWeights, [NullAllowed] MLCTensor[] biases, MLCActivationDescriptor[] gateActivations, MLCActivationDescriptor outputResultActivation); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCMatMulDescriptor : NSCopying { + + [Export ("alpha")] + float Alpha { get; } + + [Export ("transposesX")] + bool TransposesX { get; } + + [Export ("transposesY")] + bool TransposesY { get; } + + [Static] + [Export ("descriptorWithAlpha:transposesX:transposesY:")] + [return: NullAllowed] + MLCMatMulDescriptor Create (float alpha, bool transposesX, bool transposesY); + + [Static] + [Export ("descriptor")] + MLCMatMulDescriptor Create (); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCMatMulLayer { + + [Export ("descriptor", ArgumentSemantic.Copy)] + MLCMatMulDescriptor Descriptor { get; } + + [Static] + [Export ("layerWithDescriptor:")] + [return: NullAllowed] + MLCMatMulLayer Create (MLCMatMulDescriptor descriptor); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCMultiheadAttentionDescriptor : NSCopying { + + [Export ("modelDimension")] + nuint ModelDimension { get; } + + [Export ("keyDimension")] + nuint KeyDimension { get; } + + [Export ("valueDimension")] + nuint ValueDimension { get; } + + [Export ("headCount")] + nuint HeadCount { get; } + + [Export ("dropout")] + float Dropout { get; } + + [Export ("hasBiases")] + bool HasBiases { get; } + + [Export ("hasAttentionBiases")] + bool HasAttentionBiases { get; } + + [Export ("addsZeroAttention")] + bool AddsZeroAttention { get; } + + [Static] + [Export ("descriptorWithModelDimension:keyDimension:valueDimension:headCount:dropout:hasBiases:hasAttentionBiases:addsZeroAttention:")] + [return: NullAllowed] + MLCMultiheadAttentionDescriptor Create (nuint modelDimension, nuint keyDimension, nuint valueDimension, nuint headCount, float dropout, bool hasBiases, bool hasAttentionBiases, bool addsZeroAttention); + + [Static] + [Export ("descriptorWithModelDimension:headCount:")] + MLCMultiheadAttentionDescriptor Create (nuint modelDimension, nuint headCount); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCMultiheadAttentionLayer { + + [Export ("descriptor", ArgumentSemantic.Copy)] + MLCMultiheadAttentionDescriptor Descriptor { get; } + + [Export ("weights", ArgumentSemantic.Retain)] + MLCTensor[] Weights { get; } + + [NullAllowed, Export ("biases", ArgumentSemantic.Retain)] + MLCTensor[] Biases { get; } + + [NullAllowed, Export ("attentionBiases", ArgumentSemantic.Retain)] + MLCTensor[] AttentionBiases { get; } + + [Export ("weightsParameters", ArgumentSemantic.Retain)] + MLCTensorParameter[] WeightsParameters { get; } + + [NullAllowed, Export ("biasesParameters", ArgumentSemantic.Retain)] + MLCTensorParameter[] BiasesParameters { get; } + + [Static] + [Export ("layerWithDescriptor:weights:biases:attentionBiases:")] + [return: NullAllowed] + MLCMultiheadAttentionLayer Create (MLCMultiheadAttentionDescriptor descriptor, MLCTensor[] weights, [NullAllowed] MLCTensor[] biases, [NullAllowed] MLCTensor[] attentionBiases); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCPaddingLayer : NSCopying { + + [Export ("paddingType")] + MLCPaddingType PaddingType { get; } + + [Export ("paddingLeft")] + nuint PaddingLeft { get; } + + [Export ("paddingRight")] + nuint PaddingRight { get; } + + [Export ("paddingTop")] + nuint PaddingTop { get; } + + [Export ("paddingBottom")] + nuint PaddingBottom { get; } + + [Export ("constantValue")] + float ConstantValue { get; } + + [Static] + [Export ("layerWithReflectionPadding:")] + MLCPaddingLayer CreateReflectionPadding ([BindAs (typeof (nuint[]))] NSNumber[] padding); + + [Static] + [Export ("layerWithSymmetricPadding:")] + MLCPaddingLayer CreateSymmetricPadding ([BindAs (typeof (nuint[]))] NSNumber[] padding); + + [Static] + [Export ("layerWithZeroPadding:")] + MLCPaddingLayer CreateZeroPadding ([BindAs (typeof (nuint[]))] NSNumber[] padding); + + [Static] + [Export ("layerWithConstantPadding:constantValue:")] + MLCPaddingLayer CreateConstantPadding ([BindAs (typeof (nuint[]))] NSNumber[] padding, float constantValue); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCPoolingDescriptor : NSCopying { + + [Export ("poolingType")] + MLCPoolingType PoolingType { get; } + + [Export ("kernelWidth")] + nuint KernelWidth { get; } + + [Export ("kernelHeight")] + nuint KernelHeight { get; } + + [Export ("strideInX")] + nuint StrideInX { get; } + + [Export ("strideInY")] + nuint StrideInY { get; } + + [Export ("dilationRateInX")] + nuint DilationRateInX { get; } + + [Export ("dilationRateInY")] + nuint DilationRateInY { get; } + + [Export ("paddingPolicy")] + MLCPaddingPolicy PaddingPolicy { get; } + + [Export ("paddingSizeInX")] + nuint PaddingSizeInX { get; } + + [Export ("paddingSizeInY")] + nuint PaddingSizeInY { get; } + + [Export ("countIncludesPadding")] + bool CountIncludesPadding { get; } + + [Static] + [Export ("poolingDescriptorWithType:kernelSize:stride:")] + MLCPoolingDescriptor Create (MLCPoolingType poolingType, nuint kernelSize, nuint stride); + + [Static] + [Export ("maxPoolingDescriptorWithKernelSizes:strides:paddingPolicy:paddingSizes:")] + MLCPoolingDescriptor CreateMaxPooling ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, [BindAs (typeof (nuint[]))] NSNumber[] strides, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes); + + [Static] + [Export ("maxPoolingDescriptorWithKernelSizes:strides:dilationRates:paddingPolicy:paddingSizes:")] + MLCPoolingDescriptor CreateMaxPooling ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, [BindAs (typeof (nuint[]))] NSNumber[] strides, [BindAs (typeof (nuint[]))] NSNumber[] dilationRates, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes); + + [Static] + [Export ("averagePoolingDescriptorWithKernelSizes:strides:paddingPolicy:paddingSizes:countIncludesPadding:")] + MLCPoolingDescriptor CreateAveragePooling ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, [BindAs (typeof (nuint[]))] NSNumber[] strides, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes, bool countIncludesPadding); + + [Static] + [Export ("averagePoolingDescriptorWithKernelSizes:strides:dilationRates:paddingPolicy:paddingSizes:countIncludesPadding:")] + MLCPoolingDescriptor CreateAveragePooling ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, [BindAs (typeof (nuint[]))] NSNumber[] strides, [BindAs (typeof (nuint[]))] NSNumber[] dilationRates, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes, bool countIncludesPadding); + + [Static] + [Export ("l2NormPoolingDescriptorWithKernelSizes:strides:paddingPolicy:paddingSizes:")] + MLCPoolingDescriptor CreateL2NormPooling ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, [BindAs (typeof (nuint[]))] NSNumber[] strides, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes); + + [Static] + [Export ("l2NormPoolingDescriptorWithKernelSizes:strides:dilationRates:paddingPolicy:paddingSizes:")] + MLCPoolingDescriptor CreateL2NormPooling ([BindAs (typeof (nuint[]))] NSNumber[] kernelSizes, [BindAs (typeof (nuint[]))] NSNumber[] strides, [BindAs (typeof (nuint[]))] NSNumber[] dilationRates, MLCPaddingPolicy paddingPolicy, [BindAs (typeof (nuint[]))] [NullAllowed] NSNumber[] paddingSizes); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCPoolingLayer { + + [Export ("descriptor", ArgumentSemantic.Copy)] + MLCPoolingDescriptor Descriptor { get; } + + [Static] + [Export ("layerWithDescriptor:")] + MLCPoolingLayer Create (MLCPoolingDescriptor descriptor); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCReductionLayer { + + [Export ("reductionType")] + MLCReductionType ReductionType { get; } + + [Export ("dimension")] + nuint Dimension { get; } + + [Static] + [Export ("layerWithReductionType:dimension:")] + [return: NullAllowed] + MLCReductionLayer Create (MLCReductionType reductionType, nuint dimension); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCReshapeLayer { + + [Static] + [Export ("layerWithShape:")] + [return: NullAllowed] + // swift uses `[Int]` + MLCReshapeLayer Create ([BindAs (typeof (nint[]))] NSNumber[] shape); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCOptimizer), Name = "MLCRMSPropOptimizer")] + interface MLCRmsPropOptimizer : NSCopying { + + [Export ("momentumScale")] + float MomentumScale { get; } + + [Export ("alpha")] + float Alpha { get; } + + [Export ("epsilon")] + float Epsilon { get; } + + [Export ("isCentered")] + bool IsCentered { get; } + + [Static] + [Export ("optimizerWithDescriptor:")] + MLCRmsPropOptimizer Create (MLCOptimizerDescriptor optimizerDescriptor); + + [Static] + [Export ("optimizerWithDescriptor:momentumScale:alpha:epsilon:isCentered:")] + MLCRmsPropOptimizer Create (MLCOptimizerDescriptor optimizerDescriptor, float momentumScale, float alpha, float epsilon, bool isCentered); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCOptimizer), Name = "MLCSGDOptimizer")] + [DisableDefaultCtor] + interface MLCSgdOptimizer : NSCopying { + + [Export ("momentumScale")] + float MomentumScale { get; } + + [Export ("usesNesterovMomentum")] + bool UsesNesterovMomentum { get; } + + [Static] + [Export ("optimizerWithDescriptor:")] + MLCSgdOptimizer Create (MLCOptimizerDescriptor optimizerDescriptor); + + [Static] + [Export ("optimizerWithDescriptor:momentumScale:usesNesterovMomentum:")] + MLCSgdOptimizer Create (MLCOptimizerDescriptor optimizerDescriptor, float momentumScale, bool usesNesterovMomentum); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCSliceLayer { + + [Export ("start", ArgumentSemantic.Copy)] + [BindAs (typeof (nint[]))] // swift `[Int]` + NSNumber[] Start { get; } + + [Export ("end", ArgumentSemantic.Copy)] + [BindAs (typeof (nint[]))] // swift `[Int]` + NSNumber[] End { get; } + + [NullAllowed] + [Export ("stride", ArgumentSemantic.Copy)] + [BindAs (typeof (nint[]))] // swift `[Int]?` + NSNumber[] Stride { get; } + + [Static] + [Export ("sliceLayerWithStart:end:stride:")] + [return: NullAllowed] + MLCSliceLayer Create ([BindAs (typeof (nint[]))] NSNumber[] start, [BindAs (typeof (nint[]))] NSNumber[] end, [BindAs (typeof (nint[]))] [NullAllowed] NSNumber[] stride); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCSoftmaxLayer { + + [Export ("operation")] + MLCSoftmaxOperation Operation { get; } + + [Export ("dimension")] + nuint Dimension { get; } + + [Static] + [Export ("layerWithOperation:")] + MLCSoftmaxLayer Create (MLCSoftmaxOperation operation); + + [Static] + [Export ("layerWithOperation:dimension:")] + MLCSoftmaxLayer Create (MLCSoftmaxOperation operation, nuint dimension); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCSplitLayer { + + [Export ("dimension")] + nuint Dimension { get; } + + [Export ("splitCount")] + nuint SplitCount { get; } + + [NullAllowed] + [Export ("splitSectionLengths", ArgumentSemantic.Copy)] + [BindAs (typeof (nint[]))] // swift `[Int]` + NSNumber[] SplitSectionLengths { get; } + + [Static] + [Export ("layerWithSplitCount:dimension:")] + MLCSplitLayer Create (nuint splitCount, nuint dimension); + + [Static] + [Export ("layerWithSplitSectionLengths:dimension:")] + MLCSplitLayer Create ([BindAs (typeof (nint[]))] NSNumber[] splitSectionLengths, nuint dimension); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCTransposeLayer { + + [Export ("dimensions", ArgumentSemantic.Copy)] + [BindAs (typeof (nint[]))] // swift `[Int]` + NSNumber[] Dimensions { get; } + + [Static] + [Export ("layerWithDimensions:")] + [return: NullAllowed] + MLCTransposeLayer Create ([BindAs (typeof (nint[]))] NSNumber[] dimensions); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (MLCLayer))] + [DisableDefaultCtor] + interface MLCUpsampleLayer { + + [Export ("shape", ArgumentSemantic.Copy)] + [BindAs (typeof (nint[]))] // swift `[Int]` + NSNumber[] Shape { get; } + + [Export ("sampleMode")] + MLCSampleMode SampleMode { get; } + + [Export ("alignsCorners")] + bool AlignsCorners { get; } + + [Static] + [Export ("layerWithShape:")] + [return: NullAllowed] + MLCUpsampleLayer Create ([BindAs (typeof (nint[]))] NSNumber[] shape); + + [Static] + [Export ("layerWithShape:sampleMode:alignsCorners:")] + [return: NullAllowed] + MLCUpsampleLayer Create ([BindAs (typeof (nint[]))] NSNumber[] shape, MLCSampleMode sampleMode, bool alignsCorners); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof (NSObject), Name ="MLCYOLOLossDescriptor")] + [DisableDefaultCtor] + interface MLCYoloLossDescriptor : NSCopying { + + [Export ("anchorBoxCount")] + nuint AnchorBoxCount { get; } + + [Export ("anchorBoxes", ArgumentSemantic.Copy)] + NSData AnchorBoxes { get; } + + [Export ("shouldRescore")] + bool ShouldRescore { get; set; } + + [Export ("scaleSpatialPositionLoss")] + float ScaleSpatialPositionLoss { get; set; } + + [Export ("scaleSpatialSizeLoss")] + float ScaleSpatialSizeLoss { get; set; } + + [Export ("scaleNoObjectConfidenceLoss")] + float ScaleNoObjectConfidenceLoss { get; set; } + + [Export ("scaleObjectConfidenceLoss")] + float ScaleObjectConfidenceLoss { get; set; } + + [Export ("scaleClassLoss")] + float ScaleClassLoss { get; set; } + + [Export ("minimumIOUForObjectPresence")] + float MinimumIouForObjectPresence { get; set; } + + [Export ("maximumIOUForObjectAbsence")] + float MaximumIouForObjectAbsence { get; set; } + + [Static] + [Export ("descriptorWithAnchorBoxes:anchorBoxCount:")] + MLCYoloLossDescriptor Create (NSData anchorBoxes, nuint anchorBoxCount); + } + + [iOS (14,0)][TV (14,0)][Mac (11,0)] + [NoWatch] + [BaseType (typeof(MLCLossLayer), Name = "MLCYOLOLossLayer")] + [DisableDefaultCtor] + interface MLCYoloLossLayer { + + [Export ("yoloLossDescriptor", ArgumentSemantic.Copy)] + MLCYoloLossDescriptor YoloLossDescriptor { get; } + + [Static] + [Export ("layerWithDescriptor:")] + MLCYoloLossLayer Create (MLCYoloLossDescriptor lossDescriptor); + } + + delegate void MLCGraphCompletionHandler ([NullAllowed] MLCTensor resultTensor, [NullAllowed] NSError error, /* NSTimeInterval */ double executionTime); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCTensorOptimizerDeviceData : NSCopying { + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface MLCGraph { + + [NullAllowed, Export ("device", ArgumentSemantic.Retain)] + MLCDevice Device { get; } + + [Export ("layers")] + MLCLayer[] Layers { get; } + + [Static] + [Export ("graph")] + MLCGraph Create (); + + [Export ("summarizedDOTDescription")] + string SummarizedDotDescription { get; } + + [Export ("nodeWithLayer:source:")] + [return: NullAllowed] + MLCTensor CreateNode (MLCLayer layer, MLCTensor source); + + [Export ("nodeWithLayer:sources:")] + [return: NullAllowed] + MLCTensor CreateNode (MLCLayer layer, MLCTensor[] sources); + + [Export ("nodeWithLayer:sources:disableUpdate:")] + [return: NullAllowed] + MLCTensor CreateNode (MLCLayer layer, MLCTensor[] sources, bool disableUpdate); + + [Export ("nodeWithLayer:sources:lossLabels:")] + [return: NullAllowed] + MLCTensor CreateNode (MLCLayer layer, MLCTensor[] sources, MLCTensor[] lossLabels); + + [Export ("splitWithSource:splitCount:dimension:")] + [return: NullAllowed] + MLCTensor[] Split (MLCTensor source, nuint splitCount, nuint dimension); + + [Export ("splitWithSource:splitSectionLengths:dimension:")] + [return: NullAllowed] + MLCTensor[] Split (MLCTensor source, [BindAs (typeof (nuint[]))] NSNumber[] splitSectionLengths, nuint dimension); + + [Export ("concatenateWithSources:dimension:")] + [return: NullAllowed] + MLCTensor Concatenate (MLCTensor[] sources, nuint dimension); + + [Export ("reshapeWithShape:source:")] + [return: NullAllowed] + // swift `[Int]` + MLCTensor Reshape ([BindAs (typeof (nint[]))] NSNumber[] shape, MLCTensor source); + + [Export ("transposeWithDimensions:source:")] + [return: NullAllowed] + // swift `[Int]` + MLCTensor Transpose ([BindAs (typeof (nint[]))] NSNumber[] dimensions, MLCTensor source); + + [Export ("bindAndWriteData:forInputs:toDevice:batchSize:synchronous:")] + bool BindAndWrite (NSDictionary inputsData, NSDictionary inputTensors, MLCDevice device, nuint batchSize, bool synchronous); + + [Export ("bindAndWriteData:forInputs:toDevice:synchronous:")] + bool BindAndWrite (NSDictionary inputsData, NSDictionary inputTensors, MLCDevice device, bool synchronous); + + [Export ("sourceTensorsForLayer:")] + MLCTensor[] GetSourceTensors (MLCLayer layer); + + [Export ("resultTensorsForLayer:")] + MLCTensor[] GetResultTensors (MLCLayer layer); + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [NoWatch] + [BaseType (typeof (MLCGraph))] + [DisableDefaultCtor] + interface MLCTrainingGraph { + + [NullAllowed, Export ("optimizer", ArgumentSemantic.Retain)] + MLCOptimizer Optimizer { get; } + + [Export ("deviceMemorySize")] + nuint DeviceMemorySize { get; } + + [Static] + [Export ("graphWithGraphObjects:lossLayer:optimizer:")] + MLCTrainingGraph Create (MLCGraph[] graphObjects, [NullAllowed] MLCLayer lossLayer, [NullAllowed] MLCOptimizer optimizer); + + [Export ("addInputs:lossLabels:")] + bool AddInputs (NSDictionary inputs, [NullAllowed] NSDictionary lossLabels); + + [Export ("addInputs:lossLabels:lossLabelWeights:")] + bool AddInputs (NSDictionary inputs, [NullAllowed] NSDictionary lossLabels, [NullAllowed] NSDictionary lossLabelWeights); + + [Export ("addOutputs:")] + bool AddOutputs (NSDictionary outputs); + + [Export ("stopGradientForTensors:")] + bool StopGradient (MLCTensor[] tensors); + + [Export ("compileWithOptions:device:")] + bool Compile (MLCGraphCompilationOptions options, MLCDevice device); + + [Export ("compileOptimizer:")] + bool Compile (MLCOptimizer optimizer); + + [Export ("linkWithGraphs:")] + bool Link ([NullAllowed] MLCTrainingGraph[] graphs); + + [Export ("sourceGradientTensorsForLayer:")] + MLCTensor[] GetSourceGradientTensors (MLCLayer layer); + + [Export ("resultGradientTensorsForLayer:")] + MLCTensor[] GetResultGradientTensors (MLCLayer layer); + + [Export ("gradientDataForParameter:layer:")] + [return: NullAllowed] + NSData GetGradientData (MLCTensor parameter, MLCLayer layer); + + [Export ("allocateUserGradientForTensor:")] + [return: NullAllowed] + MLCTensor AllocateUserGradient (MLCTensor tensor); + + [Async (ResultTypeName = "MLCGraphCompletionResult")] + [Export ("executeWithInputsData:lossLabelsData:lossLabelWeightsData:batchSize:options:completionHandler:")] + bool Execute (NSDictionary inputsData, [NullAllowed] NSDictionary lossLabelsData, [NullAllowed] NSDictionary lossLabelWeightsData, nuint batchSize, MLCExecutionOptions options, [NullAllowed] MLCGraphCompletionHandler completionHandler); + + [Async (ResultTypeName = "MLCGraphCompletionResult")] + [Export ("executeWithInputsData:lossLabelsData:lossLabelWeightsData:outputsData:batchSize:options:completionHandler:")] + bool Execute (NSDictionary inputsData, [NullAllowed] NSDictionary lossLabelsData, [NullAllowed] NSDictionary lossLabelWeightsData, [NullAllowed] NSDictionary outputsData, nuint batchSize, MLCExecutionOptions options, [NullAllowed] MLCGraphCompletionHandler completionHandler); + + [Async (ResultTypeName = "MLCGraphCompletionResult")] + [Export ("executeForwardWithBatchSize:options:completionHandler:")] + bool ExecuteForward (nuint batchSize, MLCExecutionOptions options, [NullAllowed] MLCGraphCompletionHandler completionHandler); + + [Async (ResultTypeName = "MLCGraphCompletionResult")] + [Export ("executeForwardWithBatchSize:options:outputsData:completionHandler:")] + bool ExecuteForward (nuint batchSize, MLCExecutionOptions options, [NullAllowed] NSDictionary outputsData, [NullAllowed] MLCGraphCompletionHandler completionHandler); + + [Async (ResultTypeName = "MLCGraphCompletionResult")] + [Export ("executeGradientWithBatchSize:options:completionHandler:")] + bool ExecuteGradient (nuint batchSize, MLCExecutionOptions options, [NullAllowed] MLCGraphCompletionHandler completionHandler); + + [Async (ResultTypeName = "MLCGraphCompletionResult")] + [Export ("executeGradientWithBatchSize:options:outputsData:completionHandler:")] + bool ExecuteGradient (nuint batchSize, MLCExecutionOptions options, [NullAllowed] NSDictionary outputsData, [NullAllowed] MLCGraphCompletionHandler completionHandler); + + [Async (ResultTypeName = "MLCGraphCompletionResult")] + [Export ("executeOptimizerUpdateWithOptions:completionHandler:")] + bool ExecuteOptimizerUpdate (MLCExecutionOptions options, [NullAllowed] MLCGraphCompletionHandler completionHandler); + + [Export ("synchronizeUpdates")] + void SynchronizeUpdates (); + + [Export ("setTrainingTensorParameters:")] + bool SetTrainingTensorParameters (MLCTensorParameter[] parameters); + + [Export ("gradientTensorForInput:")] + [return: NullAllowed] + MLCTensor GetGradientTensor (MLCTensor input); + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [NoWatch] + [BaseType (typeof (MLCGraph))] + [DisableDefaultCtor] + interface MLCInferenceGraph { + + [Export ("deviceMemorySize")] + nuint DeviceMemorySize { get; } + + [Static] + [Export ("graphWithGraphObjects:")] + MLCInferenceGraph Create (MLCGraph[] graphObjects); + + [Export ("addInputs:")] + bool AddInputs (NSDictionary inputs); + + [Export ("addInputs:lossLabels:lossLabelWeights:")] + bool AddInputs (NSDictionary inputs, [NullAllowed] NSDictionary lossLabels, [NullAllowed] NSDictionary lossLabelWeights); + + [Export ("addOutputs:")] + bool AddOutputs (NSDictionary outputs); + + [Export ("compileWithOptions:device:")] + bool Compile (MLCGraphCompilationOptions options, MLCDevice device); + + [Export ("linkWithGraphs:")] + bool Link ([NullAllowed] MLCInferenceGraph[] graphs); + + [Async (ResultTypeName = "MLCGraphCompletionResult")] + [Export ("executeWithInputsData:batchSize:options:completionHandler:")] + bool Execute (NSDictionary inputsData, nuint batchSize, MLCExecutionOptions options, [NullAllowed] MLCGraphCompletionHandler completionHandler); + + [Async (ResultTypeName = "MLCGraphCompletionResult")] + [Export ("executeWithInputsData:outputsData:batchSize:options:completionHandler:")] + bool Execute (NSDictionary inputsData, [NullAllowed] NSDictionary outputsData, nuint batchSize, MLCExecutionOptions options, [NullAllowed] MLCGraphCompletionHandler completionHandler); + + [Async (ResultTypeName = "MLCGraphCompletionResult")] + [Export ("executeWithInputsData:lossLabelsData:lossLabelWeightsData:batchSize:options:completionHandler:")] + bool Execute (NSDictionary inputsData, [NullAllowed] NSDictionary lossLabelsData, [NullAllowed] NSDictionary lossLabelWeightsData, nuint batchSize, MLCExecutionOptions options, [NullAllowed] MLCGraphCompletionHandler completionHandler); + + [Async (ResultTypeName = "MLCGraphCompletionResult")] + [Export ("executeWithInputsData:lossLabelsData:lossLabelWeightsData:outputsData:batchSize:options:completionHandler:")] + bool Execute (NSDictionary inputsData, [NullAllowed] NSDictionary lossLabelsData, [NullAllowed] NSDictionary lossLabelWeightsData, [NullAllowed] NSDictionary outputsData, nuint batchSize, MLCExecutionOptions options, [NullAllowed] MLCGraphCompletionHandler completionHandler); + } +} diff --git a/src/mobilecoreservices.cs b/src/mobilecoreservices.cs index 2da0a8a5a571..c5c88182eb86 100644 --- a/src/mobilecoreservices.cs +++ b/src/mobilecoreservices.cs @@ -3,6 +3,10 @@ namespace MobileCoreServices { + [Deprecated (PlatformName.iOS, 14, 0, message : "Use the 'UniformTypeIdentifiers.UTType' API instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message : "Use the 'UniformTypeIdentifiers.UTType' API instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message : "Use the 'UniformTypeIdentifiers.UTType' API instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message : "Use the 'UniformTypeIdentifiers.UTType' API instead.")] [Partial] interface UTType { [Field ("kUTTypeItem", "+CoreServices")] diff --git a/src/naturallanguage.cs b/src/naturallanguage.cs index e135e1e7c384..3020e281a43e 100644 --- a/src/naturallanguage.cs +++ b/src/naturallanguage.cs @@ -125,6 +125,18 @@ interface NLModel { [Export ("predictedLabelsForTokens:")] string[] GetPredictedLabels (string[] tokens); + + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("predictedLabelHypothesesForString:maximumCount:")] + // `Native` added (like existing API) because we provide a better API with manual bindings (to avoid NSNumber) + NSDictionary GetNativePredictedLabelHypotheses (string @string, nuint maximumCount); + + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("predictedLabelHypothesesForTokens:maximumCount:")] + // `Native` added (like existing API) because we provide a better API with manual bindings (to avoid NSNumber) + NSDictionary[] GetNativePredictedLabelHypotheses (string[] tokens, nuint maximumCount); } delegate void NLTokenizerEnumerateContinuationHandler (NSRange tokenRange, NLTokenizerAttributes flags, out bool stop); @@ -159,6 +171,10 @@ interface NLTokenizer [Export ("enumerateTokensInRange:usingBlock:")] void EnumerateTokens (NSRange range, NLTokenizerEnumerateContinuationHandler handler); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("tokenRangeForRange:")] + NSRange GetTokenRange (NSRange range); } delegate void NLTaggerEnumerateTagsContinuationHandler (NSString tag, NSRange tokenRange, out bool stop); @@ -282,6 +298,27 @@ interface NLTagger [Async] [Wrap ("RequestAssets (language.GetConstant ()!, tagScheme.GetConstant ()!, completionHandler)")] void RequestAssets (NLLanguage language, NLTagScheme tagScheme, Action completionHandler); + + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("tagHypothesesAtIndex:unit:scheme:maximumCount:tokenRange:")] + // `Native` added (like existing API) because we provide a better API with manual bindings (to avoid NSNumber) + NSDictionary GetNativeTagHypotheses (nuint characterIndex, NLTokenUnit unit, NSString scheme, nuint maximumCount, out NSRange tokenRange); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Internal][Sealed] + [Export ("tagHypothesesAtIndex:unit:scheme:maximumCount:tokenRange:")] + NSDictionary GetTagHypotheses (nuint characterIndex, NLTokenUnit unit, NSString scheme, nuint maximumCount, IntPtr tokenRange); + + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Wrap ("GetTagHypotheses (characterIndex, unit, scheme, maximumCount, IntPtr.Zero)")] + // `Native` added (like existing API) because we provide a better API with manual bindings (to avoid NSNumber) + NSDictionary GetNativeTagHypotheses (nuint characterIndex, NLTokenUnit unit, NSString scheme, nuint maximumCount); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("tokenRangeForRange:unit:")] + NSRange GetTokenRange (NSRange range, NLTokenUnit unit); } [iOS (12,0), Mac (10,14), TV (12,0), Watch (5,0)] @@ -485,6 +522,54 @@ interface NLEmbedding { [Static] [Wrap ("Write (dictionary.GetDictionary ()!, language.HasValue ? language.Value.GetConstant () : null, revision, url, out error)")] bool Write (NLVectorDictionary dictionary, NLLanguage? language, nuint revision, NSUrl url, [NullAllowed] out NSError error); + + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("currentSentenceEmbeddingRevisionForLanguage:")] + nuint GetCurrentSentenceEmbeddingRevision (NSString language); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Wrap ("GetCurrentSentenceEmbeddingRevision (language.GetConstant ()!)")] + nuint GetCurrentSentenceEmbeddingRevision (NLLanguage language); + + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("sentenceEmbeddingForLanguage:")] + [return: NullAllowed] + NLEmbedding GetSentenceEmbedding (NSString language); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Wrap ("GetSentenceEmbedding (language.GetConstant ()!)")] + [return: NullAllowed] + NLEmbedding GetSentenceEmbedding (NLLanguage language); + + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("sentenceEmbeddingForLanguage:revision:")] + [return: NullAllowed] + NLEmbedding GetSentenceEmbedding (NSString language, nuint revision); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Wrap ("GetSentenceEmbedding (language.GetConstant ()!, revision)")] + [return: NullAllowed] + NLEmbedding GetSentenceEmbedding (NLLanguage language, nuint revision); + + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("supportedSentenceEmbeddingRevisionsForLanguage:")] + NSIndexSet GetSupportedSentenceEmbeddingRevisions (NSString language); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Wrap ("GetSupportedSentenceEmbeddingRevisions (language.GetConstant ()!)")] + NSIndexSet GetSupportedSentenceEmbeddingRevisions (NLLanguage language); } [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] diff --git a/src/nearbyinteraction.cs b/src/nearbyinteraction.cs new file mode 100644 index 000000000000..501c3f778ea6 --- /dev/null +++ b/src/nearbyinteraction.cs @@ -0,0 +1,118 @@ +// +// NearbyInteraction bindings +// +// Authors: +// Whitney Schmidt +// +// Copyright 2020 Microsoft Inc. +// + +using ObjCRuntime; +using Foundation; +using CoreFoundation; +using System; +using Vector3 = global::OpenTK.Vector3; + +namespace NearbyInteraction { + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface NIConfiguration : NSCopying, NSSecureCoding {} + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface NIDiscoveryToken : NSCopying, NSSecureCoding {} + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NIConfiguration))] + [DisableDefaultCtor] + interface NINearbyPeerConfiguration + { + [Export ("peerDiscoveryToken", ArgumentSemantic.Copy)] + NIDiscoveryToken PeerDiscoveryToken { get; } + + [Export ("initWithPeerToken:")] + IntPtr Constructor (NIDiscoveryToken peerToken); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + partial interface NINearbyObject : NSCopying, NSSecureCoding + { + [Export ("discoveryToken", ArgumentSemantic.Copy)] + NIDiscoveryToken DiscoveryToken { get; } + + [Export ("distance")] + float Distance { get; } + + [Export ("direction")] + Vector3 Direction { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + } + + [Field ("NINearbyObjectDistanceNotAvailable")] + float DistanceNotAvailable { get; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + interface NISession + { + [Static] + [Export ("supported")] + bool IsSupported { [Bind ("isSupported")] get; } + + [Wrap ("WeakDelegate")] + [NullAllowed] + INISessionDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [NullAllowed, Export ("delegateQueue", ArgumentSemantic.Strong)] + DispatchQueue DelegateQueue { get; set; } + + [NullAllowed, Export ("discoveryToken", ArgumentSemantic.Copy)] + NIDiscoveryToken DiscoveryToken { get; } + + [NullAllowed, Export ("configuration", ArgumentSemantic.Copy)] + NIConfiguration Configuration { get; } + + [Export ("runWithConfiguration:")] + void Run (NIConfiguration configuration); + + [Export ("pause")] + void Pause (); + + [Export ("invalidate")] + void Invalidate (); + } + + interface INISessionDelegate {} + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Protocol] + [Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface NISessionDelegate + { + [Export ("session:didUpdateNearbyObjects:")] + void DidSessionUpdateNearbyObjects (NISession session, NINearbyObject[] nearbyObjects); + + [Export ("session:didRemoveNearbyObjects:withReason:")] + void DidSessionRemoveNearbyObjects (NISession session, NINearbyObject[] nearbyObjects, NINearbyObjectRemovalReason reason); + + [Export ("sessionWasSuspended:")] + void SessionWasSuspended (NISession session); + + [Export ("sessionSuspensionEnded:")] + void SessionSuspensionEnded (NISession session); + + [Export ("session:didInvalidateWithError:")] + void DidSessionInvalidate (NISession session, NSError error); + } +} diff --git a/src/networkextension.cs b/src/networkextension.cs index 27184074a7e7..943f3754162c 100644 --- a/src/networkextension.cs +++ b/src/networkextension.cs @@ -323,6 +323,15 @@ interface NEDnsSettings : NSSecureCoding, NSCopying [Export ("matchDomainsNoSearch")] bool MatchDomainsNoSearch { get; set; } + + [NoWatch, NoTV, Mac (11, 0), iOS (14, 0)] + [Export ("dnsProtocol")] + NEDnsProtocol DnsProtocol { get; } + + [Mac (11,0), iOS (14,0), NoTV, NoWatch] + [Notification] + [Field ("NEDNSSettingsConfigurationDidChangeNotification")] + NSString ConfigurationDidChangeNotification { get; } } [iOS (9,0)] @@ -791,6 +800,12 @@ interface NEHotspotNetwork { [Export ("setPassword:")] void SetPassword (string password); + + [Async] + [Watch (7,0), NoTV, NoMac, iOS (14,0)] + [Static] + [Export ("fetchCurrentWithCompletionHandler:")] + void FetchCurrent (Action completionHandler); } #endif @@ -1069,6 +1084,14 @@ interface NETunnelProviderManager [Field ("NETunnelProviderErrorDomain")] NSString ErrorDomain { get; } #endif + + [NoWatch, NoTV, NoiOS, Mac (11, 0)] + [Export ("excludedDomains", ArgumentSemantic.Copy)] + string[] ExcludedDomains { get; set; } + + [NoWatch, NoTV, NoiOS, Mac (11, 0)] + [Export ("associatedDomains", ArgumentSemantic.Copy)] + string[] AssociatedDomains { get; set; } } @@ -1218,8 +1241,7 @@ interface NEVpnProtocol : NSCopying, NSSecureCoding { [NullAllowed, Export ("proxySettings", ArgumentSemantic.Copy)] NEProxySettings ProxySettings { get; set; } - [NoiOS] - [Mac (10,15)] + [Mac (10,15), iOS (14,0)] [Export ("includeAllNetworks")] bool IncludeAllNetworks { get; set; } @@ -1330,6 +1352,10 @@ interface NEVpnProtocolIke2 { [iOS (13,0)] [Export ("enableFallback")] bool EnableFallback { get; set; } + + [NoWatch, NoTV, Mac (11, 0), iOS (14, 0)] + [Export ("mtu")] + nuint Mtu { get; set; } } [iOS (8,0)][Mac (10,10)] @@ -1460,6 +1486,10 @@ interface NWPath [Export ("isEqualToPath:")] bool IsEqualToPath (NWPath path); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("constrained")] + bool Constrained { [Bind ("isConstrained")] get; } } [iOS (9,0)][Mac (10,11)] @@ -1648,6 +1678,11 @@ int SocketProtocol { [NotImplemented] set; #endif } + + [NullAllowed] + [NoWatch, NoTV, Mac (11, 0), iOS (14, 0)] + [Export ("remoteHostname")] + string RemoteHostname { get; } } [iOS (11,0)] @@ -2104,4 +2139,140 @@ interface NETransparentProxyNetworkSettings { [NullAllowed, Export ("excludedNetworkRules", ArgumentSemantic.Copy)] NENetworkRule[] ExcludedNetworkRules { get; set; } } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + interface NEAppPushManager { + [Export ("matchSSIDs", ArgumentSemantic.Copy)] + string[] MatchSsids { get; set; } + + [Export ("providerConfiguration", ArgumentSemantic.Copy)] + NSDictionary ProviderConfiguration { get; set; } + + [NullAllowed] + [Export ("providerBundleIdentifier")] + string ProviderBundleIdentifier { get; set; } + + [Wrap ("WeakDelegate")] + [NullAllowed] + INEAppPushDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [Async] + [Static] + [Export ("loadAllFromPreferencesWithCompletionHandler:")] + void LoadAllFromPreferences (Action completionHandler); + + [Async] + [Export ("loadFromPreferencesWithCompletionHandler:")] + void LoadFromPreferences (Action completionHandler); + + [Async] + [Export ("removeFromPreferencesWithCompletionHandler:")] + void RemoveFromPreferences (Action completionHandler); + + [Async] + [Export ("saveToPreferencesWithCompletionHandler:")] + void SaveToPreferences (Action completionHandler); + + [NullAllowed] + [Export ("localizedDescription")] + string LocalizedDescription { get; set; } + + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; set; } + + [Export ("active")] + bool Active { [Bind ("isActive")] get; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NEProvider))] + [DisableDefaultCtor] // init returns nil + interface NEAppPushProvider { + [NullAllowed] + [Export ("providerConfiguration")] + NSDictionary ProviderConfiguration { get; } + + [Async] + [Export ("startWithCompletionHandler:")] + void Start (Action completionHandler); + + [Async] + [Export ("stopWithReason:completionHandler:")] + void Stop (NEProviderStopReason reason, Action completionHandler); + + [Export ("reportIncomingCallWithUserInfo:")] + void ReportIncomingCall (NSDictionary userInfo); + + [Export ("handleTimerEvent")] + void HandleTimerEvent (); + } + + [NoWatch, NoTV, Mac (11,0), iOS (14,0)] + [BaseType (typeof (NEDnsSettings), Name = "NEDNSOverHTTPSSettings")] + interface NEDnsOverHttpsSettings { + [NullAllowed] + [Export ("serverURL", ArgumentSemantic.Copy)] + NSUrl ServerUrl { get; set; } + } + + [NoWatch, NoTV, Mac (11,0), iOS (14,0)] + [BaseType (typeof (NEDnsSettings), Name = "NEDNSOverTLSSettings")] + interface NEDnsOverTlsSettings { + [NullAllowed] + [Export ("serverName")] + string ServerName { get; set; } + } + + [NoWatch, NoTV, Mac (11,0), iOS (14,0)] + [DisableDefaultCtor] + [BaseType (typeof (NSObject), Name = "NEDNSSettingsManager")] + interface NEDnsSettingsManager { + [Static] + [Export ("sharedManager")] + NEDnsSettingsManager SharedManager { get; } + + [Async] + [Export ("loadFromPreferencesWithCompletionHandler:")] + void LoadFromPreferences (Action completionHandler); + + [Async] + [Export ("removeFromPreferencesWithCompletionHandler:")] + void RemoveFromPreferences (Action completionHandler); + + [Async] + [Export ("saveToPreferencesWithCompletionHandler:")] + void SaveToPreferences (Action completionHandler); + + [NullAllowed] + [Export ("localizedDescription")] + string LocalizedDescription { get; set; } + + [NullAllowed] + [Export ("dnsSettings", ArgumentSemantic.Strong)] + NEDnsSettings DnsSettings { get; set; } + + [NullAllowed] + [Export ("onDemandRules", ArgumentSemantic.Copy)] + NEOnDemandRule[] OnDemandRules { get; set; } + + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; } + } + + interface INEAppPushDelegate {} + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface NEAppPushDelegate + { + [Abstract] + [Export ("appPushManager:didReceiveIncomingCallWithUserInfo:")] + void DidReceiveIncomingCall (NEAppPushManager manager, NSDictionary userInfo); + } + } diff --git a/src/notificationcenter.cs b/src/notificationcenter.cs index df0a23c5fece..656b3f7b7f76 100644 --- a/src/notificationcenter.cs +++ b/src/notificationcenter.cs @@ -14,6 +14,8 @@ namespace NotificationCenter { [iOS (8,0)][Mac (10,10)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // not meant to be user created + [Deprecated (PlatformName.iOS, 14,0)] + [Deprecated (PlatformName.MacOSX, 11,0)] interface NCWidgetController { [Static] @@ -25,6 +27,8 @@ interface NCWidgetController { } [iOS (8,0)][Mac (10,10)] + [Deprecated (PlatformName.iOS, 14,0)] + [Deprecated (PlatformName.MacOSX, 11,0)] [Protocol, Model] [BaseType (typeof (NSObject))] interface NCWidgetProviding { @@ -73,6 +77,7 @@ interface UIVibrancyEffect_NotificationCenter { UIVibrancyEffect NotificationCenterVibrancyEffect (); } + [Deprecated (PlatformName.iOS, 14,0)] [Category] [BaseType (typeof (NSExtensionContext))] interface NSExtensionContext_NCWidgetAdditions { @@ -95,6 +100,7 @@ interface NSExtensionContext_NCWidgetAdditions { [Category] [Internal] // only static methods, which are not _nice_ to use as extension methods + [Deprecated (PlatformName.iOS, 14,0)] [BaseType (typeof (UIVibrancyEffect))] interface UIVibrancyEffect_NCWidgetAdditions { [iOS (10,0)] @@ -118,6 +124,7 @@ interface UIVibrancyEffect_NCWidgetAdditions { #if MONOMAC [Mac (10,10)] + [Deprecated (PlatformName.MacOSX, 11,0)] [BaseType (typeof(NSViewController), Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NCWidgetListViewDelegate)})] interface NCWidgetListViewController { @@ -152,6 +159,7 @@ interface NCWidgetListViewController interface INCWidgetListViewDelegate {} [Mac (10, 10)] + [Deprecated (PlatformName.MacOSX, 11,0)] [Protocol, Model] [BaseType (typeof(NSObject))] interface NCWidgetListViewDelegate @@ -177,6 +185,7 @@ interface NCWidgetListViewDelegate } [Mac (10,10)] + [Deprecated (PlatformName.MacOSX, 11,0)] [BaseType (typeof(NSViewController), Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NCWidgetSearchViewDelegate)})] interface NCWidgetSearchViewController { @@ -206,6 +215,7 @@ interface NCWidgetSearchViewController interface INCWidgetSearchViewDelegate {} [Mac (10,10)] + [Deprecated (PlatformName.MacOSX, 11,0)] [Protocol, Model] [BaseType (typeof(NSObject))] interface NCWidgetSearchViewDelegate diff --git a/src/passkit.cs b/src/passkit.cs index 726deb1167d7..0a97addfe805 100644 --- a/src/passkit.cs +++ b/src/passkit.cs @@ -5,24 +5,38 @@ // Sebastien Pouliot // // Copyright 2012, 2015-2016 Xamarin Inc. All rights reserved. +// Copyright 2020 Microsoft Corp. // using System; using System.ComponentModel; using Contacts; +using CoreGraphics; using ObjCRuntime; using Foundation; +#if MONOMAC +using AppKit; +using ABRecord = Foundation.NSObject; +using UIButton = AppKit.NSButton; +using UIImage = AppKit.NSImage; +using UIViewController = AppKit.NSViewController; +using UIWindow = AppKit.NSWindow; +#else using UIKit; -#if !WATCH +#if IOS using AddressBook; #else -interface ABRecord {} -#endif +using ABRecord = Foundation.NSObject; +using UIViewController = Foundation.NSObject; +using UIWindow = Foundation.NSObject; +#endif // IOS +#endif // MONOMAC namespace PassKit { [Watch (3,0)] [iOS (9,0)] + [Mac (11,0)] // mention 10.12 but the framework was not available on macOS at that time [BaseType (typeof(NSObject))] interface PKContact : NSSecureCoding { @@ -38,6 +52,7 @@ interface PKContact : NSSecureCoding [NullAllowed, Export ("phoneNumber", ArgumentSemantic.Strong)] CNPhoneNumber PhoneNumber { get; set; } + [NoMac] [iOS (9,2)] [Deprecated (PlatformName.iOS, 10,3, message:"Use 'SubLocality' and 'SubAdministrativeArea' on 'PostalAddress' instead.")] [Deprecated (PlatformName.WatchOS, 3,2, message:"Use 'SubLocality' and 'SubAdministrativeArea' on 'PostalAddress' instead.")] @@ -45,9 +60,11 @@ interface PKContact : NSSecureCoding string SupplementarySubLocality { get; set; } } + [Mac (11,0)] [Watch (6,2), iOS (13,4)] delegate void PKPassLibrarySignDataCompletionHandler (NSData signedData, NSData signature, NSError error); + [Mac (11,0)] [BaseType (typeof (NSObject))] interface PKPassLibrary { [Static][Export ("isPassLibraryAvailable")] @@ -86,11 +103,13 @@ interface PKPassLibrary { [Notification] NSString RemotePaymentPassesDidChangeNotification { get; } + [NoMac] [iOS (8,0)] [Static,Export ("isPaymentPassActivationAvailable")] [Deprecated (PlatformName.iOS, 9, 0, message: "Use the library's instance 'IsLibraryPaymentPassActivationAvailable' property instead.")] bool IsPaymentPassActivationAvailable { get; } + [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'SecureElementPassActivationAvailable' instead.")] [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'SecureElementPassActivationAvailable' instead.")] [iOS (9,0)] @@ -101,6 +120,7 @@ interface PKPassLibrary { [Export ("secureElementPassActivationAvailable")] bool SecureElementPassActivationAvailable { [Bind ("isSecureElementPassActivationAvailable")] get; } + [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'ActivateSecureElementPass' instead.")] [NoWatch] [iOS (8,0)] @@ -113,6 +133,7 @@ interface PKPassLibrary { [Export ("activateSecureElementPass:withActivationData:completion:")] void ActivateSecureElementPass (PKSecureElementPass secureElementPass, NSData activationData, [NullAllowed] Action completion); + [NoMac] [NoWatch] [iOS (8,0)] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'ActivatePaymentPass (PKPaymentPass, NSData, Action completion)' instead.")] @@ -125,6 +146,7 @@ interface PKPassLibrary { [Export ("openPaymentSetup")] void OpenPaymentSetup (); + [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'CanAddSecureElementPass' instead.")] [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'CanAddSecureElementPass' instead.")] [iOS (9,0)] @@ -152,6 +174,7 @@ interface PKPassLibrary { [Export ("isSuppressingAutomaticPassPresentation")] bool IsSuppressingAutomaticPassPresentation { get; } + [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'RemoteSecureElementPasses' instead.")] [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'RemoteSecureElementPasses' instead.")] [iOS (9,0)] @@ -170,6 +193,7 @@ interface PKPassLibrary { nuint RequestAutomaticPassPresentationSuppression (Action responseHandler); #endif + [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'PresentSecureElementPass' instead.")] [NoWatch][iOS (10,0)] [Export ("presentPaymentPass:")] @@ -186,6 +210,7 @@ interface PKPassLibrary { } [Static] + [Mac (11,0)] interface PKPassLibraryUserInfoKey { [Field ("PKPassLibraryAddedPassesUserInfoKey")] @@ -206,17 +231,20 @@ interface PKPassLibraryUserInfoKey [Watch (3,0)] [iOS (8,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] interface PKPayment { [Export ("token", ArgumentSemantic.Strong)] PKPaymentToken Token { get; } + [NoMac] [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] [NoWatch] [Export ("billingAddress", ArgumentSemantic.Assign)] [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'BillingContact' instead.")] ABRecord BillingAddress { get; } + [NoMac] [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] [NoWatch] [Export ("shippingAddress", ArgumentSemantic.Assign)] @@ -240,10 +268,12 @@ interface PKPayment { delegate void PKPaymentShippingAddressSelected (PKPaymentAuthorizationStatus status, PKShippingMethod [] shippingMethods, PKPaymentSummaryItem [] summaryItems); delegate void PKPaymentShippingMethodSelected (PKPaymentAuthorizationStatus status, PKPaymentSummaryItem[] summaryItems); + [Mac (11,0)] [Protocol, Model] [BaseType (typeof (NSObject))] interface PKPaymentAuthorizationViewControllerDelegate { + [NoMac] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidAuthorizePayment2' instead.")] [Export ("paymentAuthorizationViewController:didAuthorizePayment:completion:")] [EventArgs ("PKPaymentAuthorization")] @@ -261,6 +291,7 @@ interface PKPaymentAuthorizationViewControllerDelegate { [Abstract] void PaymentAuthorizationViewControllerDidFinish (PKPaymentAuthorizationViewController controller); + [NoMac] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectShippingMethod2' instead.")] [Export ("paymentAuthorizationViewController:didSelectShippingMethod:completion:")] [EventArgs ("PKPaymentShippingMethodSelected")] @@ -273,6 +304,7 @@ interface PKPaymentAuthorizationViewControllerDelegate { [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] [Deprecated (PlatformName.iOS, 9, 0)] + [NoMac] [Export ("paymentAuthorizationViewController:didSelectShippingAddress:completion:")] [EventArgs ("PKPaymentShippingAddressSelected")] void DidSelectShippingAddress (PKPaymentAuthorizationViewController controller, ABRecord address, PKPaymentShippingAddressSelected completion); @@ -284,6 +316,7 @@ interface PKPaymentAuthorizationViewControllerDelegate { #endif void WillAuthorizePayment (PKPaymentAuthorizationViewController controller); + [NoMac] [iOS (9,0)] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectShippingContact' instead.")] [Export ("paymentAuthorizationViewController:didSelectShippingContact:completion:")] @@ -295,6 +328,7 @@ interface PKPaymentAuthorizationViewControllerDelegate { [EventArgs ("PKPaymentRequestShippingContactUpdate")] void DidSelectShippingContact2 (PKPaymentAuthorizationViewController controller, PKContact contact, Action completion); + [NoMac] [iOS (9,0)] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectPaymentMethod2' instead.")] [Export ("paymentAuthorizationViewController:didSelectPaymentMethod:completion:")] @@ -305,8 +339,14 @@ interface PKPaymentAuthorizationViewControllerDelegate { [Export ("paymentAuthorizationViewController:didSelectPaymentMethod:handler:")] [EventArgs ("PKPaymentRequestPaymentMethodUpdate")] void DidSelectPaymentMethod2 (PKPaymentAuthorizationViewController controller, PKPaymentMethod paymentMethod, Action completion); + + [Watch (7,0)][iOS (14,0)] + [Export ("paymentAuthorizationViewController:didRequestMerchantSessionUpdate:")] + [EventArgs ("PKPaymentRequestMerchantSessionUpdate")] + void DidRequestMerchantSessionUpdate (PKPaymentAuthorizationViewController controller, Action updateHandler); } + [Mac (11,0)] [iOS (8,0)] [BaseType (typeof (UIViewController), Delegates=new string []{"Delegate"}, Events=new Type [] {typeof(PKPaymentAuthorizationViewControllerDelegate)})] interface PKPaymentAuthorizationViewController { @@ -338,6 +378,7 @@ interface PKPaymentAuthorizationViewController { [Watch (3,0)] [iOS (8,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] interface PKPaymentSummaryItem { [NullAllowed] // by default this property is null @@ -363,6 +404,7 @@ interface PKPaymentSummaryItem { [Watch (3,0)] [iOS (8,0)] + [Mac (11,0)] [BaseType (typeof (PKPaymentSummaryItem))] interface PKShippingMethod { [NullAllowed] // by default this property is null @@ -376,6 +418,7 @@ interface PKShippingMethod { [Watch (3,0)] [iOS (8,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] interface PKPaymentRequest { [NullAllowed] // by default this property is null @@ -401,11 +444,13 @@ interface PKPaymentRequest { [Export ("currencyCode")] string CurrencyCode { get; set; } + [NoMac] [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'RequiredBillingContactFields' instead.")] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'RequiredBillingContactFields' instead.")] [Export ("requiredBillingAddressFields", ArgumentSemantic.UnsafeUnretained)] PKAddressField RequiredBillingAddressFields { get; set; } + [NoMac] [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] [NoWatch] [NullAllowed] // by default this property is null @@ -413,11 +458,13 @@ interface PKPaymentRequest { [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'BillingContact' instead.")] ABRecord BillingAddress { get; set; } + [NoMac] [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'RequiredShippingContactFields' instead.")] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'RequiredShippingContactFields' instead.")] [Export ("requiredShippingAddressFields", ArgumentSemantic.UnsafeUnretained)] PKAddressField RequiredShippingAddressFields { get; set; } + [NoMac] [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] [NoWatch] [NullAllowed] // by default this property is null @@ -501,6 +548,7 @@ interface PKPaymentRequest { NSError CreatePaymentShippingAddressUnserviceableError ([NullAllowed] string localizedDescription); } + [Mac (11,0)] [Watch (4,0)][iOS (11,0)] [Flags] enum PKContactFields { @@ -524,14 +572,17 @@ enum PKContactFields { [Watch (3,0)] [iOS (8,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] interface PKPaymentToken { + [NoMac] [NoWatch] [Export ("paymentInstrumentName", ArgumentSemantic.Copy)] [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'PaymentMethod' instead.")] string PaymentInstrumentName { get; } + [NoMac] [NoWatch] [Export ("paymentNetwork")] [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'PaymentMethod' instead.")] @@ -548,7 +599,8 @@ interface PKPaymentToken { PKPaymentMethod PaymentMethod { get; } } -#if !WATCH + [NoMac] // under `TARGET_OS_IPHONE` + [NoWatch] [BaseType (typeof (UIViewController), Delegates = new string [] {"WeakDelegate"}, Events = new Type [] { typeof (PKAddPassesViewControllerDelegate) })] // invalid null handle for default 'init' [DisableDefaultCtor] @@ -578,6 +630,8 @@ interface PKAddPassesViewController { PKAddPassesViewControllerDelegate Delegate { get; set; } } + [NoMac] // under `TARGET_OS_IPHONE` + [NoWatch] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -586,7 +640,9 @@ interface PKAddPassesViewControllerDelegate { void Finished (PKAddPassesViewController controller); } + [NoWatch] [iOS (9,0)] + [Mac (11,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] // designated interface PKAddPaymentPassRequest : NSSecureCoding @@ -608,6 +664,8 @@ interface PKAddPaymentPassRequest : NSSecureCoding NSData WrappedKey { get; set; } } + [Mac (11,0)] // not explict (no availability macro) but part of macOS headers + [NoWatch] [iOS (9,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] @@ -616,7 +674,7 @@ interface PKAddPaymentPassRequestConfiguration : NSSecureCoding [DesignatedInitializer] [Export ("initWithEncryptionScheme:")] IntPtr Constructor (NSString encryptionScheme); - + [Export ("encryptionScheme")] NSString EncryptionScheme { get; } @@ -655,6 +713,8 @@ interface PKAddPaymentPassRequestConfiguration : NSSecureCoding NSSet ProductIdentifiers { get; set; } } + [NoMac] // under `#if TARGET_OS_IPHONE` + [NoWatch] [iOS (9,0)] [BaseType (typeof(UIViewController))] [DisableDefaultCtor] @@ -684,6 +744,8 @@ interface PKAddPaymentPassViewController interface IPKAddPaymentPassViewControllerDelegate {} + [NoWatch] + [NoMac] // under `#if TARGET_OS_IPHONE` [Protocol, Model] [BaseType (typeof(NSObject))] interface PKAddPaymentPassViewControllerDelegate @@ -696,8 +758,8 @@ interface PKAddPaymentPassViewControllerDelegate [Export ("addPaymentPassViewController:didFinishAddingPaymentPass:error:")] void DidFinishAddingPaymentPass (PKAddPaymentPassViewController controller, [NullAllowed] PKPaymentPass pass, [NullAllowed] NSError error); } -#endif // !WATCH + [Mac (11,0)] [BaseType (typeof (PKObject))] interface PKPass : NSSecureCoding, NSCopying { [Export ("initWithData:error:")] @@ -707,6 +769,7 @@ interface PKPass : NSSecureCoding, NSCopying { string AuthenticationToken { get; } [NoWatch] + [NoMac] [Export ("icon", ArgumentSemantic.Copy)] UIImage Icon { get; } @@ -738,7 +801,7 @@ interface PKPass : NSSecureCoding, NSCopying { [Export ("localizedValueForFieldKey:")] NSObject GetLocalizedValue (NSString key); // TODO: Should be enum for PKPassLibraryUserInfoKey -#if !XAMCORE_4_0 +#if !XAMCORE_4_0 && !MONOMAC [Field ("PKPassKitErrorDomain")] NSString ErrorDomain { get; } #endif @@ -753,6 +816,7 @@ interface PKPass : NSSecureCoding, NSCopying { [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'SecureElementPass' instead.")] [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'SecureElementPass' instead.")] + [NoMac] [iOS (8,0)] [Export ("paymentPass")] PKPaymentPass PaymentPass { get; } @@ -772,6 +836,7 @@ interface PKPass : NSSecureCoding, NSCopying { [Watch (3,0)] [iOS (9,0)] + [Mac (11,0)] [BaseType (typeof(NSObject))] interface PKPaymentMethod : NSSecureCoding { @@ -786,6 +851,7 @@ interface PKPaymentMethod : NSSecureCoding [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'SecureElementPass' instead.")] [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'SecureElementPass' instead.")] + [NoMac] [NullAllowed, Export ("paymentPass", ArgumentSemantic.Copy)] PKPaymentPass PaymentPass { get; } @@ -799,16 +865,19 @@ interface PKPaymentMethod : NSSecureCoding } [iOS (8,0)] + [Mac (11,0)] [BaseType (typeof (PKSecureElementPass))] interface PKPaymentPass { [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'PKSecureElementPass.PassActivationState' instead.")] [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'PKSecureElementPass.PassActivationState' instead.")] + [NoMac] [Export ("activationState")] PKPaymentPassActivationState ActivationState { get; } } [iOS (8,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] partial interface PKObject : NSCoding, NSSecureCoding, NSCopying { //Empty class in header file @@ -817,16 +886,19 @@ partial interface PKObject : NSCoding, NSSecureCoding, NSCopying { [Static] [iOS (8,0)] [Watch (3,0)] + [Mac (11,0)] interface PKPaymentNetwork { [Field ("PKPaymentNetworkAmex")] NSString Amex { get; } + [NoMac] [iOS (10,3), Watch (3,2)] [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'CartesBancaires' instead.")] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'CartesBancaires' instead.")] [Field ("PKPaymentNetworkCarteBancaire")] NSString CarteBancaire { get; } + [NoMac] [iOS (11,0)][Watch (4,0)] [Deprecated (PlatformName.WatchOS, 4,2, message: "Use 'CartesBancaires' instead.")] [Deprecated (PlatformName.iOS, 11,2, message: "Use 'CartesBancaires' instead.")] @@ -900,9 +972,18 @@ interface PKPaymentNetwork { [Watch (5,1,2)][iOS (12,1,1)] [Field ("PKPaymentNetworkMada")] NSString Mada { get; } + + [Watch (7,0)][iOS (14,0)] + [Field ("PKPaymentNetworkBarcode")] + NSString Barcode { get; } + + [Watch (7,0)][iOS (14,0)] + [Field ("PKPaymentNetworkGirocard")] + NSString Girocard { get; } } #if !WATCH + [Mac (11,0)] [iOS (8,3)] [BaseType (typeof (UIButton))] [DisableDefaultCtor] @@ -923,6 +1004,7 @@ interface PKPaymentButton { nfloat CornerRadius { get; set; } } + [NoMac] // under `#if TARGET_OS_IOS` [iOS (9,0)] [BaseType (typeof (UIButton))] [DisableDefaultCtor] @@ -941,6 +1023,7 @@ interface PKAddPassButton { } #endif // !WATCH + [Mac (11,0)] [iOS(9,0)] [Static] interface PKEncryptionScheme { @@ -953,6 +1036,7 @@ interface PKEncryptionScheme { NSString Rsa_V2 { get; } } + [Mac (11,0)] [Watch (3,0)][iOS (10,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // providing DesignatedInitializer @@ -988,14 +1072,18 @@ interface PKPaymentAuthorizationController { interface IPKPaymentAuthorizationControllerDelegate {} + [Mac (11,0)] [Watch (3,0)][iOS (10,0)] [Protocol][Model] [BaseType (typeof (NSObject))] interface PKPaymentAuthorizationControllerDelegate { + [NoMac] [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'DidAuthorizePayment' overload with the 'Action' parameter instead.")] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidAuthorizePayment' overload with the 'Action' parameter instead.")] +#if !XAMCORE_4_0 [Abstract] +#endif [Export ("paymentAuthorizationController:didAuthorizePayment:completion:")] void DidAuthorizePayment (PKPaymentAuthorizationController controller, PKPayment payment, Action completion); @@ -1010,6 +1098,7 @@ interface PKPaymentAuthorizationControllerDelegate { [Export ("paymentAuthorizationControllerWillAuthorizePayment:")] void WillAuthorizePayment (PKPaymentAuthorizationController controller); + [NoMac] [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'DidSelectShippingMethod' overload with the 'Action' parameter instead.")] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectShippingMethod' overload with the 'Action' parameter instead.")] [Export ("paymentAuthorizationController:didSelectShippingMethod:completion:")] @@ -1019,6 +1108,7 @@ interface PKPaymentAuthorizationControllerDelegate { [Export ("paymentAuthorizationController:didSelectShippingMethod:handler:")] void DidSelectShippingMethod (PKPaymentAuthorizationController controller, PKPaymentMethod paymentMethod, Action completion); + [NoMac] [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'DidSelectShippingContact' overload with the 'Action' parameter instead.")] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectShippingContact' overload with the 'Action' parameter instead.")] [Export ("paymentAuthorizationController:didSelectShippingContact:completion:")] @@ -1028,6 +1118,7 @@ interface PKPaymentAuthorizationControllerDelegate { [Export ("paymentAuthorizationController:didSelectShippingContact:handler:")] void DidSelectShippingContact (PKPaymentAuthorizationController controller, PKContact contact, Action completion); + [NoMac] [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'DidSelectPaymentMethod' overload with the 'Action' parameter instead.")] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectPaymentMethod' overload with the 'Action' parameter instead.")] [Export ("paymentAuthorizationController:didSelectPaymentMethod:completion:")] @@ -1036,8 +1127,21 @@ interface PKPaymentAuthorizationControllerDelegate { [Watch (4,0)][iOS (11,0)] [Export ("paymentAuthorizationController:didSelectPaymentMethod:handler:")] void DidSelectPaymentMethod (PKPaymentAuthorizationController controller, PKPaymentMethod paymentMethod, Action completion); + + [Watch (7,0)][iOS (14,0)] + [Export ("paymentAuthorizationController:didRequestMerchantSessionUpdate:")] + void DidRequestMerchantSessionUpdate (PKPaymentAuthorizationController controller, Action handler); + + [Watch (7,0)][iOS (14,0)] + [Export ("presentationWindowForPaymentAuthorizationController:")] + [return: NullAllowed] +#if MONOMAC + [Abstract] +#endif + UIWindow GetPresentationWindow (PKPaymentAuthorizationController controller); } + [Mac (11,0)] [iOS (10,1)] [NoWatch] // Radar: https://trello.com/c/MvaHEZlc [BaseType (typeof(NSObject))] @@ -1055,6 +1159,7 @@ interface PKLabeledValue string Value { get; } } + [Mac (11,0)] [Watch (4,3), iOS (11,3)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1081,8 +1186,9 @@ interface PKTransitPassProperties { NSDate ExpirationDate { get; } } + [Mac (11,0)] [Watch (3,1), iOS (10,1)] -#if XAMCORE_4_0 +#if XAMCORE_4_0 || MONOMAC [DisableDefaultCtor] // hint: getter only props and a factory method. #endif [BaseType (typeof (PKTransitPassProperties))] @@ -1120,6 +1226,7 @@ interface PKSuicaPassProperties bool Blacklisted { [Bind ("isBlacklisted")] get; } } + [Mac (11,0)] [Watch (4,0)][iOS (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1135,6 +1242,7 @@ interface PKPaymentAuthorizationResult { NSError[] Errors { get; set; } } + [Mac (11,0)] [Watch (4,0)][iOS (11,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] @@ -1151,6 +1259,7 @@ interface PKPaymentRequestUpdate { PKPaymentSummaryItem[] PaymentSummaryItems { get; set; } } + [Mac (11,0)] [Watch (4,0)][iOS (11,0)] [BaseType (typeof (PKPaymentRequestUpdate))] [DisableDefaultCtor] @@ -1167,6 +1276,7 @@ interface PKPaymentRequestShippingContactUpdate { NSError[] Errors { get; set; } } + [Mac (11,0)] [Watch (4,0)][iOS (11,0)] [BaseType (typeof (PKPaymentRequestUpdate))] [DisableDefaultCtor] @@ -1178,6 +1288,7 @@ interface PKPaymentRequestShippingMethodUpdate { IntPtr Constructor (PKPaymentSummaryItem[] paymentSummaryItems); } + [Mac (11,0)] [Watch (4,0)][iOS (11,0)] [BaseType (typeof (PKPaymentRequestUpdate))] [DisableDefaultCtor] @@ -1198,6 +1309,7 @@ interface PKPaymentRequestPaymentMethodUpdate { IntPtr Constructor (PKPaymentSummaryItem[] paymentSummaryItems); } + [Mac (11,0)] [Static] // not to enum'ify - exposed as NSString inside NSError interface PKPaymentErrorKeys { @@ -1213,6 +1325,7 @@ interface PKPaymentErrorKeys { interface IPKDisbursementAuthorizationControllerDelegate { } [NoWatch] + [NoMac] // both members are not available but, like many times, the protocol is not decorated [iOS (12,2)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -1227,6 +1340,7 @@ interface PKDisbursementAuthorizationControllerDelegate { } [NoWatch] + [NoMac] // all members are not available but, like many times, the type is not decorated [iOS (12,2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1250,6 +1364,7 @@ interface PKDisbursementAuthorizationController { bool SupportsDisbursements { get; } } + [NoMac] // only used in non-macOS API [NoWatch] [iOS (12, 2)] [Native] @@ -1260,6 +1375,7 @@ public enum PKDisbursementRequestSchedule : long { [NoWatch] [iOS (12, 2)] + [NoMac] // all members are decorated as such, but not the type itself [BaseType (typeof (NSObject))] interface PKDisbursementRequest { [Export ("amount", ArgumentSemantic.Copy)] @@ -1271,6 +1387,7 @@ interface PKDisbursementRequest { [Export ("countryCode")] string CountryCode { get; set; } + [NoMac] [Export ("requestSchedule", ArgumentSemantic.Assign)] PKDisbursementRequestSchedule RequestSchedule { get; set; } @@ -1278,6 +1395,7 @@ interface PKDisbursementRequest { PKPaymentSummaryItem [] SummaryItems { get; set; } } + [NoMac] // all members annoted `API_UNAVAILABLE(...macos)` [NoWatch] [iOS (12,2)] [BaseType (typeof (NSObject))] @@ -1290,6 +1408,7 @@ interface PKDisbursementVoucher { NSUrl RedemptionUrl { get; } } + [Mac (11,0)] [Watch (6,2), iOS (13,4)] [BaseType (typeof (PKPass))] [DisableDefaultCtor] @@ -1316,4 +1435,384 @@ interface PKSecureElementPass { [NullAllowed, Export ("pairedTerminalIdentifier")] string PairedTerminalIdentifier { get; } } + + [Mac (11,0)] + [NoWatch, NoTV] + [iOS (14,0)] + [Native] + public enum PKAddShareablePassConfigurationPrimaryAction : ulong { + Add, + Share, + } + + [Mac (11,0)] + [Watch (7,0), iOS (14,0)] + [NoTV] + [Native] + public enum PKBarcodeEventConfigurationDataType : long { + Unknown, + SigningKeyMaterial, + SigningCertificate, + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Native] + public enum PKIssuerProvisioningExtensionAuthorizationResult : long { + Canceled, + Authorized, + } + + [NoWatch, NoTV] + [iOS (13,4)] + [Mac (11,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface PKAddSecureElementPassConfiguration { + + [NullAllowed, Export ("issuerIdentifier")] + string IssuerIdentifier { get; set; } + + [NullAllowed, Export ("localizedDescription")] + string LocalizedDescription { get; set; } + } + + [NoWatch, NoTV] + [Mac (11,0)] // not explicit (no attribute) but headers are present + [iOS (13,4)] + [BaseType (typeof (PKAddSecureElementPassConfiguration))] + // note: `init` is present in headers + interface PKAddCarKeyPassConfiguration { + + [Export ("password")] + string Password { get; set; } + } + + interface IPKAddSecureElementPassViewControllerDelegate {} + + [NoWatch, NoTV, NoMac] // under `#if TARGET_OS_IOS` + [iOS (13,4)] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface PKAddSecureElementPassViewControllerDelegate { + + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'DidFinishAddingSecureElementPasses' instead.")] + [Abstract] + [Export ("addSecureElementPassViewController:didFinishAddingSecureElementPass:error:")] + void DidFinishAddingSecureElementPass (PKAddSecureElementPassViewController controller, [NullAllowed] PKSecureElementPass pass, [NullAllowed] NSError error); + + [Abstract] + [Export ("addSecureElementPassViewController:didFinishAddingSecureElementPasses:error:")] + void DidFinishAddingSecureElementPasses (PKAddSecureElementPassViewController controller, [NullAllowed] PKSecureElementPass[] passes, [NullAllowed] NSError error); +} + + [NoWatch, NoTV, NoMac] // under `#if TARGET_OS_IOS` + [iOS (13,4)] + [BaseType (typeof (UIViewController))] + [DisableDefaultCtor] + interface PKAddSecureElementPassViewController { + + [Static] + [Export ("canAddSecureElementPassWithConfiguration:")] + bool CanAddSecureElementPass (PKAddSecureElementPassConfiguration configuration); + + [Export ("initWithConfiguration:delegate:")] + IntPtr Constructor (PKAddSecureElementPassConfiguration configuration, [NullAllowed] IPKAddSecureElementPassViewControllerDelegate @delegate); + + [Wrap ("WeakDelegate")] + [NullAllowed] + IPKAddSecureElementPassViewControllerDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + } + + [NoWatch, NoTV] + [iOS (14,0)] + [Mac (11,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface PKShareablePassMetadata { + + [Export ("initWithProvisioningCredentialIdentifier:cardConfigurationIdentifier:sharingInstanceIdentifier:passThumbnailImage:ownerDisplayName:localizedDescription:")] + IntPtr Constructor (string credentialIdentifier, string cardConfigurationIdentifier, string sharingInstanceIdentifier, CGImage passThumbnailImage, string ownerDisplayName, string localizedDescription); + + [Export ("credentialIdentifier", ArgumentSemantic.Strong)] + string CredentialIdentifier { get; } + + [Export ("cardConfigurationIdentifier", ArgumentSemantic.Strong)] + string CardConfigurationIdentifier { get; } + + [Export ("sharingInstanceIdentifier", ArgumentSemantic.Strong)] + string SharingInstanceIdentifier { get; } + + [Export ("passThumbnailImage")] + CGImage PassThumbnailImage { get; } + + [Export ("localizedDescription", ArgumentSemantic.Strong)] + string LocalizedDescription { get; } + + [Export ("ownerDisplayName", ArgumentSemantic.Strong)] + string OwnerDisplayName { get; } + } + + [NoWatch, NoTV] + [iOS (14,0)] + [Mac (11,0)] + [BaseType (typeof (PKAddSecureElementPassConfiguration))] + [DisableDefaultCtor] + interface PKAddShareablePassConfiguration { + + [Async] + [Static] + [Export ("configurationForPassMetadata:provisioningPolicyIdentifier:primaryAction:completion:")] + void GetConfiguration (PKShareablePassMetadata[] passMetadata, string provisioningPolicyIdentifier, PKAddShareablePassConfigurationPrimaryAction action, Action completion); + + [Export ("primaryAction")] + PKAddShareablePassConfigurationPrimaryAction PrimaryAction { get; } + + [Export ("credentialsMetadata", ArgumentSemantic.Strong)] + PKShareablePassMetadata[] CredentialsMetadata { get; } + + [Export ("provisioningPolicyIdentifier", ArgumentSemantic.Strong)] + string ProvisioningPolicyIdentifier { get; } + } + + [Mac (11,0)] + [Watch (7,0)][iOS (14,0)] + [NoTV] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface PKBarcodeEventConfigurationRequest { + + [Export ("deviceAccountIdentifier")] + string DeviceAccountIdentifier { get; } + + [Export ("configurationData")] + NSData ConfigurationData { get; } + + [Export ("configurationDataType")] + PKBarcodeEventConfigurationDataType ConfigurationDataType { get; } + } + + [Mac (11,0)] + [Watch (7,0)][iOS (14,0)] + [NoTV] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface PKBarcodeEventMetadataRequest { + + [Export ("deviceAccountIdentifier")] + string DeviceAccountIdentifier { get; } + + [Export ("lastUsedBarcodeIdentifier")] + string LastUsedBarcodeIdentifier { get; } + } + + [Mac (11,0)] + [Watch (7,0)][iOS (14,0)] + [NoTV] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface PKBarcodeEventMetadataResponse { + + [Export ("initWithPaymentInformation:")] + IntPtr Constructor (NSData paymentInformation); + + [Export ("paymentInformation", ArgumentSemantic.Copy)] + NSData PaymentInformation { get; set; } + } + + [Mac (11,0)] + [Watch (7,0)][iOS (14,0)] + [NoTV] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface PKBarcodeEventSignatureRequest { + + [Export ("deviceAccountIdentifier")] + string DeviceAccountIdentifier { get; } + + [Export ("transactionIdentifier")] + string TransactionIdentifier { get; } + + [Export ("barcodeIdentifier")] + string BarcodeIdentifier { get; } + + [Export ("rawMerchantName")] + string RawMerchantName { get; } + + [Export ("merchantName")] + string MerchantName { get; } + + [Export ("transactionDate", ArgumentSemantic.Strong)] + NSDate TransactionDate { get; } + + [Export ("currencyCode")] + string CurrencyCode { get; } + + // NSDecimalNumber is used elsewhere (but it's a subclass for NSNumber and can't be used here) + [Export ("amount", ArgumentSemantic.Strong)] + NSNumber Amount { get; } + + [Export ("transactionStatus")] + string TransactionStatus { get; } + + [Export ("partialSignature", ArgumentSemantic.Copy)] + NSData PartialSignature { get; } + } + + [Mac (11,0)] + [Watch (7,0)][iOS (14,0)] + [NoTV] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface PKBarcodeEventSignatureResponse { + + [Export ("initWithSignedData:")] + IntPtr Constructor (NSData signedData); + + [Export ("signedData", ArgumentSemantic.Copy)] + NSData SignedData { get; set; } + } + + [NoWatch, NoTV] + [iOS (14,0)] + [Mac (11,0)] + [BaseType (typeof (NSObject))] + [DesignatedDefaultCtor] + interface PKIssuerProvisioningExtensionStatus { + + [Export ("requiresAuthentication")] + bool RequiresAuthentication { get; set; } + + [Export ("passEntriesAvailable")] + bool PassEntriesAvailable { get; set; } + + [Export ("remotePassEntriesAvailable")] + bool RemotePassEntriesAvailable { get; set; } + } + + [NoWatch, NoTV] + [iOS (14,0)] + [Mac (11,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface PKIssuerProvisioningExtensionPassEntry { + + [Export ("identifier")] + string Identifier { get; } + + [Export ("title")] + string Title { get; } + + [Export ("art")] + CGImage Art { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface PKIssuerProvisioningExtensionHandler { + + [Async] + [Export ("statusWithCompletion:")] + void GetStatus (Action completion); + + [Async] + [Export ("passEntriesWithCompletion:")] + void PassEntries (Action completion); + + [Async] + [Export ("remotePassEntriesWithCompletion:")] + void RemotePassEntries (Action completion); + + [Async] + [Export ("generateAddPaymentPassRequestForPassEntryWithIdentifier:configuration:certificateChain:nonce:nonceSignature:completionHandler:")] + void GenerateAddPaymentPassRequest (string identifier, PKAddPaymentPassRequestConfiguration configuration, NSData[] certificates, NSData nonce, NSData nonceSignature, Action completion); + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Protocol] + interface PKIssuerProvisioningExtensionAuthorizationProviding { + + [Abstract] + [NullAllowed, Export ("completionHandler", ArgumentSemantic.Copy)] + Action CompletionHandler { get; set; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + delegate void PKInformationRequestCompletionBlock (PKBarcodeEventMetadataResponse response); + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + delegate void PKSignatureRequestCompletionBlock (PKBarcodeEventSignatureResponse response); + + [NoTV] + [Mac (11,0)] + [Watch (7,0)][iOS (14,0)] + [Protocol] + interface PKPaymentInformationRequestHandling { + + [Abstract] + [Export ("handleInformationRequest:completion:")] + void HandleInformationRequest (PKBarcodeEventMetadataRequest infoRequest, PKInformationRequestCompletionBlock completion); + + [Abstract] + [Export ("handleSignatureRequest:completion:")] + void HandleSignatureRequest (PKBarcodeEventSignatureRequest signatureRequest, PKSignatureRequestCompletionBlock completion); + + [Abstract] + [Export ("handleConfigurationRequest:completion:")] + void HandleConfigurationRequest (PKBarcodeEventConfigurationRequest configurationRequest, Action completion); + } + + [NoWatch, NoTV] + [iOS (14,0)] + [Mac (11,0)] + [BaseType (typeof (PKIssuerProvisioningExtensionPassEntry))] + [DisableDefaultCtor] + interface PKIssuerProvisioningExtensionPaymentPassEntry { + + [Export ("initWithIdentifier:title:art:addRequestConfiguration:")] + [DesignatedInitializer] + IntPtr Constructor (string identifier, string title, CGImage art, PKAddPaymentPassRequestConfiguration configuration); + + [Export ("addRequestConfiguration")] + PKAddPaymentPassRequestConfiguration AddRequestConfiguration { get; } + } + + [NoTV] + [Watch (7,0)][Mac (11,0)][iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface PKPaymentMerchantSession { + + [Export ("initWithDictionary:")] + IntPtr Constructor (NSDictionary dictionary); + } + + [NoTV] + [Watch (7,0)][Mac (11,0)][iOS (14,0)] + [BaseType (typeof (NSObject))] + interface PKPaymentRequestMerchantSessionUpdate { + + [Export ("initWithStatus:merchantSession:")] + IntPtr Constructor (PKPaymentAuthorizationStatus status, [NullAllowed] PKPaymentMerchantSession session); + + [Export ("status", ArgumentSemantic.Assign)] + PKPaymentAuthorizationStatus Status { get; set; } + + [NullAllowed, Export ("session", ArgumentSemantic.Strong)] + PKPaymentMerchantSession Session { get; set; } + } + + [Watch (7,0)][Mac (11,0)][iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface PKPaymentInformationEventExtension { + } } diff --git a/src/pencilkit.cs b/src/pencilkit.cs index 14d3eb18f4d4..1852307522df 100644 --- a/src/pencilkit.cs +++ b/src/pencilkit.cs @@ -3,8 +3,9 @@ // // Authors: // TJ Lambert +// Whitney Schmidt // -// Copyright 2019 Microsoft Corporation All rights reserved. +// Copyright 2019, 2020 Microsoft Corporation All rights reserved. // #if MONOMAC @@ -19,25 +20,30 @@ using UIView = Foundation.NSObject; using UIWindow = Foundation.NSObject; using UIUserInterfaceStyle = Foundation.NSObject; +using BezierPath = AppKit.NSBezierPath; #else using UIKit; +using BezierPath = UIKit.UIBezierPath; #endif using System; +using System.ComponentModel; using ObjCRuntime; using Foundation; using CoreGraphics; namespace PencilKit { - [iOS (13, 0), NoMac] + [iOS (13, 0), Mac (11, 0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [Native] enum PKEraserType : long { Vector, Bitmap, } - [iOS (13, 0), NoMac] + [iOS (13, 0), Mac (11, 0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] enum PKInkType { [Field ("PKInkTypePen")] Pen, @@ -49,8 +55,18 @@ enum PKInkType { Marker, } - [Unavailable (PlatformName.UIKitForMac), Advice ("This API is not available when using UIKit on macOS.")] + [iOS (14, 0), NoMac] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Native] + enum PKCanvasViewDrawingPolicy : ulong + { + Default, + AnyInput, + PencilOnly, + } + [iOS (13, 0), NoMac] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [BaseType (typeof (NSObject))] [Model (AutoGeneratedName = true)] [Protocol] interface PKCanvasViewDelegate : UIScrollViewDelegate { @@ -71,6 +87,7 @@ interface PKCanvasViewDelegate : UIScrollViewDelegate { interface IPKCanvasViewDelegate {} [iOS (13, 0), NoMac] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [BaseType (typeof (UIScrollView))] interface PKCanvasView : PKToolPickerObserver { @@ -78,31 +95,38 @@ interface PKCanvasView : PKToolPickerObserver { // [Export ("delegate", ArgumentSemantic.Weak), NullAllowed] // NSObject WeakDelegate { get; set; } - [Unavailable (PlatformName.UIKitForMac), Advice ("This API is not available when using UIKit on macOS.")] + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using Catalyst on macOS.")] [Wrap ("WeakDelegate"), NullAllowed, New] IPKCanvasViewDelegate Delegate { get; set; } [Export ("drawing", ArgumentSemantic.Copy)] PKDrawing Drawing { get; set; } - [Unavailable (PlatformName.UIKitForMac), Advice ("This API is not available when using UIKit on macOS.")] + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using Catalyst on macOS.")] [Export ("tool", ArgumentSemantic.Copy)] PKTool Tool { get; set; } - [Unavailable (PlatformName.UIKitForMac), Advice ("This API is not available when using UIKit on macOS.")] + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using Catalyst on macOS.")] [Export ("rulerActive")] bool RulerActive { [Bind ("isRulerActive")] get; set; } - [Unavailable (PlatformName.UIKitForMac), Advice ("This API is not available when using UIKit on macOS.")] + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using Catalyst on macOS.")] [Export ("drawingGestureRecognizer")] UIGestureRecognizer DrawingGestureRecognizer { get; } - [Unavailable (PlatformName.UIKitForMac), Advice ("This API is not available when using UIKit on macOS.")] + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'DrawingPolicy' property instead.")] + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using Catalyst on macOS.")] [Export ("allowsFingerDrawing")] bool AllowsFingerDrawing { get; set; } + + [iOS (14, 0)] + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using Catalyst on macOS.")] + [Export ("drawingPolicy", ArgumentSemantic.Assign)] + PKCanvasViewDrawingPolicy DrawingPolicy { get; set; } } [iOS (13, 0), Mac (10, 15)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] interface PKDrawing : NSCopying, NSSecureCoding { @@ -114,12 +138,20 @@ interface PKDrawing : NSCopying, NSSecureCoding { [Export ("initWithData:error:")] IntPtr Constructor (NSData data, [NullAllowed] out NSError error); + [Mac (11, 0), iOS (14, 0)] + [Export ("initWithStrokes:")] + IntPtr Constructor (PKStroke[] strokes); + [Export ("dataRepresentation")] NSData DataRepresentation { get; } [Export ("bounds")] CGRect Bounds { get; } + [Mac (11, 0), iOS (14, 0)] + [Export ("strokes")] + PKStroke[] Strokes { get; } + [Export ("imageFromRect:scale:")] UIImage GetImage (CGRect rect, nfloat scale); @@ -128,9 +160,14 @@ interface PKDrawing : NSCopying, NSSecureCoding { [Export ("drawingByAppendingDrawing:")] PKDrawing GetDrawing (PKDrawing drawing); + + [Mac (11, 0), iOS (14, 0)] + [Export ("drawingByAppendingStrokes:")] + PKDrawing GetDrawing (PKStroke[] strokes); } - [iOS (13, 0), NoMac] + [iOS (13, 0), Mac (11, 0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [BaseType (typeof (PKTool))] [DisableDefaultCtor] interface PKEraserTool { @@ -143,7 +180,8 @@ interface PKEraserTool { IntPtr Constructor (PKEraserType eraserType); } - [iOS (13, 0), NoMac] + [iOS (13, 0), Mac (11, 0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [BaseType (typeof (PKTool))] [DisableDefaultCtor] interface PKInkingTool { @@ -155,6 +193,10 @@ interface PKInkingTool { [Export ("initWithInkType:color:")] IntPtr Constructor ([BindAs (typeof (PKInkType))] NSString type, UIColor color); + [iOS (14, 0)] + [Export ("initWithInk:width:")] + IntPtr Constructor (PKInk ink, nfloat width); + [Static] [Export ("defaultWidthForInkType:")] nfloat GetDefaultWidth ([BindAs (typeof (PKInkType))] NSString inkType); @@ -171,6 +213,7 @@ interface PKInkingTool { [BindAs (typeof (PKInkType))] NSString InkType { get; } + [NoMac] [Static] [Export ("convertColor:fromUserInterfaceStyle:to:")] UIColor ConvertColor (UIColor color, UIUserInterfaceStyle fromUserInterfaceStyle, UIUserInterfaceStyle toUserInterfaceStyle); @@ -180,22 +223,28 @@ interface PKInkingTool { [Export ("width")] nfloat Width { get; } + + [iOS (14, 0)] + [Export ("ink")] + PKInk Ink { get; } } - [iOS (13, 0), NoMac] + [iOS (13, 0), Mac (11, 0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [BaseType (typeof (PKTool))] [DesignatedDefaultCtor] interface PKLassoTool {} - [iOS (13, 0), NoMac] + [iOS (13, 0), Mac (11, 0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKTool : NSCopying {} interface IPKToolPickerObserver {} - [Unavailable (PlatformName.UIKitForMac), Advice ("This API is not available when using UIKit on macOS.")] [iOS (13, 0), NoMac] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [Protocol] interface PKToolPickerObserver { @@ -212,13 +261,16 @@ interface PKToolPickerObserver { void FramesObscuredDidChange (PKToolPicker toolPicker); } - - [Unavailable (PlatformName.UIKitForMac), Advice ("This API is not available when using UIKit on macOS.")] [iOS (13, 0), NoMac] + [Introduced (PlatformName.MacCatalyst, 14, 0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface PKToolPicker { + [iOS (14, 0)] + [Export ("init")] + IntPtr Constructor (); + [Export ("addObserver:")] void AddObserver (IPKToolPickerObserver observer); @@ -246,9 +298,167 @@ interface PKToolPicker { [Export ("colorUserInterfaceStyle", ArgumentSemantic.Assign)] UIUserInterfaceStyle ColorUserInterfaceStyle { get; set; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Create individual instances instead.")] + [Unavailable (PlatformName.MacCatalyst), Advice ("This API is not available when using Catalyst on macOS.")] [Static] [return: NullAllowed] [Export ("sharedToolPickerForWindow:")] PKToolPicker GetSharedToolPicker (UIWindow window); + + [iOS (14, 0)] + [Export ("showsDrawingPolicyControls")] + bool ShowsDrawingPolicyControls { get; set; } + + [iOS (14, 0)] + [NullAllowed] + [Export ("stateAutosaveName")] + string StateAutosaveName { get; set; } + } + + [Mac (11, 0), iOS (14, 0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [DisableDefaultCtor] + [BaseType (typeof(NSObject))] + interface PKInk : NSCopying + { + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Export ("initWithInkType:color:")] + [DesignatedInitializer] + IntPtr Constructor (/* enum PKInkType */ NSString type, UIColor color); + + [Wrap ("this (type.GetConstant ()!, color)")] + IntPtr Constructor (PKInkType type, UIColor color); + + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Export ("inkType")] + NSString WeakInkType { get; } + + [Wrap ("PKInkTypeExtensions.GetValue(WeakInkType)")] + PKInkType InkType { get; } + + [Export ("color")] + UIColor Color { get; } + } + + [Mac (11, 0), iOS (14, 0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [DisableDefaultCtor] + [BaseType (typeof(NSObject))] + interface PKFloatRange : NSCopying + { + [Export ("initWithLowerBound:upperBound:")] + IntPtr Constructor (nfloat lowerBound, nfloat upperBound); + + [Export ("lowerBound")] + nfloat LowerBound { get; } + + [Export ("upperBound")] + nfloat UpperBound { get; } + } + + [Mac (11, 0), iOS (14, 0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [DisableDefaultCtor] + [BaseType (typeof(NSObject))] + interface PKStroke : NSCopying + { + [Export ("initWithInk:strokePath:transform:mask:")] + IntPtr Constructor (PKInk ink, PKStrokePath path, CGAffineTransform transform, [NullAllowed] BezierPath mask); + + [Export ("ink")] + PKInk Ink { get; } + + [Export ("transform")] + CGAffineTransform Transform { get; } + + [Export ("path")] + PKStrokePath Path { get; } + + [NullAllowed, Export ("mask")] + BezierPath Mask { get; } + + [Export ("renderBounds")] + CGRect RenderBounds { get; } + + [Export ("maskedPathRanges")] + PKFloatRange[] MaskedPathRanges { get; } + } + + delegate void PKInterpolatedPointsEnumeratorHandler (PKStrokePoint strokePoint, out bool stop); + + [Mac (11, 0), iOS (14, 0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [DisableDefaultCtor] + [BaseType (typeof(NSObject))] + interface PKStrokePath : NSCopying + { + [Export ("initWithControlPoints:creationDate:")] + [DesignatedInitializer] + IntPtr Constructor (PKStrokePoint[] controlPoints, NSDate creationDate); + + [Export ("count")] + nuint Count { get; } + + [Export ("creationDate")] + NSDate CreationDate { get; } + + [Export ("pointAtIndex:")] + PKStrokePoint GetPoint (nuint index); + + [Export ("objectAtIndexedSubscript:")] + PKStrokePoint GetObject (nuint indexedSubscript); + + [Export ("interpolatedLocationAt:")] + CGPoint GetInterpolatedLocation (nfloat parametricValue); + + [Export ("interpolatedPointAt:")] + PKStrokePoint GetInterpolatedPoint (nfloat parametricValue); + + [Export ("enumerateInterpolatedPointsInRange:strideByDistance:usingBlock:")] + void EnumerateInterpolatedPointsByDistanceStep (PKFloatRange range, nfloat distanceStep, PKInterpolatedPointsEnumeratorHandler enumeratorHandler); + + [Export ("enumerateInterpolatedPointsInRange:strideByTime:usingBlock:")] + void EnumerateInterpolatedPointsByTimeStep (PKFloatRange range, double timeStep, PKInterpolatedPointsEnumeratorHandler enumeratorHandler); + + [Export ("enumerateInterpolatedPointsInRange:strideByParametricStep:usingBlock:")] + void EnumerateInterpolatedPointsByParametricStep (PKFloatRange range, nfloat parametricStep, PKInterpolatedPointsEnumeratorHandler enumeratorHandler); + + [Export ("parametricValue:offsetByDistance:")] + nfloat GetParametricValue (nfloat parametricValue, nfloat distanceStep); + + [Export ("parametricValue:offsetByTime:")] + nfloat GetParametricValue (nfloat parametricValue, double timeStep); + } + + [Mac (11, 0), iOS (14, 0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface PKStrokePoint : NSCopying + { + [Export ("initWithLocation:timeOffset:size:opacity:force:azimuth:altitude:")] + [DesignatedInitializer] + IntPtr Constructor (CGPoint location, double timeOffset, CGSize size, nfloat opacity, nfloat force, nfloat azimuth, nfloat altitude); + + [Export ("location")] + CGPoint Location { get; } + + [Export ("timeOffset")] + double TimeOffset { get; } + + [Export ("size")] + CGSize Size { get; } + + [Export ("opacity")] + nfloat Opacity { get; } + + [Export ("azimuth")] + nfloat Azimuth { get; } + + [Export ("force")] + nfloat Force { get; } + + [Export ("altitude")] + nfloat Altitude { get; } } } diff --git a/src/photos.cs b/src/photos.cs index c2ee062b241a..e230cab53cd4 100644 --- a/src/photos.cs +++ b/src/photos.cs @@ -1072,13 +1072,30 @@ interface PHPhotoLibrary { [Export ("sharedPhotoLibrary")] PHPhotoLibrary SharedPhotoLibrary { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'GetAuthorizationStatus' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'GetAuthorizationStatus' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'GetAuthorizationStatus' instead.")] [Static, Export ("authorizationStatus")] PHAuthorizationStatus AuthorizationStatus { get; } + [TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("authorizationStatusForAccessLevel:")] + PHAuthorizationStatus GetAuthorizationStatus (PHAccessLevel accessLevel); + + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'RequestAuthorization(PHAccessLevel, Action)' overload instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'RequestAuthorization(PHAccessLevel, Action)' overload instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'RequestAuthorization(PHAccessLevel, Action)' overload instead.")] [Static, Export ("requestAuthorization:")] [Async] void RequestAuthorization (Action handler); + [TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("requestAuthorizationForAccessLevel:handler:")] + [Async] + void RequestAuthorization (PHAccessLevel accessLevel, Action handler); + // no [Async] since we're binding performChangesAndWait:error: too [Export ("performChanges:completionHandler:")] void PerformChanges (Action changeHandler, Action completionHandler); @@ -1131,6 +1148,9 @@ interface PHPhotoLibrary_CloudIdentifiers { [Mac (10,12)] [BaseType (typeof(NSObject))] interface PHLivePhoto : NSSecureCoding, NSCopying +#if IOS + , NSItemProviderReading +#endif { [Export ("size")] CGSize Size { get; } diff --git a/src/photosui.cs b/src/photosui.cs index e3e0f3660c02..af9f8ba54e9b 100644 --- a/src/photosui.cs +++ b/src/photosui.cs @@ -14,6 +14,7 @@ // ease compilation for [NoMac] decorated members using UIGestureRecognizer = Foundation.NSObject; using PHLivePhotoBadgeOptions = Foundation.NSObject; +using UIViewController = Foundation.NSObject; #endif using MapKit; using Photos; @@ -480,4 +481,99 @@ interface PHProjectTypeDescriptionInvalidator interface PHEditingExtensionContext { } -} \ No newline at end of file + + interface IPHPickerViewControllerDelegate {} + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof(NSObject))] + interface PHPickerViewControllerDelegate + { + [Abstract] + [Export ("picker:didFinishPicking:")] + void DidFinishPicking (PHPickerViewController picker, PHPickerResult[] results); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (UIViewController))] + [Advice ("This type should not be subclassed.")] + [DisableDefaultCtor] + interface PHPickerViewController + { + [Export ("configuration", ArgumentSemantic.Copy)] + PHPickerConfiguration Configuration { get; } + + [Wrap ("WeakDelegate")] + IPHPickerViewControllerDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [Export ("initWithConfiguration:")] + [DesignatedInitializer] + IntPtr Constructor (PHPickerConfiguration configuration); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [Advice ("This type should not be subclassed.")] + interface PHPickerConfiguration : NSCopying + { + [Export ("preferredAssetRepresentationMode", ArgumentSemantic.Assign)] + PHPickerConfigurationAssetRepresentationMode PreferredAssetRepresentationMode { get; set; } + + [Export ("selectionLimit")] + nint SelectionLimit { get; set; } + + [NullAllowed, Export ("filter", ArgumentSemantic.Copy)] + PHPickerFilter Filter { get; set; } + + [Export ("initWithPhotoLibrary:")] + IntPtr Constructor (PHPhotoLibrary photoLibrary); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [Advice ("This type should not be subclassed.")] + [DisableDefaultCtor] + interface PHPickerFilter : NSCopying + { + [Static] + [Export ("imagesFilter")] + PHPickerFilter ImagesFilter { get; } + + [Static] + [Export ("videosFilter")] + PHPickerFilter VideosFilter { get; } + + [Static] + [Export ("livePhotosFilter")] + PHPickerFilter LivePhotosFilter { get; } + + [Static] + [Export ("anyFilterMatchingSubfilters:")] + PHPickerFilter GetAnyFilterMatchingSubfilters (PHPickerFilter[] subfilters); + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [BaseType (typeof (NSObject))] + [Advice ("This type should not be subclassed.")] + [DisableDefaultCtor] + interface PHPickerResult + { + [Export ("itemProvider")] + NSItemProvider ItemProvider { get; } + + [NullAllowed, Export ("assetIdentifier")] + string AssetIdentifier { get; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Category] + [BaseType (typeof (PHPhotoLibrary))] + interface PHPhotoLibrary_PhotosUISupport + { + [Export ("presentLimitedLibraryPickerFromViewController:")] + void PresentLimitedLibraryPicker (UIViewController controller); + } +} diff --git a/src/pushkit.cs b/src/pushkit.cs index fbe10e8867e5..25f5bc11bda8 100644 --- a/src/pushkit.cs +++ b/src/pushkit.cs @@ -62,8 +62,8 @@ interface PKPushRegistry { [iOS (8,0)] [Static] interface PKPushType { - - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] + + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoMac] [Field ("PKPushTypeVoIP")] @@ -71,7 +71,7 @@ interface PKPushType { [iOS (9,0)] [Deprecated (PlatformName.iOS, 13,0, message: "Use directly from watchOS instead.")] - [Unavailable (PlatformName.UIKitForMac)][Advice ("This API is not available when using UIKit on macOS.")] + [Deprecated (PlatformName.MacCatalyst, 13,0, message: "Use directly from watchOS instead.")] [Watch (6,0)] [NoMac] [Field ("PKPushTypeComplication")] @@ -101,6 +101,7 @@ interface PKPushRegistryDelegate { [NoMac] [Abstract] // now optional in iOS 11 [Deprecated (PlatformName.iOS, 11,0, message: "Use the 'DidReceiveIncomingPushWithPayload' overload accepting an 'Action' argument instead.")] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] [Export ("pushRegistry:didReceiveIncomingPushWithPayload:forType:"), EventArgs ("PKPushRegistryRecieved"), EventName ("IncomingPushReceived")] void DidReceiveIncomingPush (PKPushRegistry registry, PKPushPayload payload, string type); diff --git a/src/quicklookthumbnailing.cs b/src/quicklookthumbnailing.cs index fc9db12035e3..313768a2dd7d 100644 --- a/src/quicklookthumbnailing.cs +++ b/src/quicklookthumbnailing.cs @@ -5,6 +5,7 @@ using CoreGraphics; using Foundation; using ObjCRuntime; +using UniformTypeIdentifiers; #if MONOMAC using AppKit; @@ -94,6 +95,10 @@ interface QLThumbnailGenerationRequest : NSCopying, NSSecureCoding { [Export ("representationTypes")] QLThumbnailGenerationRequestRepresentationTypes RepresentationTypes { get; } + + [Mac (11,0)][iOS (14,0)] + [NullAllowed, Export ("contentType", ArgumentSemantic.Copy)] + UTType ContentType { get; set; } } [Mac (10,15), iOS (13,0)] diff --git a/src/replaykit.cs b/src/replaykit.cs index e018b1e1f1ba..efa70ff18499 100644 --- a/src/replaykit.cs +++ b/src/replaykit.cs @@ -12,13 +12,22 @@ using CoreMedia; using ObjCRuntime; using Foundation; -using UIKit; using CoreGraphics; +#if MONOMAC +using AppKit; +using UIImage = AppKit.NSImage; +using UIViewController = AppKit.NSViewController; +using UIView = AppKit.NSView; +#else +using UIKit; +using NSWindow = Foundation.NSObject; +#endif namespace ReplayKit { [iOS (9,0)] [TV (10,0)] + [Mac (11,0)] [BaseType (typeof (UIViewController))] interface RPPreviewViewController { [Export ("initWithNibName:bundle:")] @@ -29,6 +38,7 @@ interface RPPreviewViewController { IRPPreviewViewControllerDelegate PreviewControllerDelegate { get; set; } [TV (10, 0), NoiOS] + [NoMac] [Export ("mode", ArgumentSemantic.Assign)] RPPreviewViewControllerMode Mode { get; set; } } @@ -37,6 +47,7 @@ interface IRPPreviewViewControllerDelegate { } [iOS (9,0)] [TV (10,0)] + [Mac (11,0)] [Protocol, Model] [BaseType (typeof (NSObject))] interface RPPreviewViewControllerDelegate { @@ -51,9 +62,10 @@ interface RPPreviewViewControllerDelegate { [iOS (9,0)] [TV (10,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] -#if XAMCORE_4_0 +#if XAMCORE_4_0 || MONOMAC [Sealed] #endif interface RPScreenRecorder { @@ -62,6 +74,7 @@ interface RPScreenRecorder { [Export ("sharedRecorder")] RPScreenRecorder SharedRecorder { get; } + [NoMac] [Availability (Deprecated = Platform.iOS_10_0, Message = "Use 'StartRecording (Action)' instead.")] [Async] [Export ("startRecordingWithMicrophoneEnabled:handler:")] @@ -117,18 +130,26 @@ bool MicrophoneEnabled { [Async] [Export ("stopCaptureWithHandler:")] void StopCapture ([NullAllowed] Action handler); + + [Introduced (PlatformName.MacCatalyst, 14,0)] + [TV (14,0), iOS (14,0)] + [Async] + [Export ("stopRecordingWithOutputURL:completionHandler:")] + void StopRecording (NSUrl url, [NullAllowed] Action completionHandler); } interface IRPScreenRecorderDelegate { } [iOS (9,0)] [TV (10,0)] + [Mac (11,0)] [Protocol, Model] [BaseType (typeof (NSObject))] interface RPScreenRecorderDelegate { [Deprecated (PlatformName.TvOS, 10,0, message: "Use 'DidStopRecording(RPScreenRecorder,RPPreviewViewController,NSError)' instead.")] [Deprecated (PlatformName.iOS, 10,0, message: "Use 'DidStopRecording(RPScreenRecorder,RPPreviewViewController,NSError)' instead.")] + [NoMac] [Export ("screenRecorder:didStopRecordingWithError:previewViewController:")] void DidStopRecording (RPScreenRecorder screenRecorder, NSError error, [NullAllowed] RPPreviewViewController previewViewController); @@ -142,6 +163,7 @@ interface RPScreenRecorderDelegate { [iOS (10,0)] [TV (10,0)] + [NoMac] [BaseType (typeof (UIViewController))] interface RPBroadcastActivityViewController { // inlined @@ -169,6 +191,7 @@ interface IRPBroadcastActivityViewControllerDelegate {} [iOS (10,0)] [TV (10,0)] + [NoMac] [Protocol, Model] [BaseType (typeof (NSObject))] interface RPBroadcastActivityViewControllerDelegate { @@ -179,6 +202,7 @@ interface RPBroadcastActivityViewControllerDelegate { [iOS (10,0)] [TV (10,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] interface RPBroadcastController { [Export ("broadcasting")] @@ -198,7 +222,9 @@ interface RPBroadcastController { [Deprecated (PlatformName.TvOS, 11,0)] [Deprecated (PlatformName.iOS, 11,0)] + [NoMac] [Export ("broadcastExtensionBundleID")] + [NullAllowed] string BroadcastExtensionBundleID { get; } [Async] @@ -238,6 +264,7 @@ interface RPBroadcastControllerDelegate { [TV (10,0)] [Deprecated (PlatformName.TvOS, 11,0)] [Deprecated (PlatformName.iOS, 11,0)] + [NoMac] [BaseType (typeof (NSObject))] interface RPBroadcastConfiguration : NSCoding, NSSecureCoding { [Export ("clipDuration")] @@ -251,6 +278,7 @@ interface RPBroadcastConfiguration : NSCoding, NSSecureCoding { [iOS (10,0)] [TV (10,0)] + [Mac (11,0)] [Category] [BaseType (typeof (NSExtensionContext))] interface NSExtensionContext_RPBroadcastExtension { @@ -259,6 +287,7 @@ interface NSExtensionContext_RPBroadcastExtension { [Deprecated (PlatformName.TvOS, 11,0, message: "Use 'CompleteRequest(NSUrl,NSDictionary)' instead.")] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'CompleteRequest(NSUrl,NSDictionary)' instead.")] + [NoMac] [Export ("completeRequestWithBroadcastURL:broadcastConfiguration:setupInfo:")] void CompleteRequest (NSUrl broadcastURL, RPBroadcastConfiguration broadcastConfiguration, [NullAllowed] NSDictionary setupInfo); @@ -269,6 +298,7 @@ interface NSExtensionContext_RPBroadcastExtension { [iOS (10,0)] [TV (10,0)] + [Mac (11,0)] [BaseType (typeof (NSObject))] interface RPBroadcastHandler : NSExtensionRequestHandling { [Export ("updateServiceInfo:")] @@ -283,6 +313,7 @@ interface RPBroadcastHandler : NSExtensionRequestHandling { [iOS (10,0)] [TV (10,0)] + [NoMac] [Deprecated (PlatformName.TvOS, 11,0, message: "Use 'RPBroadcastSampleHandler' instead.")] [Deprecated (PlatformName.iOS, 11,0, message: "Use 'RPBroadcastSampleHandler' instead.")] [BaseType (typeof (RPBroadcastHandler))] @@ -296,6 +327,7 @@ interface RPBroadcastMP4ClipHandler { [iOS (10,0)] [TV (10,0)] + [Mac (11,0)] [BaseType (typeof (RPBroadcastHandler))] interface RPBroadcastSampleHandler { @@ -332,6 +364,7 @@ interface RPBroadcastSampleHandler { } [NoTV, iOS (12,0)] + [NoMac] [BaseType (typeof (UIView))] interface RPSystemBroadcastPickerView : NSCoding { @@ -344,4 +377,36 @@ interface RPSystemBroadcastPickerView : NSCoding { [Export ("showsMicrophoneButton")] bool ShowsMicrophoneButton { get; set; } } + + [Mac (11,0)] + [NoiOS] + [NoTV] + [BaseType (typeof (NSObject))] + interface RPBroadcastActivityController { + + [Static] + [Export ("showBroadcastPickerAtPoint:fromWindow:preferredExtensionIdentifier:completionHandler:")] + void ShowBroadcastPicker (CGPoint point, [NullAllowed] NSWindow window, [NullAllowed] string preferredExtension, Action handler); + + [Wrap ("WeakDelegate")] + [NullAllowed] + IRPBroadcastActivityControllerDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + } + + interface IRPBroadcastActivityControllerDelegate {} + + [Mac (11,0)] + [NoiOS] + [NoTV] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface RPBroadcastActivityControllerDelegate { + + [Abstract] + [Export ("broadcastActivityController:didFinishWithBroadcastController:error:")] + void DidFinish (RPBroadcastActivityController broadcastActivityController, [NullAllowed] RPBroadcastController broadcastController, [NullAllowed] NSError error); + } } diff --git a/src/safariservices.cs b/src/safariservices.cs index 61e7b18f210b..e0fc186a6f21 100644 --- a/src/safariservices.cs +++ b/src/safariservices.cs @@ -139,6 +139,10 @@ partial interface SFSafariViewControllerDelegate { [iOS (11,0)] [Export ("safariViewController:initialLoadDidRedirectToURL:")] void InitialLoadDidRedirectToUrl (SFSafariViewController controller, NSUrl url); + + [iOS (14,0)] + [Export ("safariViewControllerWillOpenInBrowser:")] + void WillOpenInBrowser (SFSafariViewController controller); } [iOS (11,0)] diff --git a/src/scenekit.cs b/src/scenekit.cs index d8839ec5f02f..24a444b8ab36 100644 --- a/src/scenekit.cs +++ b/src/scenekit.cs @@ -1064,6 +1064,12 @@ interface SCNGeometryElement : NSSecureCoding { [Static] [Export ("geometryElementWithMDLSubmesh:")] SCNGeometryElement FromSubmesh (MDLSubmesh submesh); + + [NoWatch] // marked as 7,0 but there's no Metal support on the platform + [TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("geometryElementWithBuffer:primitiveType:primitiveCount:bytesPerIndex:")] + SCNGeometryElement FromBuffer (IMTLBuffer buffer, SCNGeometryPrimitiveType primitiveType, nint primitiveCount, nint bytesPerIndex); } #if !WATCH @@ -3184,6 +3190,14 @@ interface SCNSceneRenderer { [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] [Export ("usesReverseZ")] bool UsesReverseZ { get; set; } + + [NoWatch] + [TV (14,0)][Mac (10,11)][iOS (14,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("currentRenderPassDescriptor")] + MTLRenderPassDescriptor CurrentRenderPassDescriptor { get; } } [Watch (3,0)] diff --git a/src/screentime.cs b/src/screentime.cs new file mode 100644 index 000000000000..1c79c2727f86 --- /dev/null +++ b/src/screentime.cs @@ -0,0 +1,87 @@ +using System; +using ObjCRuntime; +using Foundation; +using CoreFoundation; + +#if !MONOMAC +using UIKit; +#else +using AppKit; +using UIViewController = AppKit.NSViewController; +#endif + +namespace ScreenTime { + + [Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface STScreenTimeConfiguration : NSSecureCoding { + [Export ("enforcesChildRestrictions")] + bool EnforcesChildRestrictions { get; } + } + + [Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface STScreenTimeConfigurationObserver { + [Export ("initWithUpdateQueue:")] + [DesignatedInitializer] + IntPtr Constructor (DispatchQueue updateQueue); + + [Export ("startObserving")] + void StartObserving (); + + [Export ("stopObserving")] + void StopObserving (); + + [NullAllowed, Export ("configuration", ArgumentSemantic.Strong)] + STScreenTimeConfiguration Configuration { get; } + } + + [Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface STWebHistory { + + [Export ("initWithBundleIdentifier:error:")] + IntPtr Constructor (string bundleIdentifier, [NullAllowed] out NSError error); + + [Export ("deleteHistoryForURL:")] + void DeleteHistory (NSUrl url); + + [Export ("deleteHistoryDuringInterval:")] + void DeleteHistory (NSDateInterval interval); + + [Export ("deleteAllHistory")] + void DeleteAllHistory (); + } + + [Mac (11, 0), iOS (14, 0)] + [BaseType (typeof (UIViewController))] + [DisableDefaultCtor] + interface STWebpageController + { + [DesignatedInitializer] + [Export ("initWithNibName:bundle:")] + IntPtr Constructor ([NullAllowed] string nibNameOrNull, [NullAllowed] NSBundle nibBundleOrNull); + + [Export ("suppressUsageRecording")] + bool SuppressUsageRecording { get; set; } + + [NullAllowed, Export ("URL", ArgumentSemantic.Copy)] + NSUrl Url { get; set; } + + [Export ("URLIsPlayingVideo")] + bool UrlIsPlayingVideo { get; set; } + + [Export ("URLIsPictureInPicture")] + bool UrlIsPictureInPicture { get; set; } + + [Export ("URLIsBlocked")] + bool UrlIsBlocked { get; } + + [Export ("setBundleIdentifier:error:")] + bool SetBundleIdentifier (string bundleIdentifier, [NullAllowed] out NSError error); + } + +} diff --git a/src/security.cs b/src/security.cs index ce5d449ebba1..04f2fcfc1887 100644 --- a/src/security.cs +++ b/src/security.cs @@ -90,7 +90,9 @@ interface SecPolicyPropertyKey { } [Static] - [iOS (8,0), NoMac, NoWatch] + [iOS (8,0), NoWatch] + [Mac (11,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] [NoTV] // removed in tvOS 10 interface SecSharedCredential { [Field ("kSecSharedPassword")] @@ -1098,8 +1100,9 @@ interface SecKeyKeyExchangeParameter { NSData SharedInfo { get; set; } } -#if IOS - [iOS (8,0)][NoTV][NoWatch][NoMac] +#if IOS || MONOMAC + [iOS (8,0)][NoTV][NoWatch] + [Mac (11,0)] [Internal][Static] interface SecSharedCredentialKeys { [Field ("kSecAttrServer")] @@ -1115,7 +1118,8 @@ interface SecSharedCredentialKeys { NSString PortKey { get; } } - [iOS (8,0)][NoTV][NoWatch][NoMac] + [iOS (8,0)][NoTV][NoWatch] + [Mac (11,0)] [StrongDictionary ("SecSharedCredentialKeys")] interface SecSharedCredentialInfo { diff --git a/src/sensorkit.cs b/src/sensorkit.cs new file mode 100644 index 000000000000..7f4415145e0c --- /dev/null +++ b/src/sensorkit.cs @@ -0,0 +1,796 @@ +using System; +using System.Runtime.InteropServices; + +using Foundation; +using ObjCRuntime; + +namespace SensorKit { + + // helpers for code generation + interface NSUnitDuration : NSUnit { } + interface NSUnitIlluminance : NSUnit { } + interface NSUnitLength : NSUnit { } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Native] + enum SRAmbientLightSensorPlacement : long { + Unknown, + FrontTop, + FrontBottom, + FrontRight, + FrontLeft, + FrontTopRight, + FrontTopLeft, + FrontBottomRight, + FrontBottomLeft, + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Native] + public enum SRAuthorizationStatus : long { + NotDetermined = 0, + Authorized, + Denied, + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Native] + enum SRCrownOrientation : long + { + Left, + Right, + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Native] + enum SRDeletionReason : long + { + UserInitiated, + LowDiskSpace, + AgeLimit, + NoInterestedClients, + SystemInitiated, + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Native] + [ErrorDomain ("SRErrorDomain")] + enum SRErrorCode : long + { + InvalidEntitlement, + NoAuthorization, + DataInaccessible, + FetchRequestInvalid, + PromptDeclined, + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Native] + enum SRLocationCategory : long + { + Unknown, + Home, + Work, + School, + Gym, + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Native] + enum SRNotificationEvent : long + { + Unknown, + Received, + DefaultAction, + SupplementaryAction, + Clear, + NotificationCenterClearAll, + Removed, + Hide, + LongLook, + Silence, + AppLaunch, + Expired, + BannerPulldown, + TapCoalesce, + Deduped, + DeviceActivated, + DeviceUnlocked, + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Native] + enum SRWristLocation : long + { + Left, + Right, + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + enum SRDeviceUsageCategory { + [Field ("SRDeviceUsageCategoryGames")] + Games, + + [Field ("SRDeviceUsageCategoryBusiness")] + Business, + + [Field ("SRDeviceUsageCategoryWeather")] + Weather, + + [Field ("SRDeviceUsageCategoryUtilities")] + Utilities, + + [Field ("SRDeviceUsageCategoryTravel")] + Travel, + + [Field ("SRDeviceUsageCategorySports")] + Sports, + + [Field ("SRDeviceUsageCategorySocialNetworking")] + SocialNetworking, + + [Field ("SRDeviceUsageCategoryReference")] + Reference, + + [Field ("SRDeviceUsageCategoryProductivity")] + Productivity, + + [Field ("SRDeviceUsageCategoryPhotoAndVideo")] + PhotoAndVideo, + + [Field ("SRDeviceUsageCategoryNews")] + News, + + [Field ("SRDeviceUsageCategoryNavigation")] + Navigation, + + [Field ("SRDeviceUsageCategoryMusic")] + Music, + + [Field ("SRDeviceUsageCategoryLifestyle")] + Lifestyle, + + [Field ("SRDeviceUsageCategoryHealthAndFitness")] + HealthAndFitness, + + [Field ("SRDeviceUsageCategoryFinance")] + Finance, + + [Field ("SRDeviceUsageCategoryEntertainment")] + Entertainment, + + [Field ("SRDeviceUsageCategoryEducation")] + Education, + + [Field ("SRDeviceUsageCategoryBooks")] + Books, + + [Field ("SRDeviceUsageCategoryMedical")] + Medical, + + [Field ("SRDeviceUsageCategoryNewsstand")] + Newsstand, + + [Field ("SRDeviceUsageCategoryCatalogs")] + Catalogs, + + [Field ("SRDeviceUsageCategoryKids")] + Kids, + + [Field ("SRDeviceUsageCategoryMiscellaneous")] + Miscellaneous, + + [Field ("SRDeviceUsageCategoryFoodAndDrink")] + FoodAndDrink, + + [Field ("SRDeviceUsageCategoryDeveloperTools")] + DeveloperTools, + + [Field ("SRDeviceUsageCategoryGraphicsAndDesign")] + GraphicsAndDesign, + + [Field ("SRDeviceUsageCategoryShopping")] + Shopping, + + [Field ("SRDeviceUsageCategoryStickers")] + Stickers, + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRAmbientLightSample { + + [Export ("placement")] + SRAmbientLightSensorPlacement Placement { get; } + + [Export ("chromaticity")] + SRAmbientLightChromaticity Chromaticity { get; } + + [Export ("lux", ArgumentSemantic.Copy)] + NSMeasurement Lux { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRApplicationUsage { + + [NullAllowed, Export ("bundleIdentifier")] + string BundleIdentifier { get; } + + [Export ("usageTime")] + double /* NSTimeInterval */ UsageTime { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRDeletionRecord : NSSecureCoding { + + [Export ("startTime")] + double /* SRAbsoluteTime */ StartTime { get; } + + [Export ("endTime")] + double /* SRAbsoluteTime */ EndTime { get; } + + [Export ("reason")] + SRDeletionReason Reason { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRDevice : NSSecureCoding, NSCopying { + [Static] + [Export ("currentDevice")] + SRDevice CurrentDevice { get; } + + [Export ("name")] + string Name { get; } + + [Export ("model")] + string Model { get; } + + [Export ("systemName")] + string SystemName { get; } + + [Export ("systemVersion")] + string SystemVersion { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRDeviceUsageReport { + + [Export ("duration")] + double /* NSTimeInterval */ Duration { get; } + + [Export ("applicationUsageByCategory", ArgumentSemantic.Copy)] + NSDictionary> ApplicationUsageByCategory { get; } + + [Export ("notificationUsageByCategory", ArgumentSemantic.Copy)] + NSDictionary> NotificationUsageByCategory { get; } + + [Export ("webUsageByCategory", ArgumentSemantic.Copy)] + NSDictionary> WebUsageByCategory { get; } + + [Export ("totalScreenWakes")] + nint TotalScreenWakes { get; } + + [Export ("totalUnlocks")] + nint TotalUnlocks { get; } + + [Export ("totalUnlockDuration")] + double /* NSTimeInterval */ TotalUnlockDuration { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + interface SRFetchRequest { + + [Export ("from")] + double /* SRAbsoluteTime */ From { get; set; } + + [Export ("to")] + double /* SRAbsoluteTime */ To { get; set; } + + [Export ("device", ArgumentSemantic.Strong)] + SRDevice Device { get; set; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRFetchResult : NSCopying where SampleType : NSObject { + + [Export ("sample", ArgumentSemantic.Copy)] + SampleType Sample { get; } + + [Export ("timestamp")] + double /* SRAbsoluteTime */ Timestamp { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRKeyboardProbabilityMetric where UnitType : NSUnit { + [Export ("distributionSampleValues", ArgumentSemantic.Copy)] + NSMeasurement[] DistributionSampleValues { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRKeyboardMetrics { + + [Export ("duration")] + double /* NSTimeInterval */ Duration { get; } + + [Export ("keyboardIdentifier")] + string KeyboardIdentifier { get; } + + [Export ("version")] + string Version { get; } + + [Export ("width")] + NSMeasurement Width { get; } + + [Export ("height")] + NSMeasurement Height { get; } + + // SRKeyboardMetrics_ScalarMetrics + + [Export ("totalWords")] + nint TotalWords { get; } + + [Export ("totalAlteredWords")] + nint TotalAlteredWords { get; } + + [Export ("totalTaps")] + nint TotalTaps { get; } + + [Export ("totalDrags")] + nint TotalDrags { get; } + + [Export ("totalDeletes")] + nint TotalDeletes { get; } + + [Export ("totalEmojis")] + nint TotalEmojis { get; } + + [Export ("totalPaths")] + nint TotalPaths { get; } + + [Export ("totalPathTime")] + double TotalPathTime { get; } + + [Export ("totalPathLength")] + NSMeasurement TotalPathLength { get; } + + [Export ("totalAutoCorrections")] + nint TotalAutoCorrections { get; } + + [Export ("totalSpaceCorrections")] + nint TotalSpaceCorrections { get; } + + [Export ("totalRetroCorrections")] + nint TotalRetroCorrections { get; } + + [Export ("totalTranspositionCorrections")] + nint TotalTranspositionCorrections { get; } + + [Export ("totalInsertKeyCorrections")] + nint TotalInsertKeyCorrections { get; } + + [Export ("totalSkipTouchCorrections")] + nint TotalSkipTouchCorrections { get; } + + [Export ("totalNearKeyCorrections")] + nint TotalNearKeyCorrections { get; } + + [Export ("totalSubstitutionCorrections")] + nint TotalSubstitutionCorrections { get; } + + [Export ("totalHitTestCorrections")] + nint TotalHitTestCorrections { get; } + + [Export ("totalTypingDuration")] + double TotalTypingDuration { get; } + + // SRKeyboardMetrics_ProbabilityMetrics + + [Export ("upErrorDistance", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric UpErrorDistance { get; } + + [Export ("downErrorDistance", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric DownErrorDistance { get; } + + [Export ("spaceUpErrorDistance", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric SpaceUpErrorDistance { get; } + + [Export ("spaceDownErrorDistance", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric SpaceDownErrorDistance { get; } + + [Export ("deleteUpErrorDistance", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric DeleteUpErrorDistance { get; } + + [Export ("deleteDownErrorDistance", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric DeleteDownErrorDistance { get; } + + [Export ("shortWordCharKeyUpErrorDistance", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric ShortWordCharKeyUpErrorDistance { get; } + + [Export ("shortWordCharKeyDownErrorDistance", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric ShortWordCharKeyDownErrorDistance { get; } + + [Export ("touchDownUp", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric TouchDownUp { get; } + + [Export ("spaceTouchDownUp", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric SpaceTouchDownUp { get; } + + [Export ("deleteTouchDownUp", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric DeleteTouchDownUp { get; } + + [Export ("shortWordCharKeyTouchDownUp", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric ShortWordCharKeyTouchDownUp { get; } + + [Export ("touchDownDown", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric TouchDownDown { get; } + + [Export ("charKeyToPrediction", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric CharKeyToPrediction { get; } + + [Export ("shortWordCharKeyToCharKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric ShortWordCharKeyToCharKey { get; } + + [Export ("charKeyToAnyTapKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric CharKeyToAnyTapKey { get; } + + [Export ("anyTapToCharKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric AnyTapToCharKey { get; } + + [Export ("spaceToCharKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric SpaceToCharKey { get; } + + [Export ("charKeyToSpaceKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric CharKeyToSpaceKey { get; } + + [Export ("spaceToDeleteKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric SpaceToDeleteKey { get; } + + [Export ("deleteToSpaceKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric DeleteToSpaceKey { get; } + + [Export ("spaceToSpaceKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric SpaceToSpaceKey { get; } + + [Export ("spaceToShiftKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric SpaceToShiftKey { get; } + + [Export ("spaceToPlaneChangeKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric SpaceToPlaneChangeKey { get; } + + [Export ("spaceToPredictionKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric SpaceToPredictionKey { get; } + + [Export ("deleteToCharKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric DeleteToCharKey { get; } + + [Export ("charKeyToDelete", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric CharKeyToDelete { get; } + + [Export ("deleteToDelete", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric DeleteToDelete { get; } + + [Export ("deleteToShiftKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric DeleteToShiftKey { get; } + + [Export ("deleteToPlaneChangeKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric DeleteToPlaneChangeKey { get; } + + [Export ("anyTapToPlaneChangeKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric AnyTapToPlaneChangeKey { get; } + + [Export ("planeChangeToAnyTap", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric PlaneChangeToAnyTap { get; } + + [Export ("charKeyToPlaneChangeKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric CharKeyToPlaneChangeKey { get; } + + [Export ("planeChangeKeyToCharKey", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric PlaneChangeKeyToCharKey { get; } + + [Export ("pathErrorDistanceRatio", ArgumentSemantic.Strong)] + NSNumber[] PathErrorDistanceRatio { get; } + + [Export ("deleteToPath", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric DeleteToPath { get; } + + [Export ("pathToDelete", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric PathToDelete { get; } + + [Export ("spaceToPath", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric SpaceToPath { get; } + + [Export ("pathToSpace", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric PathToSpace { get; } + + [Export ("pathToPath", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric PathToPath { get; } + + // SRKeyboardMetrics_PositionalMetrics + + [Export ("longWordUpErrorDistance", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric[] LongWordUpErrorDistance { get; } + + [Export ("longWordDownErrorDistance", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric[] LongWordDownErrorDistance { get; } + + [Export ("longWordTouchDownUp", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric[] LongWordTouchDownUp { get; } + + [Export ("longWordTouchDownDown", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric[] LongWordTouchDownDown { get; } + + [Export ("deleteToDeletes", ArgumentSemantic.Strong)] + SRKeyboardProbabilityMetric[] DeleteToDeletes { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRMessagesUsageReport { + + [Export ("duration")] + double /* NSTimeInterval */ Duration { get; } + + [Export ("totalOutgoingMessages")] + nint TotalOutgoingMessages { get; } + + [Export ("totalIncomingMessages")] + nint TotalIncomingMessages { get; } + + [Export ("totalUniqueContacts")] + nint TotalUniqueContacts { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRNotificationUsage { + + [NullAllowed, Export ("bundleIdentifier")] + string BundleIdentifier { get; } + + [Export ("event")] + SRNotificationEvent Event { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRPhoneUsageReport { + + [Export ("duration")] + double /* NSTimeInterval */ Duration { get; } + + [Export ("totalOutgoingCalls")] + nint TotalOutgoingCalls { get; } + + [Export ("totalIncomingCalls")] + nint TotalIncomingCalls { get; } + + [Export ("totalUniqueContacts")] + nint TotalUniqueContacts { get; } + + [Export ("totalPhoneCallDuration")] + double /* NSTimeInterval */ TotalPhoneCallDuration { get; } + } + + interface ISRSensorReaderDelegate {} + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface SRSensorReaderDelegate { + + [Export ("sensorReader:fetchingRequest:didFetchResult:")] + bool DidFetchResult (SRSensorReader reader, SRFetchRequest fetchRequest, SRFetchResult result); + + [Export ("sensorReader:didCompleteFetch:")] + void DidCompleteFetch (SRSensorReader reader, SRFetchRequest fetchRequest); + + [Export ("sensorReader:fetchingRequest:failedWithError:")] + void FetchingRequestFailed (SRSensorReader reader, SRFetchRequest fetchRequest, NSError error); + + [Export ("sensorReader:didChangeAuthorizationStatus:")] + void DidChangeAuthorizationStatus (SRSensorReader reader, SRAuthorizationStatus authorizationStatus); + + [Export ("sensorReaderWillStartRecording:")] + void WillStartRecording (SRSensorReader reader); + + [Export ("sensorReader:startRecordingFailedWithError:")] + void StartRecordingFailed (SRSensorReader reader, NSError error); + + [Export ("sensorReaderDidStopRecording:")] + void DidStopRecording (SRSensorReader reader); + + [Export ("sensorReader:stopRecordingFailedWithError:")] + void StopRecordingFailed (SRSensorReader reader, NSError error); + + [Export ("sensorReader:didFetchDevices:")] + void DidFetchDevices (SRSensorReader reader, SRDevice[] devices); + + [Export ("sensorReader:fetchDevicesDidFailWithError:")] + void FetchDevicesFailed (SRSensorReader reader, NSError error); + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + enum SRSensor { + [Field (null)] + Invalid = -1, + + [Field ("SRSensorAmbientLightSensor")] + AmbientLightSensor, + + [Field ("SRSensorAccelerometer")] + Accelerometer, + + [Field ("SRSensorRotationRate")] + RotationRate, + + [Field ("SRSensorVisits")] + Visits, + + [Field ("SRSensorPedometerData")] + PedometerData, + + [Field ("SRSensorDeviceUsageReport")] + DeviceUsageReport, + + [Field ("SRSensorMessagesUsageReport")] + MessagesUsageReport, + + [Field ("SRSensorPhoneUsageReport")] + PhoneUsageReport, + + [Field ("SRSensorOnWristState")] + OnWristState, + + [Field ("SRSensorKeyboardMetrics")] + KeyboardMetrics, + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRSensorReader { + + [Export ("initWithSensor:")] + IntPtr Constructor (NSString sensor); + + [Wrap ("this (sensor.GetConstant ()!)")] + IntPtr Constructor (SRSensor sensor); + + [Export ("startRecording")] + void StartRecording (); + + [Export ("stopRecording")] + void StopRecording (); + + [Export ("fetchDevices")] + void FetchDevices (); + + [Export ("fetch:")] + void Fetch (SRFetchRequest request); + + [Export ("authorizationStatus")] + SRAuthorizationStatus AuthorizationStatus { get; } + + [Export ("sensor")] + NSString WeakSensor { get; } + + SRSensor Sensor { + [Wrap ("SRSensorExtensions.GetValue (WeakSensor)")] + get; + } + + [Wrap ("WeakDelegate")] + [NullAllowed] + ISRSensorReaderDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [Async] + [Static] + [Export ("requestAuthorizationForSensors:completion:")] + void RequestAuthorization (NSSet sensors, Action completion); + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRVisit { + + [Export ("distanceFromHome")] + double /* CLLocationDistance */DistanceFromHome { get; } + + [Export ("arrivalDateInterval", ArgumentSemantic.Strong)] + NSDateInterval ArrivalDateInterval { get; } + + [Export ("departureDateInterval", ArgumentSemantic.Strong)] + NSDateInterval DepartureDateInterval { get; } + + [Export ("locationCategory")] + SRLocationCategory LocationCategory { get; } + + [Export ("identifier", ArgumentSemantic.Strong)] + NSUuid Identifier { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRWebUsage { + + [Export ("totalUsageTime")] + double /* NSTimeInterval */ TotalUsageTime { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SRWristDetection { + + [Export ("onWrist")] + bool OnWrist { get; } + + [Export ("wristLocation")] + SRWristLocation WristLocation { get; } + + [Export ("crownOrientation")] + SRCrownOrientation CrownOrientation { get; } + } + + [NoWatch, NoTV, NoMac] + [iOS (14,0)] + [Category] + [BaseType (typeof (NSString))] + [Internal] // exposed thru SRSensor + interface NSString_SRDeletionRecord { + [return: NullAllowed] + [Export ("sr_sensorForDeletionRecordsFromSensor")] + NSString _GetSensorForDeletionRecordsFromSensor (); + } +} diff --git a/src/spritekit.cs b/src/spritekit.cs index bfb1f1204269..8aa75a7deb78 100644 --- a/src/spritekit.cs +++ b/src/spritekit.cs @@ -1523,6 +1523,10 @@ partial interface SKView { [TV (10,0)] [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] ISKViewDelegate Delegate { get; set; } + + [iOS (14,0)][TV (14,0)][Mac (10,16)] + [Export ("disableDepthStencilBuffer")] + bool DisableDepthStencilBuffer { get; set; } } interface ISKViewDelegate {} diff --git a/src/storekit.cs b/src/storekit.cs index 2366129f7e95..e1488bcbe8c4 100644 --- a/src/storekit.cs +++ b/src/storekit.cs @@ -12,8 +12,13 @@ using ObjCRuntime; using Foundation; using CoreFoundation; +using CoreGraphics; using StoreKit; -#if !MONOMAC +#if MONOMAC +using AppKit; +using UIViewController = AppKit.NSViewController; +using UIWindowScene = Foundation.NSObject; +#else using UIKit; #endif #if WATCH @@ -245,6 +250,14 @@ interface SKPaymentQueue { [NoWatch, NoTV, NoMac, iOS (13,4)] [Export ("showPriceConsentIfNeeded")] void ShowPriceConsentIfNeeded (); + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Export ("presentCodeRedemptionSheet")] + void PresentCodeRedemptionSheet (); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("transactionObservers")] + ISKPaymentTransactionObserver[] TransactionObservers { get; } } [Watch (6, 2)] @@ -327,8 +340,14 @@ bool Downloadable { [Mac (10,14,4)] [Export ("discounts")] SKProductDiscount [] Discounts { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("isFamilyShareable")] + bool IsFamilyShareable { get; } } + interface ISKPaymentTransactionObserver {} + [Watch (6, 2)] [BaseType (typeof (NSObject))] [Model] @@ -350,7 +369,7 @@ interface SKPaymentTransactionObserver { [Export ("paymentQueue:updatedDownloads:")] void UpdatedDownloads (SKPaymentQueue queue, SKDownload [] downloads); - [iOS (11,0)][TV (11,0)][NoMac][NoWatch] + [iOS (11,0)][TV (11,0)][Mac (11,0)][NoWatch] [Export ("paymentQueue:shouldAddStorePayment:forProduct:")] bool ShouldAddStorePayment (SKPaymentQueue queue, SKPayment payment, SKProduct product); @@ -359,6 +378,10 @@ interface SKPaymentTransactionObserver { [TV (13,0)] [Export ("paymentQueueDidChangeStorefront:")] void DidChangeStorefront (SKPaymentQueue queue); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("paymentQueue:didRevokeEntitlementsForProductIdentifiers:")] + void DidRevokeEntitlements (SKPaymentQueue queue, string[] productIdentifiers); } [Watch (6, 2)] @@ -495,9 +518,7 @@ interface SKProductsRequestDelegate { void ReceivedResponse (SKProductsRequest request, SKProductsResponse response); } -#if !MONOMAC - [NoTV] - [NoWatch] + [Mac (11, 0), NoTV, NoWatch] [BaseType (typeof (UIViewController), Delegates=new string [] { "WeakDelegate" }, Events =new Type [] { typeof (SKStoreProductViewControllerDelegate) })] @@ -525,34 +546,59 @@ interface SKStoreProductViewController { void LoadProduct (StoreProductParameters parameters, [NullAllowed] Action callback); } + [Mac (11,0), NoTV, NoWatch] + [BaseType (typeof (NSObject))] + [Model] + [Protocol] + interface SKStoreProductViewControllerDelegate { + [Export ("productViewControllerDidFinish:"), EventArgs ("SKStoreProductViewController")] + void Finished (SKStoreProductViewController controller); + } + [NoWatch] - [NoMac] + [Mac (11,0)] [StrongDictionary ("SKStoreProductParameterKey")] interface StoreProductParameters { - [iOS (11,3), TV (11,3)] + [iOS (11,0)][TV (11,0)] + [Export ("ProductIdentifier")] + string ProductIdentifier { get; } + + [iOS (8,3)] + [Export ("ProviderToken")] + string ProviderToken { get; } + + [iOS (11,3), TV (11,3), NoMac] [Export ("AdNetworkAttributionSignature")] string AdNetworkAttributionSignature { get; set; } - [iOS (11,3), TV (11,3)] + [iOS (11,3), TV (11,3), NoMac] [Export ("AdNetworkCampaignIdentifier")] uint AdNetworkCampaignIdentifier { get; set; } - [iOS (11,3), TV (11,3)] + [iOS (11,3), TV (11,3), NoMac] [Export ("AdNetworkIdentifier")] string AdNetworkIdentifier { get; set; } - [iOS (11,3), TV (11,3)] + [iOS (11,3), TV (11,3), NoMac] [Export ("AdNetworkNonce")] NSUuid AdNetworkNonce { get; set; } - [iOS (11,3), TV (11,3)] + [iOS (11,3), TV (11,3), NoMac] [Export ("AdNetworkTimestamp")] uint AdNetworkTimestamp { get; set; } + + [NoWatch, NoMac, TV (14,0), iOS (14, 0)] + [Export ("AdNetworkSourceAppStoreIdentifier")] + string AdNetworkSourceAppStoreIdentifier { get; } + + [NoWatch, NoMac, TV (14,0), iOS (14, 0)] + [Export ("AdNetworkVersion")] + string AdNetworkVersion { get; } } [NoWatch] - [NoMac] + [Mac (11,0)] [Static] interface SKStoreProductParameterKey { @@ -599,71 +645,18 @@ interface SKStoreProductParameterKey [iOS (11,3), TV (11,3), NoMac] [Field ("SKStoreProductParameterAdNetworkTimestamp")] NSString AdNetworkTimestamp { get; } - } - - [NoTV] - [NoWatch] - [BaseType (typeof (NSObject))] - [Model] - [Protocol] - interface SKStoreProductViewControllerDelegate { - [Export ("productViewControllerDidFinish:"), EventArgs ("SKStoreProductViewController")] - void Finished (SKStoreProductViewController controller); - } - - [NoWatch] - [iOS (9,3)] - [TV (9,2)] - [BaseType (typeof (NSObject))] - interface SKCloudServiceController { - [Static] - [Export ("authorizationStatus")] - SKCloudServiceAuthorizationStatus AuthorizationStatus { get; } - - [Static] - [Async] - [Export ("requestAuthorization:")] - void RequestAuthorization (Action handler); - - [Async] - [Export ("requestStorefrontIdentifierWithCompletionHandler:")] - void RequestStorefrontIdentifier (Action completionHandler); - - [iOS (11,0)][TV (11,0)] - [Async] - [Export ("requestStorefrontCountryCodeWithCompletionHandler:")] - void RequestStorefrontCountryCode (Action completionHandler); - - [Async] - [Export ("requestCapabilitiesWithCompletionHandler:")] - void RequestCapabilities (Action completionHandler); - - [iOS (10,3), TV (10,2)] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'RequestUserToken' instead.")] - [Deprecated (PlatformName.TvOS, 11,0, message: "Use 'RequestUserToken' instead.")] - [Async] - [Export ("requestPersonalizationTokenForClientToken:withCompletionHandler:")] - void RequestPersonalizationToken (string clientToken, Action completionHandler); - - [iOS (11,0)][TV (11,0)] - [Async] - [Export ("requestUserTokenForDeveloperToken:completionHandler:")] - void RequestUserToken (string developerToken, Action completionHandler); - [Notification] - [Field ("SKStorefrontIdentifierDidChangeNotification")] - NSString StorefrontIdentifierDidChangeNotification { get; } + [NoWatch, NoMac, TV (14, 0), iOS (14, 0)] + [Field ("SKStoreProductParameterAdNetworkSourceAppStoreIdentifier")] + NSString AdNetworkSourceAppStoreIdentifier { get; } - [Notification] - [Field ("SKCloudServiceCapabilitiesDidChangeNotification")] - NSString CloudServiceCapabilitiesDidChangeNotification { get; } - - [iOS (11,0)][TV (11,0)] - [Notification] - [Field ("SKStorefrontCountryCodeDidChangeNotification")] - NSString StorefrontCountryCodeDidChangeNotification { get; } + [NoWatch, NoMac, TV (14, 0), iOS (14, 0)] + [Field ("SKStoreProductParameterAdNetworkVersion")] + NSString AdNetworkVersion { get; } } +#if !MONOMAC + [iOS (10,1)] [NoWatch] [NoTV] // __TVOS_PROHIBITED @@ -760,8 +753,65 @@ enum SKCloudServiceSetupMessageIdentifier { [Field ("SKCloudServiceSetupMessageIdentifierPlayMusic")] PlayMusic, } +#endif - [NoWatch, iOS (11,0), TV (11,0)] + [Mac (11,0), Watch (7,0), iOS (9,3), TV (9,2)] + [BaseType (typeof (NSObject))] +#if XAMCORE_3_0 // Avoid breaking change in iOS + [DisableDefaultCtor] +#endif + interface SKCloudServiceController { + [Static] + [Export ("authorizationStatus")] + SKCloudServiceAuthorizationStatus AuthorizationStatus { get; } + + [Static] + [Async] + [Export ("requestAuthorization:")] + void RequestAuthorization (Action handler); + + [Async] + [Export ("requestStorefrontIdentifierWithCompletionHandler:")] + void RequestStorefrontIdentifier (Action completionHandler); + + [iOS (11,0)][TV (11,0)] + [Async] + [Export ("requestStorefrontCountryCodeWithCompletionHandler:")] + void RequestStorefrontCountryCode (Action completionHandler); + + [Async] + [Export ("requestCapabilitiesWithCompletionHandler:")] + void RequestCapabilities (Action completionHandler); + + [iOS (10,3), TV (10,2)] + [Deprecated (PlatformName.iOS, 11,0, message: "Use 'RequestUserToken' instead.")] + [Deprecated (PlatformName.TvOS, 11,0, message: "Use 'RequestUserToken' instead.")] + [Async] + [Export ("requestPersonalizationTokenForClientToken:withCompletionHandler:")] + void RequestPersonalizationToken (string clientToken, Action completionHandler); + + [iOS (11,0)][TV (11,0)] + [Async] + [Export ("requestUserTokenForDeveloperToken:completionHandler:")] + void RequestUserToken (string developerToken, Action completionHandler); + + [Notification] + [Field ("SKStorefrontIdentifierDidChangeNotification")] + NSString StorefrontIdentifierDidChangeNotification { get; } + + [Notification] + [Field ("SKCloudServiceCapabilitiesDidChangeNotification")] + NSString CloudServiceCapabilitiesDidChangeNotification { get; } + + [iOS (11,0)][TV (11,0)] + [Notification] + [Field ("SKStorefrontCountryCodeDidChangeNotification")] + NSString StorefrontCountryCodeDidChangeNotification { get; } + } + + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, iOS (11,0), TV (11,0), Mac (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // static Default property is the only documented way to get the controller interface SKProductStorePromotionController { @@ -785,7 +835,6 @@ interface SKProductStorePromotionController { [Export ("updateStorePromotionOrder:completionHandler:")] void Update (SKProduct[] storePromotionOrder, [NullAllowed] Action completionHandler); } -#endif [iOS (10,3), Mac (10,14)] [NoTV] @@ -794,9 +843,16 @@ interface SKProductStorePromotionController { [DisableDefaultCtor] // Not specified but very likely interface SKStoreReviewController { + [Deprecated (PlatformName.iOS, 14, 0, message : "Use the 'RequestReview (UIWindowScene windowScene)' API instead.")] [Static] [Export ("requestReview")] void RequestReview (); + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, iOS (14,0), NoMac] + [Static] + [Export ("requestReviewInScene:")] + void RequestReview (UIWindowScene windowScene); } [Watch (6, 2), iOS (11,2), TV (11,2), Mac (10,13,2)] @@ -850,6 +906,11 @@ interface SKAdNetwork { [Static] [Export ("registerAppForAdNetworkAttribution")] void RegisterAppForAdNetworkAttribution (); + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Static] + [Export ("updateConversionValue:")] + void UpdateConversionValue (nint conversionValue); } [iOS (12,2)] @@ -952,4 +1013,139 @@ interface SKArcadeService { [Export ("repairArcadeApp")] void Repair (); } + + + [Unavailable (PlatformName.MacCatalyst)] + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SKOverlayTransitionContext { + [Export ("addAnimationBlock:")] + void AddAnimationBlock (Action block); + + [Export ("startFrame")] + CGRect StartFrame { get; } + + [Export ("endFrame")] + CGRect EndFrame { get; } + } + + [NoWatch, NoTV, NoMac, iOS (14,0)] + [DisableDefaultCtor] + [BaseType (typeof (NSObject))] + interface SKOverlayConfiguration {} + + [Unavailable (PlatformName.MacCatalyst)] + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [BaseType (typeof (SKOverlayConfiguration))] + [DisableDefaultCtor] + interface SKOverlayAppConfiguration { + [Export ("initWithAppIdentifier:position:")] + [DesignatedInitializer] + IntPtr Constructor (string appIdentifier, SKOverlayPosition position); + + [Export ("appIdentifier", ArgumentSemantic.Retain)] + string AppIdentifier { get; set; } + + [NullAllowed, Export ("campaignToken", ArgumentSemantic.Retain)] + string CampaignToken { get; set; } + + [NullAllowed, Export ("providerToken", ArgumentSemantic.Retain)] + string ProviderToken { get; set; } + + [Export ("position", ArgumentSemantic.Assign)] + SKOverlayPosition Position { get; set; } + + [Export ("userDismissible")] + bool UserDismissible { get; set; } + + [Export ("setAdditionalValue:forKey:")] + void SetAdditionalValue ([NullAllowed] NSObject value, string key); + + [Export ("additionalValueForKey:")] + [return: NullAllowed] + NSObject GetAdditionalValue (string key); + } + + [Unavailable (PlatformName.MacCatalyst)] + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [BaseType (typeof (SKOverlayConfiguration))] + [DisableDefaultCtor] + interface SKOverlayAppClipConfiguration { + [Export ("initWithPosition:")] + [DesignatedInitializer] + IntPtr Constructor (SKOverlayPosition position); + + [NullAllowed, Export ("campaignToken", ArgumentSemantic.Retain)] + string CampaignToken { get; set; } + + [NullAllowed, Export ("providerToken", ArgumentSemantic.Retain)] + string ProviderToken { get; set; } + + [Export ("position", ArgumentSemantic.Assign)] + SKOverlayPosition Position { get; set; } + + [Export ("setAdditionalValue:forKey:")] + void SetAdditionalValue ([NullAllowed] NSObject value, string key); + + [Export ("additionalValueForKey:")] + [return: NullAllowed] + NSObject GetAdditionalValue (string key); + } + + interface ISKOverlayDelegate {} + + [Unavailable (PlatformName.MacCatalyst)] + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Protocol, Model (AutoGeneratedName = true), Advice ("This API is not available when using UIKit on macOS.")] + [BaseType (typeof (NSObject))] + interface SKOverlayDelegate { + [Export ("storeOverlay:didFailToLoadWithError:")] + void DidFailToLoad (SKOverlay overlay, NSError error); + + [Export ("storeOverlay:willStartPresentation:")] + void WillStartPresentation (SKOverlay overlay, SKOverlayTransitionContext transitionContext); + + [Export ("storeOverlay:didFinishPresentation:")] + void DidFinishPresentation (SKOverlay overlay, SKOverlayTransitionContext transitionContext); + + [Export ("storeOverlay:willStartDismissal:")] + void WillStartDismissal (SKOverlay overlay, SKOverlayTransitionContext transitionContext); + + [Export ("storeOverlay:didFinishDismissal:")] + void DidFinishDismissal (SKOverlay overlay, SKOverlayTransitionContext transitionContext); + } + + + [Unavailable (PlatformName.MacCatalyst)] + [NoWatch, NoTV, NoMac, iOS (14,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SKOverlay { + [Export ("initWithConfiguration:")] + [DesignatedInitializer] + IntPtr Constructor (SKOverlayConfiguration configuration); + + [Export ("presentInScene:")] + void PresentInScene (UIWindowScene scene); + + [Static] + [Export ("dismissOverlayInScene:")] + void DismissOverlayInScene (UIWindowScene scene); + + [Wrap ("WeakDelegate")] + [NullAllowed] + ISKOverlayDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [Export ("configuration", ArgumentSemantic.Copy)] + SKOverlayConfiguration Configuration { get; } + } + } diff --git a/src/tvmlkit.cs b/src/tvmlkit.cs index ab77cc3b4b4d..448a93491f8a 100644 --- a/src/tvmlkit.cs +++ b/src/tvmlkit.cs @@ -216,6 +216,10 @@ interface TVApplicationControllerContext : NSCopying { [Export ("launchOptions", ArgumentSemantic.Copy)] NSDictionary LaunchOptions { get; set; } + + [TV (14,0)] + [Export ("supportsPictureInPicturePlayback")] + bool SupportsPictureInPicturePlayback { get; set; } } [TV (9,0)] diff --git a/src/uikit.cs b/src/uikit.cs index 3a37fcee5b15..082f2677e925 100644 --- a/src/uikit.cs +++ b/src/uikit.cs @@ -26,6 +26,7 @@ #endif using CoreData; using UserNotifications; +using UniformTypeIdentifiers; #if IOS using FileProvider; @@ -34,9 +35,7 @@ #if TVOS || WATCH using LPLinkMetadata = Foundation.NSObject; #endif // TVOS || WATCH -#if !TVOS using Intents; -#endif // !TVOS // Unfortunately this file is a mix of #if's and [NoWatch] so we list // some classes until [NoWatch] is used instead of #if's directives @@ -52,12 +51,14 @@ using UITableViewDataSource = Foundation.NSObjectProtocol; using IUITextInput = Foundation.NSObjectProtocol; using IUICoordinateSpace = Foundation.NSObjectProtocol; +using UIAccessibilityIdentification = Foundation.NSObjectProtocol; using UIActivity = Foundation.NSObject; using UICollectionViewLayout = Foundation.NSObject; using UITraitCollection = Foundation.NSObject; using UIButton = Foundation.NSObject; using UIBlurEffect = Foundation.NSObject; +using UIControl = Foundation.NSObject; using UIViewController = Foundation.NSObject; using UIGestureRecognizer = Foundation.NSObject; using UIAction = Foundation.NSObject; @@ -75,6 +76,10 @@ using UITableViewCell = Foundation.NSObject; using UITableView = Foundation.NSObject; using UICollectionReusableView = Foundation.NSObject; +using UIVisualEffect = Foundation.NSObject; +using UILayoutGuide = Foundation.NSObject; +using UISwipeActionsConfiguration = Foundation.NSObject; +using UINib = Foundation.NSObject; #endif // WATCH using System; @@ -1057,6 +1062,12 @@ interface UIAccessibility { [Field ("UIAccessibilityBoldTextStatusDidChangeNotification")] NSString BoldTextStatusDidChangeNotification { get; } + [NoWatch] + [TV (14,0), iOS (14,0)] + [Notification] + [Field ("UIAccessibilityButtonShapesEnabledStatusDidChangeNotification")] + NSString ButtonShapesEnabledStatusDidChangeNotification { get; } + [NoWatch] [iOS (8,0)] [Notification] @@ -1075,6 +1086,12 @@ interface UIAccessibility { [Field ("UIAccessibilityReduceMotionStatusDidChangeNotification")] NSString ReduceMotionStatusDidChangeNotification { get; } + [NoWatch] + [TV (14,0), iOS (14,0)] + [Notification] + [Field ("UIAccessibilityPrefersCrossFadeTransitionsStatusDidChangeNotification")] + NSString PrefersCrossFadeTransitionsStatusDidChangeNotification { get; } + [NoWatch] [iOS (13,0), TV (13,0)] [Notification] @@ -1305,6 +1322,22 @@ partial interface UIAccessibilityCustomAction { [Export ("initWithAttributedName:actionHandler:")] IntPtr Constructor (NSAttributedString attributedName, [NullAllowed] UIAccessibilityCustomActionHandler actionHandler); + [TV (14,0), iOS (14,0)] + [Export ("initWithName:image:target:selector:")] + IntPtr Constructor (string name, [NullAllowed] UIImage image, [NullAllowed] NSObject target, Selector selector); + + [TV (14,0), iOS (14,0)] + [Export ("initWithAttributedName:image:target:selector:")] + IntPtr Constructor (NSAttributedString attributedName, [NullAllowed] UIImage image, [NullAllowed] NSObject target, Selector selector); + + [TV (14,0), iOS (14,0)] + [Export ("initWithName:image:actionHandler:")] + IntPtr Constructor (string name, [NullAllowed] UIImage image, UIAccessibilityCustomActionHandler actionHandler); + + [TV (14,0), iOS (14,0)] + [Export ("initWithAttributedName:image:actionHandler:")] + IntPtr Constructor (NSAttributedString attributedName, [NullAllowed] UIImage image, UIAccessibilityCustomActionHandler actionHandler); + [NullAllowed] // by default this property is null [Export ("name")] string Name { get; set; } @@ -1324,6 +1357,10 @@ partial interface UIAccessibilityCustomAction { [TV (13,0), iOS (13,0)] [NullAllowed, Export ("actionHandler", ArgumentSemantic.Copy)] UIAccessibilityCustomActionHandler ActionHandler { get; set; } + + [TV (14,0), iOS (14,0)] + [NullAllowed, Export ("image", ArgumentSemantic.Strong)] + UIImage Image { get; set; } } delegate UIAccessibilityCustomRotorItemResult UIAccessibilityCustomRotorSearch (UIAccessibilityCustomRotorSearchPredicate predicate); @@ -1607,6 +1644,16 @@ interface UIAction { [Export ("state", ArgumentSemantic.Assign)] UIMenuElementState State { get; set; } + [TV (14,0), iOS (14,0)] + [NullAllowed] + [Export ("sender")] + NSObject Sender { get; } + + [TV (14,0), iOS (14,0)] + [Static] + [Export ("actionWithHandler:")] + UIAction Create (UIActionHandler handler); + [Static] [Export ("actionWithTitle:image:identifier:handler:")] UIAction Create (string title, [NullAllowed] UIImage image, [NullAllowed] string identifier, UIActionHandler handler); @@ -1817,11 +1864,17 @@ interface UIActivityViewController { [iOS (8,0)] [NullAllowed, Export ("completionWithItemsHandler", ArgumentSemantic.Copy)] UIActivityViewControllerCompletion CompletionWithItemsHandler { get; set; } + + // UIActivityViewController (UIActivityItemsConfiguration) category + + [iOS (14,0)] + [Export ("initWithActivityItemsConfiguration:")] + IntPtr Constructor (IUIActivityItemsConfigurationReading activityItemsConfiguration); } [iOS (8,0)] [BaseType (typeof (NSObject))] - partial interface UIAlertAction : NSCopying { + partial interface UIAlertAction : NSCopying, UIAccessibilityIdentification { [Export ("title")] string Title { get; } @@ -3112,12 +3165,24 @@ interface UIContextMenuInteraction : UIInteraction { [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] NSObject WeakDelegate { get; } + [iOS (14,0)] + [Export ("menuAppearance")] + UIContextMenuInteractionAppearance MenuAppearance { get; } + [Export ("initWithDelegate:")] [DesignatedInitializer] IntPtr Constructor (IUIContextMenuInteractionDelegate @delegate); [Export ("locationInView:")] CGPoint GetLocation ([NullAllowed] UIView inView); + + [iOS (14,0)] + [Export ("updateVisibleMenuWithBlock:")] + void UpdateVisibleMenu (Func handler); + + [iOS (14,0)] + [Export ("dismissMenu")] + void DismissMenu (); } interface IUIContextMenuInteractionCommitAnimating { } @@ -3390,12 +3455,17 @@ interface UIApplicationDelegate { [Export ("application:userDidAcceptCloudKitShareWithMetadata:")] void UserDidAcceptCloudKitShare (UIApplication application, CKShareMetadata cloudKitShareMetadata); -#if !TVOS + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'GetHandlerForIntent' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'GetHandlerForIntent' instead.")] [NoTV] [iOS (11,0), Watch (4,0)] [Export ("application:handleIntent:completionHandler:")] void HandleIntent (UIApplication application, INIntent intent, Action completionHandler); -#endif // !TVOS + + [iOS (14,0), TV (14,0), Watch (7,0)] + [Export ("application:handlerForIntent:")] + [return: NullAllowed] + NSObject GetHandlerForIntent (UIApplication application, INIntent intent); [iOS (13,0), TV (13,0), Watch (6,0)] [Export ("application:configurationForConnectingSceneSession:options:")] @@ -3485,6 +3555,36 @@ interface UIBarButtonItem : NSCoding [PostGet ("CustomView")] IntPtr Constructor (UIView customView); + [TV (14,0), iOS (14,0)] + [Export ("initWithBarButtonSystemItem:primaryAction:")] + IntPtr Constructor (UIBarButtonSystemItem systemItem, [NullAllowed] UIAction primaryAction); + + [TV (14,0), iOS (14,0)] + [Export ("initWithPrimaryAction:")] + IntPtr Constructor ([NullAllowed] UIAction primaryAction); + + [TV (14,0), iOS (14,0)] + [Export ("initWithBarButtonSystemItem:menu:")] + IntPtr Constructor (UIBarButtonSystemItem systemItem, [NullAllowed] UIMenu menu); + + [TV (14,0), iOS (14,0)] + [Export ("initWithTitle:menu:")] + IntPtr Constructor ([NullAllowed] string title, [NullAllowed] UIMenu menu); + + [TV (14,0), iOS (14,0)] + [Export ("initWithImage:menu:")] + IntPtr Constructor ([NullAllowed] UIImage image, [NullAllowed] UIMenu menu); + + [TV (14,0), iOS (14,0)] + [Static] + [Export ("fixedSpaceItemOfWidth:")] + UIBarButtonItem GetFixedSpaceItem (nfloat width); + + [TV (14,0), iOS (14,0)] + [Static] + [Export ("flexibleSpaceItem")] + UIBarButtonItem FlexibleSpaceItem { get; } + [Export ("style")] UIBarButtonItemStyle Style { get; set; } @@ -3505,6 +3605,16 @@ interface UIBarButtonItem : NSCoding [Export ("target", ArgumentSemantic.Assign)] NSObject Target { get; set; } + [TV (14,0), iOS (14,0)] + [NullAllowed] + [Export ("primaryAction", ArgumentSemantic.Copy)] + UIAction PrimaryAction { get; set; } + + [NoWatch, NoTV, iOS (14,0)] + [NullAllowed] + [Export ("menu", ArgumentSemantic.Copy)] + UIMenu Menu { get; set; } + [Export ("enabled")][Override] bool Enabled { [Bind ("isEnabled")] get; set; } @@ -3626,6 +3736,7 @@ interface UICollectionReusableView { [Export ("reuseIdentifier", ArgumentSemantic.Copy)] NSString ReuseIdentifier { get; } + [RequiresSuper] [Export ("prepareForReuse")] void PrepareForReuse (); @@ -3700,6 +3811,14 @@ interface UICollectionView : NSCoding, UIDataSourceTranslating [Export ("dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath:")] UICollectionReusableView DequeueReusableSupplementaryView (NSString kind, NSString identifier, NSIndexPath indexPath); + [TV (14,0), iOS (14,0)] + [Export ("dequeueConfiguredReusableCellWithRegistration:forIndexPath:item:")] + UICollectionViewCell DequeueConfiguredReusableCell (UICollectionViewCellRegistration registration, NSIndexPath indexPath, NSObject item); + + [TV (14,0), iOS (14,0)] + [Export ("dequeueConfiguredReusableSupplementaryViewWithRegistration:forIndexPath:")] + UICollectionReusableView DequeueConfiguredReusableSupplementaryView (UICollectionViewSupplementaryRegistration registration, NSIndexPath indexPath); + [Export ("indexPathsForSelectedItems")] NSIndexPath [] GetIndexPathsForSelectedItems (); @@ -3829,6 +3948,10 @@ UICollectionViewTransitionLayout StartInteractiveTransition (UICollectionViewLay [Export ("remembersLastFocusedIndexPath")] bool RemembersLastFocusedIndexPath { get; set; } + [NoWatch, NoTV, iOS (14, 0)] + [Export ("selectionFollowsFocus")] + bool SelectionFollowsFocus { get; set; } + [iOS (10,0), TV (10,0)] [NullAllowed, Export ("prefetchDataSource", ArgumentSemantic.Weak)] IUICollectionViewDataSourcePrefetching PrefetchDataSource { get; set; } @@ -3852,6 +3975,10 @@ UICollectionViewTransitionLayout StartInteractiveTransition (UICollectionViewLay [Export ("dragInteractionEnabled")] bool DragInteractionEnabled { get; set; } + // [NoWatch, NoTV, NoiOS] // huh? TODO: Check in a later Xcode 12 beta + // [Export ("contextMenuInteraction")] + // UIContextMenuInteraction ContextMenuInteraction { get; } + [NoWatch, NoTV] [iOS (11,0)] [Export ("reorderingCadence", ArgumentSemantic.Assign)] @@ -3871,6 +3998,18 @@ UICollectionViewTransitionLayout StartInteractiveTransition (UICollectionViewLay [iOS (11,0)] [Export ("hasActiveDrop")] bool HasActiveDrop { get; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("editing")] + bool Editing { [Bind ("isEditing")] get; set; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("allowsSelectionDuringEditing")] + bool AllowsSelectionDuringEditing { get; set; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("allowsMultipleSelectionDuringEditing")] + bool AllowsMultipleSelectionDuringEditing { get; set; } } interface IUICollectionViewDataSourcePrefetching {} @@ -4003,6 +4142,10 @@ interface UICollectionViewDelegate : UIScrollViewDelegate { [Export ("collectionView:targetContentOffsetForProposedContentOffset:")] CGPoint GetTargetContentOffset (UICollectionView collectionView, CGPoint proposedContentOffset); + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("collectionView:canEditItemAtIndexPath:")] + bool CanEditItem (UICollectionView collectionView, NSIndexPath indexPath); + [iOS (9,0)] [Export ("collectionView:canFocusItemAtIndexPath:")] bool CanFocusItem (UICollectionView collectionView, NSIndexPath indexPath); @@ -4055,6 +4198,14 @@ interface UICollectionViewDelegate : UIScrollViewDelegate { [NoWatch, NoTV, iOS (13,0)] [Export ("collectionView:willPerformPreviewActionForMenuWithConfiguration:animator:")] void WillPerformPreviewAction (UICollectionView collectionView, UIContextMenuConfiguration configuration, IUIContextMenuInteractionCommitAnimating animator); + + [NoWatch, NoTV, iOS (14,0)] + [Export ("collectionView:willDisplayContextMenuWithConfiguration:animator:")] + void WillDisplayContextMenu (UICollectionView collectionView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); + + [NoWatch, NoTV, iOS (14,0)] + [Export ("collectionView:willEndContextMenuInteractionWithConfiguration:animator:")] + void WillEndContextMenuInteraction (UICollectionView collectionView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); } [BaseType (typeof (UICollectionReusableView))] @@ -4062,6 +4213,26 @@ interface UICollectionViewCell { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frame); + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("configurationState")] + UICellConfigurationState ConfigurationState { get; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("setNeedsUpdateConfiguration")] + void SetNeedsUpdateConfiguration (); + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("updateConfigurationUsingState:")] + void UpdateConfiguration (UICellConfigurationState state); + + [Watch (7,0), TV (14,0), iOS (14,0)] + [NullAllowed, Export ("contentConfiguration", ArgumentSemantic.Copy)] + IUIContentConfiguration ContentConfiguration { get; set; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("automaticallyUpdatesContentConfiguration")] + bool AutomaticallyUpdatesContentConfiguration { get; set; } + [Export ("contentView")] UIView ContentView { get; } @@ -4083,6 +4254,14 @@ interface UICollectionViewCell { [iOS (11,0)] [Export ("dragStateDidChange:")] void DragStateDidChange (UICollectionViewCellDragState dragState); + + [Watch (7,0), TV (14,0), iOS (14,0)] + [NullAllowed, Export ("backgroundConfiguration", ArgumentSemantic.Copy)] + UIBackgroundConfiguration BackgroundConfiguration { get; set; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("automaticallyUpdatesBackgroundConfiguration")] + bool AutomaticallyUpdatesBackgroundConfiguration { get; set; } } [BaseType (typeof (UIViewController))] @@ -4906,6 +5085,12 @@ [Static] [Export ("brownColor")] [Static] [Export ("quaternarySystemFillColor")] UIColor QuaternarySystemFillColor { get; } + + // UIColor (UIAccessibility) Category + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("accessibilityName")] + string AccessibilityName { get; } } #if !WATCH @@ -7596,6 +7781,11 @@ interface UIMenu { [Export ("children")] UIMenuElement [] Children { get; } + [TV (14,0), iOS (14,0)] + [Static] + [Export ("menuWithChildren:")] + UIMenu Create (UIMenuElement[] children); + [Static] [Export ("menuWithTitle:children:")] UIMenu Create (string title, UIMenuElement [] children); @@ -7611,7 +7801,7 @@ interface UIMenu { [iOS (13,0), TV (13,0), NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface UIMenuElement : NSCopying, NSSecureCoding { + interface UIMenuElement : NSCopying, NSSecureCoding, UIAccessibilityIdentification { [Export ("title")] string Title { get; } @@ -7631,6 +7821,10 @@ interface UIPreviewParameters : NSCopying { [NullAllowed, Export ("visiblePath", ArgumentSemantic.Copy)] UIBezierPath VisiblePath { get; set; } + [iOS (14,0)] + [NullAllowed, Export ("shadowPath", ArgumentSemantic.Copy)] + UIBezierPath ShadowPath { get; set; } + [NullAllowed, Export ("backgroundColor", ArgumentSemantic.Copy)] UIColor BackgroundColor { get; set; } } @@ -7856,11 +8050,22 @@ UIScreen Screen { NSString DidResignKeyNotification { get; } } + delegate void UIControlEnumerateEventsIteratorHandler ([NullAllowed] UIAction actionHandler, [NullAllowed] NSObject target, [NullAllowed] Selector action, UIControlEvent controlEvents, out bool stop); + [BaseType (typeof (UIView))] - interface UIControl { + interface UIControl +#if IOS // UIControl() category + : UIContextMenuInteractionDelegate +#endif + { [Export ("initWithFrame:")] + [DesignatedInitializer] IntPtr Constructor (CGRect frame); + [TV (14,0), iOS (14,0)] + [Export ("initWithFrame:primaryAction:")] + IntPtr Constructor (CGRect frame, [NullAllowed] UIAction primaryAction); + [Export ("enabled")] bool Enabled { [Bind ("isEnabled")] get; set; } @@ -7918,6 +8123,18 @@ interface UIControl { [Export ("removeTarget:action:forControlEvents:")] void RemoveTarget ([NullAllowed] NSObject target, IntPtr sel, UIControlEvent events); + [TV (14,0), iOS (14,0)] + [Export ("addAction:forControlEvents:")] + void AddAction (UIAction action, UIControlEvent controlEvents); + + [TV (14,0), iOS (14,0)] + [Export ("removeAction:forControlEvents:")] + void RemoveAction (UIAction action, UIControlEvent controlEvents); + + [TV (14,0), iOS (14,0)] + [Export ("removeActionForIdentifier:forControlEvents:")] + void RemoveAction (string actionIdentifier, UIControlEvent controlEvents); + [Export ("allTargets")] NSSet AllTargets { get; } @@ -7926,12 +8143,36 @@ interface UIControl { [Export ("actionsForTarget:forControlEvent:")] string [] GetActions ([NullAllowed] NSObject target, UIControlEvent events); + + [TV (14,0), iOS (14,0)] + [Export ("enumerateEventHandlers:")] + void EnumerateEventHandlers (UIControlEnumerateEventsIteratorHandler iteratorHandler); [Export ("sendAction:to:forEvent:")] void SendAction (Selector action, [NullAllowed] NSObject target, [NullAllowed] UIEvent uievent); + [TV (14,0), iOS (14,0)] + [Export ("sendAction:")] + void SendAction (UIAction action); + [Export ("sendActionsForControlEvents:")] void SendActionForControlEvents (UIControlEvent events); + + [NoWatch, NoTV, iOS (14,0)] + [NullAllowed, Export ("contextMenuInteraction", ArgumentSemantic.Strong)] + UIContextMenuInteraction ContextMenuInteraction { get; } + + [NoWatch, NoTV, iOS (14,0)] + [Export ("contextMenuInteractionEnabled")] + bool ContextMenuInteractionEnabled { [Bind ("isContextMenuInteractionEnabled")] get; set; } + + [NoWatch, NoTV, iOS (14,0)] + [Export ("showsMenuAsPrimaryAction")] + bool ShowsMenuAsPrimaryAction { get; set; } + + [NoWatch, NoTV, iOS (14,0)] + [Export ("menuAttachmentPointForConfiguration:")] + CGPoint GetMenuAttachmentPoint (UIContextMenuConfiguration configuration); } [iOS (7,0)] @@ -8087,14 +8328,29 @@ interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting , UISpringLoadedInteractionSupporting #endif { + [DesignatedInitializer] [Export ("initWithFrame:")] IntPtr Constructor (CGRect frame); + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("initWithFrame:primaryAction:")] + IntPtr Constructor (CGRect frame, [NullAllowed] UIAction primaryAction); + [Watch (6,0), TV (13,0), iOS (13,0)] [Static] [Export ("systemButtonWithImage:target:action:")] UIButton GetSystemButton (UIImage image, [NullAllowed] NSObject target, [NullAllowed] Selector action); + [NoWatch, TV (14,0), iOS (14,0)] + [Static] + [Export ("systemButtonWithPrimaryAction:")] + UIButton GetSystemButton ([NullAllowed] UIAction primaryAction); + + [NoWatch, TV (14,0), iOS (14,0)] + [Static] + [Export ("buttonWithType:primaryAction:")] + UIButton FromType (UIButtonType buttonType, [NullAllowed] UIAction primaryAction); + [Export ("buttonWithType:")] [Static] UIButton FromType (UIButtonType type); @@ -8123,6 +8379,10 @@ interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting [Export ("buttonType")] UIButtonType ButtonType { get; } + [NoWatch, TV (14, 0), iOS (14, 0)] + [Export ("role", ArgumentSemantic.Assign)] + UIButtonRole Role { get; set; } + [NoWatch, NoTV, iOS (13,4)] [Export ("pointerInteractionEnabled")] bool PointerInteractionEnabled { [Bind ("isPointerInteractionEnabled")] get; set; } @@ -8131,6 +8391,11 @@ interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting [NullAllowed, Export ("pointerStyleProvider", ArgumentSemantic.Copy)] UIButtonPointerStyleProvider PointerStyleProvider { get; set; } + [NoWatch, NoTV, iOS (14,0)] + [NullAllowed] + [Export ("menu", ArgumentSemantic.Copy)] + UIMenu Menu { get; set; } + [Export ("setTitle:forState:")] void SetTitle ([NullAllowed] string title, UIControlState forState); @@ -8331,6 +8596,10 @@ interface UILabel : UIContentSizeCategoryAdjusting { [Export ("allowsDefaultTighteningForTruncation")] bool AllowsDefaultTighteningForTruncation { get; set; } + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("lineBreakStrategy", ArgumentSemantic.Assign)] + NSLineBreakStrategy LineBreakStrategy { get; set; } + [TV (12, 0), NoWatch, NoiOS] [Export ("enablesMarqueeWhenAncestorFocused")] bool EnablesMarqueeWhenAncestorFocused { get; set; } @@ -8743,10 +9012,12 @@ interface UIImagePickerController { [Static, Export ("isFlashAvailableForCameraDevice:")] bool IsFlashAvailableForCameraDevice (UIImagePickerControllerCameraDevice cameraDevice); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'PHPicker' instead.")] [iOS (11,0)] [Export ("imageExportPreset", ArgumentSemantic.Assign)] UIImagePickerControllerImageUrlExportPreset ImageExportPreset { get; set; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'PHPicker' instead.")] [iOS (11,0)] [Export ("videoExportPreset")] string VideoExportPreset { get; set; } @@ -8779,6 +9050,7 @@ interface UIImagePickerController { [Field ("UIImagePickerControllerLivePhoto")] NSString LivePhoto { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'PHPicker' instead.")] [iOS (11,0)] [Field ("UIImagePickerControllerPHAsset")] NSString PHAsset { get; } @@ -9106,6 +9378,10 @@ interface UINavigationItem : NSCoding { [Export ("backBarButtonItem", ArgumentSemantic.Retain)] UIBarButtonItem BackBarButtonItem { get; set; } + [TV (11,0), iOS (11,0)] + [NullAllowed, Export ("backButtonTitle")] + string BackButtonTitle { get; set; } + [Export ("titleView", ArgumentSemantic.Retain), NullAllowed] UIView TitleView { get; set; } @@ -9121,6 +9397,10 @@ interface UINavigationItem : NSCoding { [Export ("setHidesBackButton:animated:")] void SetHidesBackButton (bool hides, bool animated); + [NoTV, iOS (14,0)] + [Export ("backButtonDisplayMode", ArgumentSemantic.Assign)] + UINavigationItemBackButtonDisplayMode BackButtonDisplayMode { get; set; } + [Export ("leftBarButtonItem", ArgumentSemantic.Retain)][NullAllowed] UIBarButtonItem LeftBarButtonItem { get; @@ -9382,15 +9662,6 @@ interface UIPageControl : UIAppearance { [Export ("hidesForSinglePage")] bool HidesForSinglePage { get; set; } - [Export ("defersCurrentPageDisplay")] - bool DefersCurrentPageDisplay { get; set; } - - [Export ("updateCurrentPageDisplay")] - void UpdateCurrentPageDisplay (); - - [Export ("sizeForNumberOfPages:")] - CGSize SizeForNumberOfPages (nint pageCount); - [Appearance] [NullAllowed] [Export ("pageIndicatorTintColor", ArgumentSemantic.Retain)] @@ -9400,6 +9671,45 @@ interface UIPageControl : UIAppearance { [NullAllowed] [Export ("currentPageIndicatorTintColor", ArgumentSemantic.Retain)] UIColor CurrentPageIndicatorTintColor { get; set; } + + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("backgroundStyle", ArgumentSemantic.Assign)] + UIPageControlBackgroundStyle BackgroundStyle { get; set; } + + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("interactionState", ArgumentSemantic.Assign)] + UIPageControlInteractionState InteractionState { get; } + + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("allowsContinuousInteraction")] + bool AllowsContinuousInteraction { get; set; } + + [NoWatch, TV (14,0), iOS (14,0)] + [NullAllowed] + [Export ("preferredIndicatorImage", ArgumentSemantic.Strong)] + UIImage PreferredIndicatorImage { get; set; } + + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("indicatorImageForPage:")] + [return: NullAllowed] + UIImage GetIndicatorImage (nint page); + + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("setIndicatorImage:forPage:")] + void SetIndicatorImage ([NullAllowed] UIImage image, nint page); + + [Export ("sizeForNumberOfPages:")] + CGSize SizeForNumberOfPages (nint pageCount); + + [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.TvOS, 14, 0)] + [Export ("defersCurrentPageDisplay")] + bool DefersCurrentPageDisplay { get; set; } + + [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.TvOS, 14, 0)] + [Export ("updateCurrentPageDisplay")] + void UpdateCurrentPageDisplay (); } [BaseType (typeof (UIViewController), @@ -9671,6 +9981,26 @@ interface UIPasteboard { [Export ("hasColors")] bool HasColors { get; } + [Async] + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("detectPatternsForPatterns:completionHandler:")] + void DetectPatterns (NSSet patterns, Action, NSError> completionHandler); + + [Async] + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("detectPatternsForPatterns:inItemSet:completionHandler:")] + void DetectPatterns (NSSet patterns, [NullAllowed] NSIndexSet itemSet, Action [], NSError> completionHandler); + + [Async] + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("detectValuesForPatterns:completionHandler:")] + void DetectValues (NSSet patterns, Action, NSError> completionHandler); + + [Async] + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("detectValuesForPatterns:inItemSet:completionHandler:")] + void DetectValues (NSSet patterns, [NullAllowed] NSIndexSet itemSet, Action [], NSError> completionHandler); + [NoWatch, NoTV, iOS (11,0)] [Export ("itemProviders", ArgumentSemantic.Copy)] NSItemProvider[] ItemProviders { get; set; } @@ -10989,6 +11319,14 @@ partial interface UISearchController : UIViewControllerTransitioningDelegate, UI [iOS (13,0), TV (13,0)] [Export ("automaticallyShowsScopeBar")] bool AutomaticallyShowsScopeBar { get; set; } + + [TV (14,0), NoWatch, NoiOS] + [NullAllowed, Export ("searchSuggestions", ArgumentSemantic.Copy)] + IUISearchSuggestion [] SearchSuggestions { get; set; } + + [TV (14,0), NoWatch, NoiOS] + [NullAllowed, Export ("searchControllerObservedScrollView", ArgumentSemantic.Strong)] + UIScrollView SearchControllerObservedScrollView { get; set; } } [Protocol, Model] @@ -11126,8 +11464,12 @@ interface UISearchDisplayDelegate { [BaseType (typeof (NSObject))] partial interface UISearchResultsUpdating { [Abstract] - [Export ("updateSearchResultsForSearchController:")] - void UpdateSearchResultsForSearchController (UISearchController searchController); + [Export ("updateSearchResultsForSearchController:")] + void UpdateSearchResultsForSearchController (UISearchController searchController); + + [TV (14,0), NoWatch, NoiOS] + [Export ("updateSearchResultsForSearchController:selectingSearchSuggestion:")] + void UpdateSearchResults (UISearchController searchController, IUISearchSuggestion searchSuggestion); } [BaseType (typeof(UIControl))] @@ -11136,12 +11478,35 @@ interface UISegmentedControl : UISpringLoadedInteractionSupporting #endif { + [DesignatedInitializer] [Export ("initWithItems:")] IntPtr Constructor (NSArray items); + [DesignatedInitializer] [Export ("initWithFrame:")] IntPtr Constructor (CGRect frame); + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("initWithFrame:actions:")] + IntPtr Constructor (CGRect frame, UIAction [] actions); + + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("insertSegmentWithAction:atIndex:animated:")] + void InsertSegment (UIAction action, nuint segment, bool animated); + + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("setAction:forSegmentAtIndex:")] + void SetAction (UIAction action, nuint segment); + + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("actionForSegmentAtIndex:")] + [return: NullAllowed] + UIAction GetAction (nuint segment); + + [NoWatch, TV (14,0), iOS (14,0)] + [Export ("segmentIndexForActionIdentifier:")] + nint GetSegmentIndex (string actionIdentifier); + [Export ("segmentedControlStyle")] [NoTV][NoWatch] [Availability (Deprecated = Platform.iOS_7_0, Message = "The 'SegmentedControlStyle' property no longer has any effect.")] @@ -11407,7 +11772,11 @@ interface UIStringAttributeKey { [iOS (7,0)] [Field ("NSWritingDirectionAttributeName")] NSString WritingDirection { get; } - + + [TV (14,0), Watch (7,0), iOS (14,0)] + [Field ("NSTrackingAttributeName")] + NSString Tracking { get; } + // // These are internal, if we choose to expose these, we should // put them on a better named class @@ -11529,7 +11898,20 @@ interface UISwitch : NSCoding { [Appearance] [NullAllowed] [Export ("offImage", ArgumentSemantic.Retain)] - UIImage OffImage { get; set; } + UIImage OffImage { get; set; } + + [NoTV, iOS (14,0)] + [NullAllowed] + [Export ("title")] + string Title { get; set; } + + [NoTV, iOS (14,0)] + [Export ("style")] + UISwitchStyle Style { get; } + + [NoTV, iOS (14,0)] + [Export ("preferredStyle", ArgumentSemantic.Assign)] + UISwitchStyle PreferredStyle { get; set; } } [BaseType (typeof (UIView), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UITabBarDelegate)})] @@ -12166,6 +12548,14 @@ interface UITableView : NSCoding, UIDataSourceTranslating [TV (11,0), iOS (11,0)] [Export ("insetsContentViewsToSafeArea")] bool InsetsContentViewsToSafeArea { get; set; } + + [NoWatch, NoTV, iOS (14,0)] + [Export ("selectionFollowsFocus")] + bool SelectionFollowsFocus { get; set; } + + [NoWatch, NoTV, NoiOS] + [Export ("contextMenuInteraction")] + UIContextMenuInteraction ContextMenuInteraction { get; } } interface IUITableViewDataSourcePrefetching {} @@ -12412,6 +12802,14 @@ interface UITableViewSource { [Export ("tableView:willPerformPreviewActionForMenuWithConfiguration:animator:")] void WillPerformPreviewAction (UITableView tableView, UIContextMenuConfiguration configuration, IUIContextMenuInteractionCommitAnimating animator); + [NoWatch, NoTV, iOS (14,0)] + [Export ("tableView:willDisplayContextMenuWithConfiguration:animator:")] + void WillDisplayContextMenu (UITableView tableView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); + + [NoWatch, NoTV, iOS (14,0)] + [Export ("tableView:willEndContextMenuInteractionWithConfiguration:animator:")] + void WillEndContextMenuInteraction (UITableView tableView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); + // WARNING: If you add more methods here, add them to UITableViewControllerDelegate as well. } @@ -12424,17 +12822,52 @@ interface UITableViewCell : NSCoding, UIGestureRecognizerDelegate { [Export ("initWithStyle:reuseIdentifier:")] IntPtr Constructor (UITableViewCellStyle style, [NullAllowed] NSString reuseIdentifier); + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("configurationState")] + UICellConfigurationState ConfigurationState { get; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("setNeedsUpdateConfiguration")] + void SetNeedsUpdateConfiguration (); + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("updateConfigurationUsingState:")] + void UpdateConfiguration (UICellConfigurationState state); + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("defaultContentConfiguration")] + UIListContentConfiguration DefaultContentConfiguration { get; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [NullAllowed, Export ("contentConfiguration", ArgumentSemantic.Copy)] + IUIContentConfiguration ContentConfiguration { get; set; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("automaticallyUpdatesContentConfiguration")] + bool AutomaticallyUpdatesContentConfiguration { get; set; } + + [Export ("contentView", ArgumentSemantic.Retain)] + UIView ContentView { get; } + + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'UIListContentConfiguration' instead.")] [Export ("imageView", ArgumentSemantic.Retain)] UIImageView ImageView { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'UIListContentConfiguration' instead.")] [Export ("textLabel", ArgumentSemantic.Retain)] UILabel TextLabel { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'UIListContentConfiguration' instead.")] [Export ("detailTextLabel", ArgumentSemantic.Retain)] UILabel DetailTextLabel { get; } - [Export ("contentView", ArgumentSemantic.Retain)] - UIView ContentView { get; } + [Watch (7,0), TV (14,0), iOS (14,0)] + [NullAllowed, Export ("backgroundConfiguration", ArgumentSemantic.Copy)] + UIBackgroundConfiguration BackgroundConfiguration { get; set; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("automaticallyUpdatesBackgroundConfiguration")] + bool AutomaticallyUpdatesBackgroundConfiguration { get; set; } [Export ("backgroundView", ArgumentSemantic.Retain), NullAllowed] UIView BackgroundView { get; set; } @@ -12781,6 +13214,14 @@ interface UITableViewDelegate { [NoWatch, NoTV, iOS (13,0)] [Export ("tableView:willPerformPreviewActionForMenuWithConfiguration:animator:")] void WillPerformPreviewAction (UITableView tableView, UIContextMenuConfiguration configuration, IUIContextMenuInteractionCommitAnimating animator); + + [NoWatch, NoTV, iOS (14,0)] + [Export ("tableView:willDisplayContextMenuWithConfiguration:animator:")] + void WillDisplayContextMenu (UITableView tableView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); + + [NoWatch, NoTV, iOS (14,0)] + [Export ("tableView:willEndContextMenuInteractionWithConfiguration:animator:")] + void WillEndContextMenuInteraction (UITableView tableView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); } [BaseType (typeof (UIView))] @@ -12788,15 +13229,49 @@ interface UITableViewHeaderFooterView : UIAppearance, NSCoding { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frame); + [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [Export ("configurationState")] + UIViewConfigurationState ConfigurationState { get; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("setNeedsUpdateConfiguration")] + void SetNeedsUpdateConfiguration (); + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("updateConfigurationUsingState:")] + void UpdateConfiguration (UIViewConfigurationState state); + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("defaultContentConfiguration")] + UIListContentConfiguration DefaultContentConfiguration { get; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [NullAllowed, Export ("contentConfiguration", ArgumentSemantic.Copy)] + IUIContentConfiguration ContentConfiguration { get; set; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("automaticallyUpdatesContentConfiguration")] + bool AutomaticallyUpdatesContentConfiguration { get; set; } + + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("textLabel", ArgumentSemantic.Retain)] UILabel TextLabel { get; } + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("detailTextLabel", ArgumentSemantic.Retain)] UILabel DetailTextLabel { get; } [Export ("contentView", ArgumentSemantic.Retain)] UIView ContentView { get; } + [Watch (7,0), TV (14,0), iOS (14,0)] + [NullAllowed, Export ("backgroundConfiguration", ArgumentSemantic.Copy)] + UIBackgroundConfiguration BackgroundConfiguration { get; set; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("automaticallyUpdatesBackgroundConfiguration")] + bool AutomaticallyUpdatesBackgroundConfiguration { get; set; } + [NullAllowed] // by default this property is null [Export ("backgroundView", ArgumentSemantic.Retain)] UIView BackgroundView { get; set; } @@ -14002,6 +14477,11 @@ [Static] [Export ("areAnimationsEnabled")] [Export ("focused")] bool Focused { [Bind ("isFocused")] get; } + [NullAllowed] + [NoWatch, NoTV, iOS (14,0)] + [Export ("focusGroupIdentifier")] + new string FocusGroupIdentifier { get; set; } + [iOS (9,0)] // added in Xcode 7.1 / iOS 9.1 SDK [Export ("canBecomeFocused")] new bool CanBecomeFocused { get; } @@ -14718,6 +15198,20 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer [TV (13,0), NoWatch, iOS (13,0)] [Export ("performsActionsWhilePresentingModally")] bool PerformsActionsWhilePresentingModally { get; } + + // From UIViewController (UIPointerLockSupport) category + + [NoWatch, NoTV, iOS (14,0)] + [NullAllowed, Export ("childViewControllerForPointerLock")] + UIViewController ChildViewControllerForPointerLock { get; } + + [NoWatch, NoTV, iOS (14,0)] + [Export ("prefersPointerLocked")] + bool PrefersPointerLocked { get; } + + [NoWatch, NoTV, iOS (14,0)] + [Export ("setNeedsUpdateOfPrefersPointerLocked")] + void SetNeedsUpdateOfPrefersPointerLocked (); } [iOS (7,0)] @@ -14916,6 +15410,15 @@ partial interface UITraitCollection : NSCopying, NSSecureCoding { [Export ("legibilityWeight")] UILegibilityWeight LegibilityWeight { get; } + [Watch (7,0), TV (14,0), iOS (14,0)] + [Static] + [Export ("traitCollectionWithActiveAppearance:")] + UITraitCollection FromActiveAppearance (UIUserInterfaceActiveAppearance userInterfaceActiveAppearance); // We have other From* methods + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("activeAppearance")] + UIUserInterfaceActiveAppearance ActiveAppearance { get; } + // From UITraitCollection (CurrentTraitCollection) [TV (13, 0), NoWatch, iOS (13, 0)] @@ -15414,10 +15917,49 @@ interface UITextContentType { [BaseType (typeof (UIViewController), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UISplitViewControllerDelegate)})] interface UISplitViewController { + [DesignatedInitializer] [Export ("initWithNibName:bundle:")] [PostGet ("NibBundle")] IntPtr Constructor ([NullAllowed] string nibName, [NullAllowed] NSBundle bundle); + [TV (14,0), iOS (14,0)] + [Export ("initWithStyle:")] + [DesignatedInitializer] + IntPtr Constructor (UISplitViewControllerStyle style); + + [TV (14,0), iOS (14,0)] + [Export ("style")] + UISplitViewControllerStyle Style { get; } + + [TV (14,0), iOS (14,0)] + [Export ("showsSecondaryOnlyButton")] + bool ShowsSecondaryOnlyButton { get; set; } + + [TV (14,0), iOS (14,0)] + [Export ("preferredSplitBehavior", ArgumentSemantic.Assign)] + UISplitViewControllerSplitBehavior PreferredSplitBehavior { get; set; } + + [TV (14,0), iOS (14,0)] + [Export ("splitBehavior")] + UISplitViewControllerSplitBehavior SplitBehavior { get; } + + [TV (14,0), iOS (14,0)] + [Export ("setViewController:forColumn:")] + void SetViewController ([NullAllowed] UIViewController viewController, UISplitViewControllerColumn column); + + [TV (14,0), iOS (14,0)] + [Export ("viewControllerForColumn:")] + [return: NullAllowed] + UIViewController GetViewController (UISplitViewControllerColumn column); + + [TV (14,0), iOS (14,0)] + [Export ("hideColumn:")] + void HideColumn (UISplitViewControllerColumn column); + + [TV (14,0), iOS (14,0)] + [Export ("showColumn:")] + void ShowColumn (UISplitViewControllerColumn column); + [Export ("viewControllers", ArgumentSemantic.Copy)] [PostGet ("ChildViewControllers")] UIViewController [] ViewControllers { get; set; } @@ -15450,6 +15992,10 @@ interface UISplitViewController { [iOS (8,0)] [Export ("preferredPrimaryColumnWidthFraction", ArgumentSemantic.UnsafeUnretained)] nfloat PreferredPrimaryColumnWidthFraction { get; set; } + + [TV (14,0), iOS (14,0)] + [Export ("preferredPrimaryColumnWidth")] + nfloat PreferredPrimaryColumnWidth { get; set; } [iOS (8,0)] [Export ("minimumPrimaryColumnWidth", ArgumentSemantic.UnsafeUnretained)] @@ -15462,7 +16008,27 @@ interface UISplitViewController { [iOS (8,0)] [Export ("primaryColumnWidth")] nfloat PrimaryColumnWidth { get; } - + + [TV (14,0), iOS (14,0)] + [Export ("preferredSupplementaryColumnWidthFraction")] + nfloat PreferredSupplementaryColumnWidthFraction { get; set; } + + [TV (14,0), iOS (14,0)] + [Export ("preferredSupplementaryColumnWidth")] + nfloat PreferredSupplementaryColumnWidth { get; set; } + + [TV (14,0), iOS (14,0)] + [Export ("minimumSupplementaryColumnWidth")] + nfloat MinimumSupplementaryColumnWidth { get; set; } + + [TV (14,0), iOS (14,0)] + [Export ("maximumSupplementaryColumnWidth")] + nfloat MaximumSupplementaryColumnWidth { get; set; } + + [TV (14,0), iOS (14,0)] + [Export ("supplementaryColumnWidth")] + nfloat SupplementaryColumnWidth { get; } + [iOS (8,0)] [Export ("displayModeButtonItem")] UIBarButtonItem DisplayModeButtonItem { get; } @@ -15553,6 +16119,38 @@ interface UISplitViewControllerDelegate { [iOS (8,0)] [Export ("splitViewController:separateSecondaryViewControllerFromPrimaryViewController:"), DelegateName("UISplitViewControllerGetSecondaryViewController"), DefaultValue(null)] UIViewController SeparateSecondaryViewController (UISplitViewController splitViewController, UIViewController primaryViewController); + + [TV (14,0), iOS (14,0)] + [Export ("splitViewController:topColumnForCollapsingToProposedTopColumn:"), DelegateName ("UISplitViewControllerGetTopColumnForCollapsing"), DefaultValueFromArgument ("proposedTopColumn")] + UISplitViewControllerColumn GetTopColumnForCollapsing (UISplitViewController splitViewController, UISplitViewControllerColumn proposedTopColumn); + + [TV (14,0), iOS (14,0)] + [Export ("splitViewController:displayModeForExpandingToProposedDisplayMode:"), DelegateName ("UISplitViewControllerGetDisplayModeForExpanding"), DefaultValueFromArgument ("proposedDisplayMode")] + UISplitViewControllerDisplayMode GetDisplayModeForExpanding (UISplitViewController splitViewController, UISplitViewControllerDisplayMode proposedDisplayMode); + + [TV (14,0), iOS (14,0)] + [Export ("splitViewControllerDidCollapse:"), EventArgs ("UISplitViewControllerDidExpandCollapse")] + void DidCollapse (UISplitViewController splitViewController); + + [TV (14,0), iOS (14,0)] + [Export ("splitViewControllerDidExpand:"), EventArgs ("UISplitViewControllerDidExpandCollapse")] + void DidExpand (UISplitViewController splitViewController); + + [TV (14,0), iOS (14,0)] + [Export ("splitViewController:willShowColumn:"), EventArgs ("UISplitViewControllerWillShowHideColumn")] + void WillShowColumn (UISplitViewController splitViewController, UISplitViewControllerColumn column); + + [TV (14,0), iOS (14,0)] + [Export ("splitViewController:willHideColumn:"), EventArgs ("UISplitViewControllerWillShowHideColumn")] + void WillHideColumn (UISplitViewController splitViewController, UISplitViewControllerColumn column); + + [TV (14,0), iOS (14,0)] + [Export ("splitViewControllerInteractivePresentationGestureWillBegin:")] + void InteractivePresentationGestureWillBegin (UISplitViewController svc); + + [TV (14,0), iOS (14,0)] + [Export ("splitViewControllerInteractivePresentationGestureDidEnd:")] + void InteractivePresentationGestureDidEnd (UISplitViewController svc); } [Category] @@ -16915,6 +17513,7 @@ partial interface UIUserNotificationAction : NSCopying, NSMutableCopying, NSSecu NSString ResponseTypedTextKey { get; } } #else +#if !XAMCORE_4_0 // No longer present in watchOS 7.0 [Watch (2,0)] [Static] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UserNotifications.UNNotificationAction' or 'UserNotifications.UNTextInputNotificationAction' instead.")] @@ -16923,6 +17522,7 @@ interface UIUserNotificationAction { [Field ("UIUserNotificationActionResponseTypedTextKey")] NSString ResponseTypedTextKey { get; } } +#endif // !XAMCORE_4_0 #endif [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UserNotifications.UNNotificationAction' instead.")] @@ -17012,20 +17612,41 @@ partial interface UIDocumentMenuDelegate { [DisableDefaultCtor] // NSInvalidArgumentException Reason: You cannot initialize a UIDocumentPickerViewController except by the initWithDocumentTypes:inMode: and initWithURL:inMode: initializers partial interface UIDocumentPickerViewController : NSCoding { + [Deprecated (PlatformName.iOS, 14, 0)] [DesignatedInitializer] [Export ("initWithDocumentTypes:inMode:")] IntPtr Constructor (string [] allowedUTIs, UIDocumentPickerMode mode); - [Advice ("This method will be deprecated in a future release and should be avoided. Instead, use 'UIDocumentPickerViewController (NSUrl[], UIDocumentPickerMode)'.")] + [NoTV, iOS (14,0)] + [Export ("initForOpeningContentTypes:asCopy:")] + [DesignatedInitializer] + IntPtr Constructor (UTType[] contentTypes, bool asCopy); + + [NoTV, iOS (14,0)] + [Export ("initForOpeningContentTypes:")] + IntPtr Constructor (UTType[] contentTypes); + + [Deprecated (PlatformName.iOS, 14, 0)] + [Advice ("Use 'UTType' constructor overloads.")] [DesignatedInitializer] [Export ("initWithURL:inMode:")] IntPtr Constructor (NSUrl url, UIDocumentPickerMode mode); + [Deprecated (PlatformName.iOS, 14, 0)] [iOS (11,0)] [Export ("initWithURLs:inMode:")] [DesignatedInitializer] IntPtr Constructor (NSUrl[] urls, UIDocumentPickerMode mode); + [NoTV, iOS (14,0)] + [Export ("initForExportingURLs:asCopy:")] + [DesignatedInitializer] + IntPtr Constructor (NSUrl[] urls, bool asCopy); + + [NoTV, iOS (14,0)] + [Export ("initForExportingURLs:")] + IntPtr Constructor (NSUrl[] urls); + [Export ("delegate", ArgumentSemantic.Weak), NullAllowed] NSObject WeakDelegate { get; set; } @@ -17033,6 +17654,7 @@ partial interface UIDocumentPickerViewController : NSCoding { [Protocolize] UIDocumentPickerDelegate Delegate { get; set; } + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("documentPickerMode", ArgumentSemantic.Assign)] UIDocumentPickerMode DocumentPickerMode { get; } @@ -17070,6 +17692,7 @@ partial interface UIDocumentPickerDelegate { void WasCancelled (UIDocumentPickerViewController controller); } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use enumeration based 'NSFileProviderExtension' instead.")] [NoWatch] [NoTV] [iOS (8,0)] @@ -17573,6 +18196,10 @@ interface UIFocusEnvironment { #endif [NullAllowed, Export ("focusItemContainer")] IUIFocusItemContainer FocusItemContainer { get; } + + [NoTV, iOS (14,0)] + [Export ("focusGroupIdentifier")] + string FocusGroupIdentifier { get; } } [TV (12,0), iOS (12,0)] @@ -18778,10 +19405,16 @@ interface UIPasteConfigurationSupporting { [iOS (11,0)] [BaseType (typeof(UIViewController))] interface UIDocumentBrowserViewController : NSCoding { + [Deprecated (PlatformName.iOS, 14, 0)] [Export ("initForOpeningFilesWithContentTypes:")] [DesignatedInitializer] IntPtr Constructor ([NullAllowed] string[] allowedContentTypes); + [iOS (14,0)] + [Export ("initForOpeningContentTypes:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] UTType [] contentTypes); + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] IUIDocumentBrowserViewControllerDelegate Delegate { get; set; } @@ -18791,13 +19424,19 @@ interface UIDocumentBrowserViewController : NSCoding { [Export ("allowsPickingMultipleItems")] bool AllowsPickingMultipleItems { get; set; } + [Deprecated (PlatformName.iOS, 14, 0, message: "No longer supported.")] [Export ("allowedContentTypes", ArgumentSemantic.Copy)] string[] AllowedContentTypes { get; } + [Deprecated (PlatformName.iOS, 14, 0)] [iOS (13,0)] [Export ("recentDocumentsContentTypes", ArgumentSemantic.Copy)] string [] RecentDocumentsContentTypes { get; } + [iOS (14,0)] + [Export ("contentTypesForRecentDocuments", ArgumentSemantic.Copy)] + UTType [] ContentTypesForRecentDocuments { get; } + [iOS (13,0)] [Export ("shouldShowFileExtensions")] bool ShouldShowFileExtensions { get; set; } @@ -19013,6 +19652,11 @@ interface UIPencilInteraction : UIInteraction { [Export ("preferredTapAction")] UIPencilPreferredAction PreferredTapAction { get; } + [iOS (14,0)] + [Static] + [Export ("prefersPencilOnlyDrawing")] + bool PrefersPencilOnlyDrawing { get; } + [Wrap ("WeakDelegate")] [NullAllowed] IUIPencilInteractionDelegate Delegate { get; set; } @@ -19125,6 +19769,12 @@ interface UIScene { [Field ("UISceneDidEnterBackgroundNotification")] [Notification] NSString DidEnterBackgroundNotification { get; } + + // UIScene (PointerLockState) category + + [NoWatch, NoTV, iOS (14,0)] + [NullAllowed, Export ("pointerLockState")] + UIPointerLockState PointerLockState { get; } } interface IUISceneDelegate { } @@ -19190,6 +19840,11 @@ interface UISceneActivationRequestOptions { [NullAllowed, Export ("requestingScene", ArgumentSemantic.Strong)] UIScene RequestingScene { get; set; } + + [Introduced (PlatformName.MacCatalyst, 10, 14)] + [NoWatch, NoTV, NoiOS] + [Export ("collectionJoinBehavior", ArgumentSemantic.Assign)] + UISceneCollectionJoinBehavior CollectionJoinBehavior { get; set; } } [iOS (13,0), TV (13,0), NoWatch] @@ -19325,10 +19980,10 @@ interface UISceneSession : NSSecureCoding { Default, [Field ("UIFontDescriptorSystemDesignRounded")] Rounded, - [NoWatch] + [Watch (7,0)] [Field ("UIFontDescriptorSystemDesignSerif")] Serif, - [NoWatch] + [Watch (7,0)] [Field ("UIFontDescriptorSystemDesignMonospaced")] Monospaced, } @@ -19430,6 +20085,10 @@ interface UICollectionViewCompositionalLayoutConfiguration : NSCopying { [Export ("boundarySupplementaryItems", ArgumentSemantic.Copy)] NSCollectionLayoutBoundarySupplementaryItem [] BoundarySupplementaryItems { get; set; } + + [Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("contentInsetsReference", ArgumentSemantic.Assign)] + UIContentInsetsReference ContentInsetsReference { get; set; } } [NoWatch, TV (13,0), iOS (13,0)] @@ -19454,6 +20113,13 @@ interface UICollectionViewCompositionalLayout { [Export ("configuration", ArgumentSemantic.Copy)] UICollectionViewCompositionalLayoutConfiguration Configuration { get; set; } + + // UICollectionViewCompositionalLayout (UICollectionLayoutListSection) category + + [TV (14,0), iOS (14,0)] + [Static] + [Export ("layoutWithListConfiguration:")] + UICollectionViewCompositionalLayout GetLayout (UICollectionLayoutListConfiguration listConfiguration); } [NoWatch, TV (13,0), iOS (13,0)] @@ -19474,6 +20140,10 @@ interface NSCollectionLayoutSection : NSCopying { [Export ("interGroupSpacing")] nfloat InterGroupSpacing { get; set; } + [TV (14,0), iOS (14,0)] + [Export ("contentInsetsReference", ArgumentSemantic.Assign)] + UIContentInsetsReference ContentInsetsReference { get; set; } + [Export ("orthogonalScrollingBehavior", ArgumentSemantic.Assign)] UICollectionLayoutSectionOrthogonalScrollingBehavior OrthogonalScrollingBehavior { get; set; } @@ -19488,6 +20158,12 @@ interface NSCollectionLayoutSection : NSCopying { [Export ("decorationItems", ArgumentSemantic.Copy)] NSCollectionLayoutDecorationItem [] DecorationItems { get; set; } + + // NSCollectionLayoutSection (UICollectionLayoutListSection) category + [TV (14,0), iOS (14,0)] + [Static] + [Export ("sectionWithListConfiguration:layoutEnvironment:")] + NSCollectionLayoutSection GetSection (UICollectionLayoutListConfiguration listConfiguration, INSCollectionLayoutEnvironment layoutEnvironment); } [NoWatch, TV (13,0), iOS (13,0)] @@ -20630,6 +21306,26 @@ interface UICollectionViewDiffableDataSource ReorderingHandlers { get; set; } + + [TV (14,0), iOS (14,0)] + [Export ("applySnapshot:toSection:animatingDifferences:")] + void ApplySnapshot (NSDiffableDataSourceSectionSnapshot snapshot, SectionIdentifierType sectionIdentifier, bool animatingDifferences); + + [TV (14,0), iOS (14,0)] + [Export ("applySnapshot:toSection:animatingDifferences:completion:")] + void ApplySnapshot (NSDiffableDataSourceSectionSnapshot snapshot, SectionIdentifierType sectionIdentifier, bool animatingDifferences, [NullAllowed] Action completion); + + [TV (14,0), iOS (14,0)] + [Export ("snapshotForSection:")] + NSDiffableDataSourceSectionSnapshot GetSnapshot (SectionIdentifierType section); + + [TV (14,0), iOS (14,0)] + [Export ("sectionSnapshotHandlers", ArgumentSemantic.Copy)] + UICollectionViewDiffableDataSourceSectionSnapshotHandlers SectionSnapshotHandlers { get; set; } } [NoWatch, TV (13,0), iOS (13,0)] @@ -20967,4 +21663,1089 @@ interface UIPointerShape : NSCopying { UIPointerShape CreateBeam (nfloat preferredLength, UIAxis axis); } + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + interface NSDiffableDataSourceSectionSnapshot : NSCopying + where ItemIdentifierType : NSObject { + + [Export ("appendItems:")] + void AppendItems (ItemIdentifierType [] items); + + [Export ("appendItems:intoParentItem:")] + void AppendItems (ItemIdentifierType [] items, [NullAllowed] ItemIdentifierType parentItem); + + [Export ("insertItems:beforeItem:")] + void InsertItemsBefore (ItemIdentifierType [] items, ItemIdentifierType beforeIdentifier); + + [Export ("insertItems:afterItem:")] + void InsertItemsAfter (ItemIdentifierType [] items, ItemIdentifierType afterIdentifier); + + [Export ("deleteItems:")] + void DeleteItems (ItemIdentifierType [] items); + + [Export ("deleteAllItems")] + void DeleteAllItems (); + + [Export ("expandItems:")] + void ExpandItems (ItemIdentifierType [] items); + + [Export ("collapseItems:")] + void CollapseItems (ItemIdentifierType [] items); + + [Export ("replaceChildrenOfParentItem:withSnapshot:")] + void ReplaceChildren (ItemIdentifierType parentItem, NSDiffableDataSourceSectionSnapshot snapshot); + + [Export ("insertSnapshot:beforeItem:")] + void InsertSnapshotBeforeItem (NSDiffableDataSourceSectionSnapshot snapshot, ItemIdentifierType item); + + [Export ("insertSnapshot:afterItem:")] + ItemIdentifierType InsertSnapshotAfterItem (NSDiffableDataSourceSectionSnapshot snapshot, ItemIdentifierType item); + + [Export ("isExpanded:")] + bool IsExpanded (ItemIdentifierType item); + + [Export ("isVisible:")] + bool IsVisible (ItemIdentifierType item); + + [Export ("containsItem:")] + bool ContainsItem (ItemIdentifierType item); + + [Export ("levelOfItem:")] + nint GetLevel (ItemIdentifierType item); + + [Export ("indexOfItem:")] + nint GetIndex (ItemIdentifierType item); + + [Export ("expandedItems")] + ItemIdentifierType [] ExpandedItems { get; } + + [Export ("parentOfChildItem:")] + [return: NullAllowed] + ItemIdentifierType GetParent (ItemIdentifierType ofChildItem); + + [Export ("snapshotOfParentItem:")] + NSDiffableDataSourceSectionSnapshot GetSnapshot (ItemIdentifierType parentItem); + + [Export ("snapshotOfParentItem:includingParentItem:")] + NSDiffableDataSourceSectionSnapshot GetSnapshot (ItemIdentifierType parentItem, bool includingParentItem); + + [Export ("items", ArgumentSemantic.Strong)] + ItemIdentifierType [] Items { get; } + + [Export ("rootItems", ArgumentSemantic.Strong)] + ItemIdentifierType [] RootItems { get; } + + [Export ("visibleItems", ArgumentSemantic.Strong)] + ItemIdentifierType [] VisibleItems { get; } + + [Export ("visualDescription")] + string VisualDescription { get; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UIBackgroundConfiguration : NSCopying, NSSecureCoding { + + [Static] + [Export ("clearConfiguration")] + UIBackgroundConfiguration ClearConfiguration { get; } + + [Static] + [Export ("listPlainCellConfiguration")] + UIBackgroundConfiguration ListPlainCellConfiguration { get; } + + [Static] + [Export ("listPlainHeaderFooterConfiguration")] + UIBackgroundConfiguration ListPlainHeaderFooterConfiguration { get; } + + [Static] + [Export ("listGroupedCellConfiguration")] + UIBackgroundConfiguration ListGroupedCellConfiguration { get; } + + [Static] + [Export ("listGroupedHeaderFooterConfiguration")] + UIBackgroundConfiguration ListGroupedHeaderFooterConfiguration { get; } + + [NoTV] + [Static] + [Export ("listSidebarHeaderConfiguration")] + UIBackgroundConfiguration ListSidebarHeaderConfiguration { get; } + + [NoTV] + [Static] + [Export ("listSidebarCellConfiguration")] + UIBackgroundConfiguration ListSidebarCellConfiguration { get; } + + [NoWatch, NoTV] + [Static] + [Export ("listAccompaniedSidebarCellConfiguration")] + UIBackgroundConfiguration ListAccompaniedSidebarCellConfiguration { get; } + + [Export ("updatedConfigurationForState:")] + UIBackgroundConfiguration GetUpdatedConfiguration (IUIConfigurationState state); + + [NullAllowed, Export ("customView", ArgumentSemantic.Strong)] + UIView CustomView { get; set; } + + [Export ("cornerRadius")] + nfloat CornerRadius { get; set; } + + [Export ("backgroundInsets", ArgumentSemantic.Assign)] + NSDirectionalEdgeInsets BackgroundInsets { get; set; } + + [Export ("edgesAddingLayoutMarginsToBackgroundInsets", ArgumentSemantic.Assign)] + NSDirectionalRectEdge EdgesAddingLayoutMarginsToBackgroundInsets { get; set; } + + [NullAllowed, Export ("backgroundColor", ArgumentSemantic.Strong)] + UIColor BackgroundColor { get; set; } + + [NullAllowed, Export ("backgroundColorTransformer", ArgumentSemantic.Copy)] + UIConfigurationColorTransformerHandler BackgroundColorTransformer { get; set; } + + [Export ("resolvedBackgroundColorForTintColor:")] + UIColor GetResolvedBackgroundColor (UIColor tintColor); + + [NullAllowed, Export ("visualEffect", ArgumentSemantic.Copy)] + UIVisualEffect VisualEffect { get; set; } + + [NullAllowed, Export ("strokeColor", ArgumentSemantic.Strong)] + UIColor StrokeColor { get; set; } + + [NullAllowed, Export ("strokeColorTransformer", ArgumentSemantic.Copy)] + UIConfigurationColorTransformerHandler StrokeColorTransformer { get; set; } + + [Export ("resolvedStrokeColorForTintColor:")] + UIColor GetResolvedStrokeColor (UIColor tintColor); + + [Export ("strokeWidth")] + nfloat StrokeWidth { get; set; } + + [Export ("strokeOutset")] + nfloat StrokeOutset { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DesignatedDefaultCtor] + interface UICellAccessory : NSCopying, NSSecureCoding { + + [Field ("UICellAccessoryStandardDimension")] + nfloat StandardDimension { get; } + + [Export ("displayedState", ArgumentSemantic.Assign)] + UICellAccessoryDisplayedState DisplayedState { get; set; } + + [Export ("hidden")] + bool IsHidden { [Bind ("isHidden")] get; set; } + + [Export ("reservedLayoutWidth")] + nfloat ReservedLayoutWidth { get; set; } + + [NullAllowed, Export ("tintColor", ArgumentSemantic.Strong)] + UIColor TintColor { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UICellAccessory))] + interface UICellAccessoryDisclosureIndicator { + + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UICellAccessory))] + interface UICellAccessoryCheckmark { + + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UICellAccessory))] + interface UICellAccessoryDelete { + + [NullAllowed, Export ("backgroundColor", ArgumentSemantic.Strong)] + UIColor BackgroundColor { get; set; } + + [NullAllowed, Export ("actionHandler", ArgumentSemantic.Copy)] + Action ActionHandler { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UICellAccessory))] + interface UICellAccessoryInsert { + + [NullAllowed, Export ("backgroundColor", ArgumentSemantic.Strong)] + UIColor BackgroundColor { get; set; } + + [NullAllowed, Export ("actionHandler", ArgumentSemantic.Copy)] + Action ActionHandler { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UICellAccessory))] + interface UICellAccessoryReorder { + + [Export ("showsVerticalSeparator")] + bool ShowsVerticalSeparator { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UICellAccessory))] + interface UICellAccessoryMultiselect { + + [NullAllowed, Export ("backgroundColor", ArgumentSemantic.Strong)] + UIColor BackgroundColor { get; set; } + } + + [NoWatch, NoTV, iOS (14,0)] + [BaseType (typeof (UICellAccessory))] + interface UICellAccessoryOutlineDisclosure { + + [Export ("style", ArgumentSemantic.Assign)] + UICellAccessoryOutlineDisclosureStyle Style { get; set; } + + [NullAllowed, Export ("actionHandler", ArgumentSemantic.Copy)] + Action ActionHandler { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UICellAccessory))] + [DisableDefaultCtor] + interface UICellAccessoryLabel { + + [Export ("initWithText:")] + [DesignatedInitializer] + IntPtr Constructor (string text); + + [Export ("text")] + string Text { get; } + + [Export ("font", ArgumentSemantic.Strong)] + UIFont Font { get; set; } + + [Export ("adjustsFontForContentSizeCategory")] + bool AdjustsFontForContentSizeCategory { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + delegate nuint UICellAccessoryPosition (UICellAccessory [] accessories); + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UICellAccessory))] + [DisableDefaultCtor] + interface UICellAccessoryCustomView { + + [Export ("initWithCustomView:placement:")] + [DesignatedInitializer] + IntPtr Constructor (UIView customView, UICellAccessoryPlacement placement); + + [Export ("customView", ArgumentSemantic.Strong)] + UIView CustomView { get; } + + [Export ("placement")] + UICellAccessoryPlacement Placement { get; } + + [Export ("maintainsFixedSize")] + bool MaintainsFixedSize { get; set; } + + [NullAllowed, Export ("position", ArgumentSemantic.Copy)] + UICellAccessoryPosition Position { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UIViewConfigurationState))] + [DisableDefaultCtor] + interface UICellConfigurationState { + + [Export ("initWithTraitCollection:")] + [DesignatedInitializer] + IntPtr Constructor (UITraitCollection traitCollection); + + [Export ("editing")] + bool Editing { [Bind ("isEditing")] get; set; } + + [Export ("expanded")] + bool Expanded { [Bind ("isExpanded")] get; set; } + + [Export ("swiped")] + bool Swiped { [Bind ("isSwiped")] get; set; } + + [Export ("reordering")] + bool Reordering { [Bind ("isReordering")] get; set; } + + [NoWatch, NoTV] + [Export ("cellDragState", ArgumentSemantic.Assign)] + UICellConfigurationDragState CellDragState { get; set; } + + [NoWatch, NoTV] + [Export ("cellDropState", ArgumentSemantic.Assign)] + UICellConfigurationDropState CellDropState { get; set; } + } + + [NoTV] + delegate UISwipeActionsConfiguration UICollectionLayoutListSwipeActionsConfigurationProvider (NSIndexPath indexPath); + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UICollectionLayoutListConfiguration : NSCopying { + + [Export ("initWithAppearance:")] + [DesignatedInitializer] + IntPtr Constructor (UICollectionLayoutListAppearance appearance); + + [Export ("appearance")] + UICollectionLayoutListAppearance Appearance { get; } + + [NoTV] + [Export ("showsSeparators")] + bool ShowsSeparators { get; set; } + + [NullAllowed, Export ("backgroundColor", ArgumentSemantic.Assign)] + UIColor BackgroundColor { get; set; } + + [Export ("headerMode", ArgumentSemantic.Assign)] + UICollectionLayoutListHeaderMode HeaderMode { get; set; } + + [Export ("footerMode", ArgumentSemantic.Assign)] + UICollectionLayoutListFooterMode FooterMode { get; set; } + + [NoTV] + [NullAllowed] + [Export ("leadingSwipeActionsConfigurationProvider", ArgumentSemantic.Copy)] + UICollectionLayoutListSwipeActionsConfigurationProvider LeadingSwipeActionsConfigurationProvider { get; set; } + + [NoTV] + [NullAllowed] + [Export ("trailingSwipeActionsConfigurationProvider", ArgumentSemantic.Copy)] + UICollectionLayoutListSwipeActionsConfigurationProvider TrailingSwipeActionsConfigurationProvider { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + delegate void UICollectionViewCellRegistrationConfigurationHandler (UICollectionViewCell cell, NSIndexPath indexPath, NSObject item); + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UICollectionViewCellRegistration { + + [Static] + [Export ("registrationWithCellClass:configurationHandler:")] + UICollectionViewCellRegistration GetRegistration (Class cellClass, UICollectionViewCellRegistrationConfigurationHandler configurationHandler); + + [Static] + [Wrap ("GetRegistration (new Class (cellType), configurationHandler)")] + UICollectionViewCellRegistration GetRegistration (Type cellType, UICollectionViewCellRegistrationConfigurationHandler configurationHandler); + + [Static] + [Export ("registrationWithCellNib:configurationHandler:")] + UICollectionViewCellRegistration GetRegistration (UINib cellNib, UICollectionViewCellRegistrationConfigurationHandler configurationHandler); + + [NullAllowed, Export ("cellClass")] + Class CellClass { get; } + + [NullAllowed, Wrap ("Class.Lookup (CellClass)")] + Type CellType { get; } + + [NullAllowed, Export ("cellNib")] + UINib CellNib { get; } + + [Export ("configurationHandler")] + UICollectionViewCellRegistrationConfigurationHandler ConfigurationHandler { get; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + delegate void UICollectionViewSupplementaryRegistrationConfigurationHandler (UICollectionReusableView supplementaryView, string elementKind, NSIndexPath indexPath); + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UICollectionViewSupplementaryRegistration { + + [Static] + [Export ("registrationWithSupplementaryClass:elementKind:configurationHandler:")] + UICollectionViewSupplementaryRegistration GetRegistration (Class supplementaryClass, string elementKind, UICollectionViewSupplementaryRegistrationConfigurationHandler configurationHandler); + + [Static] + [Wrap ("GetRegistration (new Class (supplementaryType), elementKind, configurationHandler)")] + UICollectionViewSupplementaryRegistration GetRegistration (Type supplementaryType, string elementKind, UICollectionViewSupplementaryRegistrationConfigurationHandler configurationHandler); + + [Static] + [Export ("registrationWithSupplementaryNib:elementKind:configurationHandler:")] + UICollectionViewSupplementaryRegistration GetRegistration (UINib supplementaryNib, string elementKind, UICollectionViewSupplementaryRegistrationConfigurationHandler configurationHandler); + + [NullAllowed, Export ("supplementaryClass")] + Class SupplementaryClass { get; } + + [NullAllowed, Wrap ("Class.Lookup (SupplementaryClass)")] + Type SupplementaryType { get; } + + [NullAllowed, Export ("supplementaryNib")] + UINib SupplementaryNib { get; } + + [Export ("elementKind")] + string ElementKind { get; } + + [Export ("configurationHandler")] + UICollectionViewSupplementaryRegistrationConfigurationHandler ConfigurationHandler { get; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UICollectionViewCell))] + interface UICollectionViewListCell { + + [Export ("initWithFrame:")] + IntPtr Constructor (CGRect frame); + + [Export ("defaultContentConfiguration")] + UIListContentConfiguration DefaultContentConfiguration { get; } + + [Export ("indentationLevel")] + nint IndentationLevel { get; set; } + + [Export ("indentationWidth")] + nfloat IndentationWidth { get; set; } + + [Export ("indentsAccessories")] + bool IndentsAccessories { get; set; } + + [Export ("accessories", ArgumentSemantic.Copy)] + UICellAccessory [] Accessories { get; set; } + + [NoTV] + [Export ("separatorLayoutGuide")] + UILayoutGuide SeparatorLayoutGuide { get; } + } + + interface IUIColorPickerViewControllerDelegate { } + + [NoWatch, NoTV, iOS (14,0)] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface UIColorPickerViewControllerDelegate { + + [Export ("colorPickerViewControllerDidSelectColor:")] + void DidSelectColor (UIColorPickerViewController viewController); + + [Export ("colorPickerViewControllerDidFinish:")] + void DidFinish (UIColorPickerViewController viewController); + } + + [NoWatch, NoTV, iOS (14,0)] + [BaseType (typeof (UIViewController))] + [DesignatedDefaultCtor] + interface UIColorPickerViewController + { + [Export ("initWithNibName:bundle:")] + IntPtr Constructor ([NullAllowed] string nibName, [NullAllowed] NSBundle bundle); + + [Wrap ("WeakDelegate")] + [NullAllowed] + IUIColorPickerViewControllerDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [Export ("selectedColor", ArgumentSemantic.Strong)] + UIColor SelectedColor { get; set; } + + [Export ("supportsAlpha")] + bool SupportsAlpha { get; set; } + } + + [NoWatch, NoTV, iOS (14,0)] + [BaseType (typeof (UIControl))] + interface UIColorWell { + + [Export ("initWithFrame:")] + IntPtr Constructor (CGRect frame); + + [NullAllowed, Export ("title")] + string Title { get; set; } + + [Export ("supportsAlpha")] + bool SupportsAlpha { get; set; } + + [NullAllowed, Export ("selectedColor", ArgumentSemantic.Strong)] + UIColor SelectedColor { get; set; } + } + + interface IUIConfigurationState {} + + [NoWatch, TV (14,0), iOS (14,0)] + [Protocol] + interface UIConfigurationState : NSCopying, NSSecureCoding { + + // Needs to be manually inlined in adopting classes + // [Abstract] + // [Export ("initWithTraitCollection:")] + // IntPtr Constructor (UITraitCollection traitCollection); + + [Abstract] + [Export ("traitCollection", ArgumentSemantic.Strong)] + UITraitCollection TraitCollection { get; set; } + + [Abstract] + [Export ("customStateForKey:")] + [return: NullAllowed] + NSObject GetCustomState (string key); + + [Abstract] + [Export ("setCustomState:forKey:")] + void SetCustomState ([NullAllowed] NSObject customState, string key); + + [Abstract] + [Export ("objectForKeyedSubscript:")] + [return: NullAllowed] + NSObject GetObject (string key); + + [Abstract] + [Export ("setObject:forKeyedSubscript:")] + void SetObject ([NullAllowed] NSObject obj, string key); + } + + interface IUIContentConfiguration {} + + [NoWatch, TV (14,0), iOS (14,0)] + [Protocol] + interface UIContentConfiguration : NSCopying { + + [Abstract] + [Export ("makeContentView")] + IUIContentView MakeContentView (); + + [Abstract] + [Export ("updatedConfigurationForState:")] + IUIContentConfiguration GetUpdatedConfiguration (IUIConfigurationState state); + } + + interface IUIContentView {} + + [NoWatch, TV (14,0), iOS (14,0)] + [Protocol] + interface UIContentView { + + [Abstract] + [Export ("configuration", ArgumentSemantic.Copy)] + IUIContentConfiguration Configuration { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + delegate void UIDeferredMenuElementCompletionHandler (UIMenuElement [] elements); + + [NoWatch, TV (14,0), iOS (14,0)] + delegate void UIDeferredMenuElementProviderHandler ([BlockCallback] UIDeferredMenuElementCompletionHandler completion); + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UIMenuElement))] + [DisableDefaultCtor] + interface UIDeferredMenuElement { + + [Static] + [Export ("elementWithProvider:")] + UIDeferredMenuElement Create (UIDeferredMenuElementProviderHandler elementProvider); + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + interface NSDiffableDataSourceSectionTransaction + where SectionIdentifierType : NSObject + where ItemIdentifierType : NSObject { + + [Export ("sectionIdentifier")] + SectionIdentifierType SectionIdentifier { get; } + + [Export ("initialSnapshot")] + NSDiffableDataSourceSectionSnapshot InitialSnapshot { get; } + + [Export ("finalSnapshot")] + NSDiffableDataSourceSectionSnapshot FinalSnapshot { get; } + + // TODO: Enable when Foundation return type is bound + // [Export ("difference")] + // NSOrderedCollectionDifference Difference { get; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + interface NSDiffableDataSourceTransaction + where SectionIdentifierType : NSObject + where ItemIdentifierType : NSObject { + + [Export ("initialSnapshot")] + NSDiffableDataSourceSnapshot InitialSnapshot { get; } + + [Export ("finalSnapshot")] + NSDiffableDataSourceSnapshot FinalSnapshot { get; } + + // TODO: Enable when Foundation return type is bound + // [Export ("difference")] + // NSOrderedCollectionDifference Difference { get; } + + [Export ("sectionTransactions")] + NSDiffableDataSourceSectionTransaction [] SectionTransactions { get; } + } + + [NoWatch, NoTV, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UIIndirectScribbleInteraction : UIInteraction { + + [Export ("initWithDelegate:")] + [DesignatedInitializer] + IntPtr Constructor (IUIIndirectScribbleInteractionDelegate @delegate); + + [Wrap ("WeakDelegate")] + [NullAllowed] + IUIIndirectScribbleInteractionDelegate Delegate { get; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; } + + [Export ("handlingWriting")] + bool HandlingWriting { [Bind ("isHandlingWriting")] get; } + } + + interface IUIIndirectScribbleInteractionDelegate {} + + [NoWatch, NoTV, iOS (14,0)] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface UIIndirectScribbleInteractionDelegate { + + [Abstract] + [Export ("indirectScribbleInteraction:requestElementsInRect:completion:")] + void RequestElements (UIIndirectScribbleInteraction interaction, CGRect rect, Action completion); + + [Abstract] + [Export ("indirectScribbleInteraction:isElementFocused:")] + bool IsElementFocused (UIIndirectScribbleInteraction interaction, NSObject elementIdentifier); + + [Abstract] + [Export ("indirectScribbleInteraction:frameForElement:")] + CGRect GetFrameForElement (UIIndirectScribbleInteraction interaction, NSObject elementIdentifier); + + [Abstract] + [Export ("indirectScribbleInteraction:focusElementIfNeeded:referencePoint:completion:")] + void FocusElementIfNeeded (UIIndirectScribbleInteraction interaction, NSObject elementIdentifier, CGPoint focusReferencePoint, Action completion); + + [Export ("indirectScribbleInteraction:shouldDelayFocusForElement:")] + bool ShouldDelayFocus (UIIndirectScribbleInteraction interaction, NSObject elementIdentifier); + + [Export ("indirectScribbleInteraction:willBeginWritingInElement:")] + void WillBeginWriting (UIIndirectScribbleInteraction interaction, NSObject elementIdentifier); + + [Export ("indirectScribbleInteraction:didFinishWritingInElement:")] + void DidFinishWriting (UIIndirectScribbleInteraction interaction, NSObject elementIdentifier); + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UIListContentConfiguration : UIContentConfiguration, NSSecureCoding { + + [Static] + [Export ("cellConfiguration")] + UIListContentConfiguration CellConfiguration { get; } + + [Static] + [Export ("subtitleCellConfiguration")] + UIListContentConfiguration SubtitleCellConfiguration { get; } + + [Static] + [Export ("valueCellConfiguration")] + UIListContentConfiguration ValueCellConfiguration { get; } + + [Static] + [Export ("plainHeaderConfiguration")] + UIListContentConfiguration PlainHeaderConfiguration { get; } + + [Static] + [Export ("plainFooterConfiguration")] + UIListContentConfiguration PlainFooterConfiguration { get; } + + [Static] + [Export ("groupedHeaderConfiguration")] + UIListContentConfiguration GroupedHeaderConfiguration { get; } + + [Static] + [Export ("groupedFooterConfiguration")] + UIListContentConfiguration GroupedFooterConfiguration { get; } + + [NoTV] + [Static] + [Export ("sidebarCellConfiguration")] + UIListContentConfiguration SidebarCellConfiguration { get; } + + [NoTV] + [Static] + [Export ("sidebarSubtitleCellConfiguration")] + UIListContentConfiguration SidebarSubtitleCellConfiguration { get; } + + [NoTV] + [Static] + [Export ("accompaniedSidebarCellConfiguration")] + UIListContentConfiguration AccompaniedSidebarCellConfiguration { get; } + + [NoTV] + [Static] + [Export ("accompaniedSidebarSubtitleCellConfiguration")] + UIListContentConfiguration AccompaniedSidebarSubtitleCellConfiguration { get; } + + [NoTV] + [Static] + [Export ("sidebarHeaderConfiguration")] + UIListContentConfiguration SidebarHeaderConfiguration { get; } + + [NullAllowed, Export ("image", ArgumentSemantic.Strong)] + UIImage Image { get; set; } + + [Export ("imageProperties")] + UIListContentImageProperties ImageProperties { get; } + + [NullAllowed, Export ("text")] + string Text { get; set; } + + [NullAllowed, Export ("attributedText", ArgumentSemantic.Copy)] + NSAttributedString AttributedText { get; set; } + + [Export ("textProperties")] + UIListContentTextProperties TextProperties { get; } + + [NullAllowed, Export ("secondaryText")] + string SecondaryText { get; set; } + + [NullAllowed, Export ("secondaryAttributedText", ArgumentSemantic.Copy)] + NSAttributedString SecondaryAttributedText { get; set; } + + [Export ("secondaryTextProperties")] + UIListContentTextProperties SecondaryTextProperties { get; } + + [Export ("axesPreservingSuperviewLayoutMargins", ArgumentSemantic.Assign)] + UIAxis AxesPreservingSuperviewLayoutMargins { get; set; } + + [Export ("directionalLayoutMargins", ArgumentSemantic.Assign)] + NSDirectionalEdgeInsets DirectionalLayoutMargins { get; set; } + + [Export ("prefersSideBySideTextAndSecondaryText")] + bool PrefersSideBySideTextAndSecondaryText { get; set; } + + [Export ("imageToTextPadding")] + nfloat ImageToTextPadding { get; set; } + + [Export ("textToSecondaryTextHorizontalPadding")] + nfloat TextToSecondaryTextHorizontalPadding { get; set; } + + [Export ("textToSecondaryTextVerticalPadding")] + nfloat TextToSecondaryTextVerticalPadding { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (UIView))] + [DisableDefaultCtor] + interface UIListContentView : UIContentView { + + [Export ("initWithConfiguration:")] + [DesignatedInitializer] + IntPtr Constructor (UIListContentConfiguration configuration); + + // UIContentView interface wants IUIContentConfiguration, covariant types can't come soon enough + [Sealed, Export ("configuration", ArgumentSemantic.Copy)] + UIListContentConfiguration ListContentConfiguration { get; set; } + + [NullAllowed, Export ("textLayoutGuide", ArgumentSemantic.Strong)] + UILayoutGuide TextLayoutGuide { get; } + + [NullAllowed, Export ("secondaryTextLayoutGuide", ArgumentSemantic.Strong)] + UILayoutGuide SecondaryTextLayoutGuide { get; } + + [NullAllowed, Export ("imageLayoutGuide", ArgumentSemantic.Strong)] + UILayoutGuide ImageLayoutGuide { get; } + } + + delegate UIColor UIConfigurationColorTransformerHandler (UIColor color); + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UIListContentImageProperties : NSCopying, NSSecureCoding { + + [Field ("UIListContentImageStandardDimension")] + nfloat StandardDimension { get; } + + [NullAllowed, Export ("preferredSymbolConfiguration", ArgumentSemantic.Copy)] + UIImageSymbolConfiguration PreferredSymbolConfiguration { get; set; } + + [NullAllowed, Export ("tintColor", ArgumentSemantic.Strong)] + UIColor TintColor { get; set; } + + [NullAllowed, Export ("tintColorTransformer", ArgumentSemantic.Copy)] + UIConfigurationColorTransformerHandler TintColorTransformer { get; set; } + + [Export ("resolvedTintColorForTintColor:")] + UIColor GetResolvedTintColor (UIColor tintColor); + + [Export ("cornerRadius")] + nfloat CornerRadius { get; set; } + + [Export ("maximumSize", ArgumentSemantic.Assign)] + CGSize MaximumSize { get; set; } + + [Export ("reservedLayoutSize", ArgumentSemantic.Assign)] + CGSize ReservedLayoutSize { get; set; } + + [Export ("accessibilityIgnoresInvertColors")] + bool AccessibilityIgnoresInvertColors { get; set; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UIListContentTextProperties : NSCopying, NSSecureCoding { + + [Export ("font", ArgumentSemantic.Strong)] + UIFont Font { get; set; } + + [Export ("color", ArgumentSemantic.Strong)] + UIColor Color { get; set; } + + [NullAllowed, Export ("colorTransformer", ArgumentSemantic.Copy)] + UIConfigurationColorTransformerHandler ColorTransformer { get; set; } + + [Export ("resolvedColor")] + UIColor ResolvedColor { get; } + + [Export ("alignment", ArgumentSemantic.Assign)] + UIListContentTextAlignment Alignment { get; set; } + + [Export ("lineBreakMode", ArgumentSemantic.Assign)] + UILineBreakMode LineBreakMode { get; set; } + + [Export ("numberOfLines")] + nint NumberOfLines { get; set; } + + [Export ("adjustsFontSizeToFitWidth")] + bool AdjustsFontSizeToFitWidth { get; set; } + + [Export ("minimumScaleFactor")] + nfloat MinimumScaleFactor { get; set; } + + [Export ("allowsDefaultTighteningForTruncation")] + bool AllowsDefaultTighteningForTruncation { get; set; } + + [Export ("adjustsFontForContentSizeCategory")] + bool AdjustsFontForContentSizeCategory { get; set; } + + [Export ("transform", ArgumentSemantic.Assign)] + UIListContentTextTransform Transform { get; set; } + } + + interface UIPointerLockStateDidChangeEventArgs { + [NoWatch, NoTV, iOS (14,0)] + [NullAllowed] + [Export ("UIPointerLockStateSceneUserInfoKey")] + UIScene Scene { get; } + } + + [NoWatch, NoTV, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UIPointerLockState { + + [Field ("UIPointerLockStateDidChangeNotification")] + [Notification (typeof (UIPointerLockStateDidChangeEventArgs))] + NSString DidChangeNotification { get; } + + [Export ("locked")] + bool Locked { [Bind ("isLocked")] get; } + } + + [NoWatch, NoTV, iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UIScribbleInteraction : UIInteraction { + + [Export ("initWithDelegate:")] + [DesignatedInitializer] + IntPtr Constructor (IUIScribbleInteractionDelegate @delegate); + + [Wrap ("WeakDelegate")] + [NullAllowed] + IUIScribbleInteractionDelegate Delegate { get; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; } + + [Export ("handlingWriting")] + bool HandlingWriting { [Bind ("isHandlingWriting")] get; } + + [Static] + [Export ("pencilInputExpected")] + bool PencilInputExpected { [Bind ("isPencilInputExpected")] get; } + } + + interface IUIScribbleInteractionDelegate { } + + [NoWatch, NoTV, iOS (14,0)] + [Protocol, Model (AutoGeneratedName = true)] + [BaseType (typeof (NSObject))] + interface UIScribbleInteractionDelegate { + + [Export ("scribbleInteraction:shouldBeginAtLocation:")] + bool ShouldBegin (UIScribbleInteraction interaction, CGPoint location); + + [Export ("scribbleInteractionShouldDelayFocus:")] + bool ShouldDelayFocus (UIScribbleInteraction interaction); + + [Export ("scribbleInteractionWillBeginWriting:")] + void WillBeginWriting (UIScribbleInteraction interaction); + + [Export ("scribbleInteractionDidFinishWriting:")] + void DidFinishWriting (UIScribbleInteraction interaction); + } + + interface IUISearchSuggestion { } + + [TV (14,0), NoWatch, NoiOS] + [Protocol] + interface UISearchSuggestion { + + [Abstract] + [NullAllowed, Export ("localizedSuggestion")] + NSString LocalizedSuggestion { get; } + + [return: NullAllowed] + [Export ("localizedDescription")] + NSString GetLocalizedDescription (); + + [return: NullAllowed] + [Export ("iconImage")] + UIImage GetIconImage (); + } + + [NoWatch, TV (14,0), iOS (14,0)] + [Static, Partial] + interface UIConfigurationColorTransformer { + + // Manually bound inside UIKit/UIConfigurationColorTransformer.cs + [Internal] + [Field ("UIConfigurationColorTransformerGrayscale")] + IntPtr _Grayscale { get; } + + [Field ("UIConfigurationColorTransformerPreferredTint")] + IntPtr _PreferredTint { get; } + + [Field ("UIConfigurationColorTransformerMonochromeTint")] + IntPtr _MonochromeTint { get; } + } + + [TV (14,0), NoWatch, NoiOS] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UISearchSuggestionItem : UISearchSuggestion { + + [Static] + [Export ("suggestionWithLocalizedSuggestion:")] + UISearchSuggestionItem Create (NSString localizedSuggestion); + + [Static] + [Export ("suggestionWithLocalizedSuggestion:descriptionString:")] + UISearchSuggestionItem Create (NSString localizedSuggestion, [NullAllowed] string description); + + [Static] + [Export ("suggestionWithLocalizedSuggestion:descriptionString:iconImage:")] + UISearchSuggestionItem Create (NSString localizedSuggestion, [NullAllowed] string description, [NullAllowed] UIImage iconImage); + + [Export ("initWithLocalizedSuggestion:")] + IntPtr Constructor (NSString localizedSuggestion); + + [Export ("initWithLocalizedSuggestion:localizedDescription:")] + IntPtr Constructor (NSString localizedSuggestion, [NullAllowed] string description); + + [Export ("initWithLocalizedSuggestion:localizedDescription:iconImage:")] + IntPtr Constructor (NSString localizedSuggestion, [NullAllowed] string description, [NullAllowed] UIImage iconImage); + + // Inlined by the adopted protocol + // [NullAllowed, Export ("localizedSuggestion")] + // string LocalizedSuggestion { get; } + + // [NullAllowed, Export ("localizedDescription")] + // string LocalizedDescription { get; } + + // [NullAllowed, Export ("iconImage")] + // UIImage IconImage { get; } + } + + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UIViewConfigurationState : UIConfigurationState { + + [Export ("initWithTraitCollection:")] + [DesignatedInitializer] + IntPtr Constructor (UITraitCollection traitCollection); + + [Export ("traitCollection", ArgumentSemantic.Strong)] + new UITraitCollection TraitCollection { get; set; } + + [Export ("disabled")] + bool Disabled { [Bind ("isDisabled")] get; set; } + + [Export ("highlighted")] + bool Highlighted { [Bind ("isHighlighted")] get; set; } + + [Export ("selected")] + bool Selected { [Bind ("isSelected")] get; set; } + + [Export ("focused")] + bool Focused { [Bind ("isFocused")] get; set; } + } + + // TODO: Our trampolines generator does not support generic delegate definitions + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + interface UICollectionViewDiffableDataSourceSectionSnapshotHandlers : NSCopying + where ItemType : NSObject { + + // [NullAllowed, Export ("shouldExpandItemHandler", ArgumentSemantic.Copy)] + // Func ShouldExpandItemHandler { get; set; } + + // [NullAllowed, Export ("willExpandItemHandler", ArgumentSemantic.Copy)] + // Action WillExpandItemHandler { get; set; } + + // [NullAllowed, Export ("shouldCollapseItemHandler", ArgumentSemantic.Copy)] + // Func ShouldCollapseItemHandler { get; set; } + + // [NullAllowed, Export ("willCollapseItemHandler", ArgumentSemantic.Copy)] + // Action WillCollapseItemHandler { get; set; } + + // [NullAllowed, Export ("snapshotForExpandingParentItemHandler", ArgumentSemantic.Copy)] + // Func, NSDiffableDataSourceSectionSnapshot> SnapshotForExpandingParentItemHandler { get; set; } + } + + // TODO: Our trampolines generator does not support generic delegate definitions + [NoWatch, TV (14,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + interface UICollectionViewDiffableDataSourceReorderingHandlers : NSCopying + where SectionType : NSObject + where ItemType : NSObject { + + // [NullAllowed, Export ("canReorderItemHandler", ArgumentSemantic.Copy)] + // Func CanReorderItemHandler { get; set; } + + // [NullAllowed, Export ("willReorderHandler", ArgumentSemantic.Copy)] + // Action> WillReorderHandler { get; set; } + + // [NullAllowed, Export ("didReorderHandler", ArgumentSemantic.Copy)] + // Action> DidReorderHandler { get; set; } + } + + [TV (14,0), iOS (14,0)] + [NoWatch] + [Native] + public enum UIListContentTextTransform : long { + None, + Uppercase, + Lowercase, + Capitalized, + } } diff --git a/src/uniformtypeidentifiers.cs b/src/uniformtypeidentifiers.cs new file mode 100644 index 000000000000..6f3827873460 --- /dev/null +++ b/src/uniformtypeidentifiers.cs @@ -0,0 +1,556 @@ +using System; +using System.ComponentModel; +using Foundation; +using ObjCRuntime; + +namespace UniformTypeIdentifiers { + + [Introduced (PlatformName.MacCatalyst, 14,0)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface UTType : NSCopying, NSSecureCoding { + + [Static] + [Export ("typeWithIdentifier:")] + [return: NullAllowed] + UTType CreateFromIdentifier (string identifier); + + [Static] + [Export ("typeWithFilenameExtension:")] + [return: NullAllowed] + UTType CreateFromExtension (string filenameExtension); + + [Static] + [Export ("typeWithFilenameExtension:conformingToType:")] + [return: NullAllowed] + UTType CreateFromExtension (string filenameExtension, UTType supertype); + + [Static] + [Export ("typeWithMIMEType:")] + [return: NullAllowed] + UTType CreateFromMimeType (string mimeType); + + [Static] + [Export ("typeWithMIMEType:conformingToType:")] + [return: NullAllowed] + UTType CreateFromMimeType (string mimeType, UTType supertype); + + [Export ("identifier")] + string Identifier { get; } + + [NullAllowed, Export ("preferredFilenameExtension")] + string PreferredFilenameExtension { get; } + + [NullAllowed, Export ("preferredMIMEType")] + string PreferredMimeType { get; } + + [NullAllowed, Export ("localizedDescription")] + string LocalizedDescription { get; } + + [NullAllowed, Export ("version")] + NSNumber Version { get; } + + [NullAllowed, Export ("referenceURL")] + NSUrl ReferenceUrl { get; } + + [Export ("dynamic")] + bool Dynamic { [Bind ("isDynamic")] get; } + + [Export ("declared")] + bool Declared { [Bind ("isDeclared")] get; } + + [Export ("publicType")] + bool PublicType { [Bind ("isPublicType")] get; } + + // @interface LocalConstants (UTType) + + [Static] + [Export ("exportedTypeWithIdentifier:")] + UTType CreateExportedType (string identifier); + + [Static] + [Export ("exportedTypeWithIdentifier:conformingToType:")] + UTType CreateExportedType (string identifier, UTType parentType); + + [Static] + [Export ("importedTypeWithIdentifier:")] + UTType CreateImportedType (string identifier); + + [Static] + [Export ("importedTypeWithIdentifier:conformingToType:")] + UTType CreateImportedType (string identifier, UTType parentType); + + // @interface UTTagSpecification (UTType) + + [Static] + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Export ("typeWithTag:tagClass:conformingToType:")] + [return: NullAllowed] + UTType GetType (string tag, NSString tagClass, [NullAllowed] UTType supertype); + + [Static] + [Wrap ("GetType (tag, tagClass.GetConstant ()!, supertype)")] + [return: NullAllowed] + UTType GetType (string tag, UTTagClass tagClass, [NullAllowed] UTType supertype); + + [Static] + [EditorBrowsable (EditorBrowsableState.Advanced)] + [Export ("typesWithTag:tagClass:conformingToType:")] + UTType[] GetTypes (string tag, NSString tagClass, [NullAllowed] UTType supertype); + + [Static] + [Wrap ("GetTypes (tag, tagClass.GetConstant ()!, supertype)")] + UTType[] GetTypes (string tag, UTTagClass tagClass, [NullAllowed] UTType supertype); + + [Export ("tags")] + NSDictionary> Tags { get; } + + // @interface Conformance (UTType) + + [Export ("conformsToType:")] + bool ConformsTo (UTType type); + + [Export ("isSupertypeOfType:")] + bool IsSupertypeOf (UTType type); + + [Export ("isSubtypeOfType:")] + bool IsSubtypeOf (UTType type); + + [Export ("supertypes")] + NSSet Supertypes { get; } + } + + [Introduced (PlatformName.MacCatalyst, 14,0)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + enum UTTagClass { + [Field ("UTTagClassFilenameExtension")] + FilenameExtension, + + [Field ("UTTagClassMIMEType")] + MimeType, + } + + // split from UTType for clarity between members (selectors) and constants (fields) + [Introduced (PlatformName.MacCatalyst, 14,0)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + interface UTTypes { + + [Field ("UTTypeItem")] + UTType Item { get; } + + [Field ("UTTypeContent")] + UTType Content { get; } + + [Field ("UTTypeCompositeContent")] + UTType CompositeContent { get; } + + [Field ("UTTypeDiskImage")] + UTType DiskImage { get; } + + [Field ("UTTypeData")] + UTType Data { get; } + + [Field ("UTTypeDirectory")] + UTType Directory { get; } + + [Field ("UTTypeResolvable")] + UTType Resolvable { get; } + + [Field ("UTTypeSymbolicLink")] + UTType SymbolicLink { get; } + + [Field ("UTTypeExecutable")] + UTType Executable { get; } + + [Field ("UTTypeMountPoint")] + UTType MountPoint { get; } + + [Field ("UTTypeAliasFile")] + UTType AliasFile { get; } + + [Field ("UTTypeURLBookmarkData")] + UTType UrlBookmarkData { get; } + + [Field ("UTTypeURL")] + UTType Url { get; } + + [Field ("UTTypeFileURL")] + UTType FileUrl { get; } + + [Field ("UTTypeText")] + UTType Text { get; } + + [Field ("UTTypePlainText")] + UTType PlainText { get; } + + [Field ("UTTypeUTF8PlainText")] + UTType Utf8PlainText { get; } + + [Field ("UTTypeUTF16ExternalPlainText")] + UTType Utf16ExternalPlainText { get; } + + [Field ("UTTypeUTF16PlainText")] + UTType Utf16PlainText { get; } + + [Field ("UTTypeDelimitedText")] + UTType DelimitedText { get; } + + [Field ("UTTypeCommaSeparatedText")] + UTType CommaSeparatedText { get; } + + [Field ("UTTypeTabSeparatedText")] + UTType TabSeparatedText { get; } + + [Field ("UTTypeUTF8TabSeparatedText")] + UTType Utf8TabSeparatedText { get; } + + [Field ("UTTypeRTF")] + UTType Rtf { get; } + + [Field ("UTTypeHTML")] + UTType Html { get; } + + [Field ("UTTypeXML")] + UTType Xml { get; } + + [Field ("UTTypeYAML")] + UTType Yaml { get; } + + [Field ("UTTypeSourceCode")] + UTType SourceCode { get; } + + [Field ("UTTypeAssemblyLanguageSource")] + UTType AssemblyLanguageSource { get; } + + [Field ("UTTypeCSource")] + UTType CSource { get; } + + [Field ("UTTypeObjectiveCSource")] + UTType ObjectiveCSource { get; } + + [Field ("UTTypeSwiftSource")] + UTType SwiftSource { get; } + + [Field ("UTTypeCPlusPlusSource")] + UTType CPlusPlusSource { get; } + + [Field ("UTTypeObjectiveCPlusPlusSource")] + UTType ObjectiveCPlusPlusSource { get; } + + [Field ("UTTypeCHeader")] + UTType CHeader { get; } + + [Field ("UTTypeCPlusPlusHeader")] + UTType CPlusPlusHeader { get; } + + [Field ("UTTypeScript")] + UTType Script { get; } + + [Field ("UTTypeAppleScript")] + UTType AppleScript { get; } + + [Field ("UTTypeOSAScript")] + UTType OsaScript { get; } + + [Field ("UTTypeOSAScriptBundle")] + UTType OsaScriptBundle { get; } + + [Field ("UTTypeJavaScript")] + UTType JavaScript { get; } + + [Field ("UTTypeShellScript")] + UTType ShellScript { get; } + + [Field ("UTTypePerlScript")] + UTType PerlScript { get; } + + [Field ("UTTypePythonScript")] + UTType PythonScript { get; } + + [Field ("UTTypeRubyScript")] + UTType RubyScript { get; } + + [Field ("UTTypePHPScript")] + UTType PhpScript { get; } + + [Field ("UTTypeJSON")] + UTType Json { get; } + + [Field ("UTTypePropertyList")] + UTType PropertyList { get; } + + [Field ("UTTypeXMLPropertyList")] + UTType XmlPropertyList { get; } + + [Field ("UTTypeBinaryPropertyList")] + UTType BinaryPropertyList { get; } + + [Field ("UTTypePDF")] + UTType Pdf { get; } + + [Field ("UTTypeRTFD")] + UTType Rtfd { get; } + + [Field ("UTTypeFlatRTFD")] + UTType FlatRtfd { get; } + + [Field ("UTTypeWebArchive")] + UTType WebArchive { get; } + + [Field ("UTTypeImage")] + UTType Image { get; } + + [Field ("UTTypeJPEG")] + UTType Jpeg { get; } + + [Field ("UTTypeTIFF")] + UTType Tiff { get; } + + [Field ("UTTypeGIF")] + UTType Gif { get; } + + [Field ("UTTypePNG")] + UTType Png { get; } + + [Field ("UTTypeICNS")] + UTType Icns { get; } + + [Field ("UTTypeBMP")] + UTType Bmp { get; } + + [Field ("UTTypeICO")] + UTType Ico { get; } + + [Field ("UTTypeRAWImage")] + UTType RawImage { get; } + + [Field ("UTTypeSVG")] + UTType Svg { get; } + + [Field ("UTTypeLivePhoto")] + UTType LivePhoto { get; } + + [Field ("UTTypeHEIF")] + UTType Heif { get; } + + [Field ("UTTypeHEIC")] + UTType Heic { get; } + + [Field ("UTTypeWebP")] + UTType WebP { get; } + + [Field ("UTType3DContent")] + UTType ThreeDContent { get; } + + [Field ("UTTypeUSD")] + UTType Usd { get; } + + [Field ("UTTypeUSDZ")] + UTType Usdz { get; } + + [Field ("UTTypeRealityFile")] + UTType RealityFile { get; } + + [Field ("UTTypeSceneKitScene")] + UTType SceneKitScene { get; } + + [Field ("UTTypeARReferenceObject")] + UTType ARReferenceObject { get; } + + [Field ("UTTypeAudiovisualContent")] + UTType AudiovisualContent { get; } + + [Field ("UTTypeMovie")] + UTType Movie { get; } + + [Field ("UTTypeVideo")] + UTType Video { get; } + + [Field ("UTTypeAudio")] + UTType Audio { get; } + + [Field ("UTTypeQuickTimeMovie")] + UTType QuickTimeMovie { get; } + + [Field ("UTTypeMPEG")] + UTType Mpeg { get; } + + [Field ("UTTypeMPEG2Video")] + UTType Mpeg2Video { get; } + + [Field ("UTTypeMPEG2TransportStream")] + UTType Mpeg2TransportStream { get; } + + [Field ("UTTypeMP3")] + UTType MP3 { get; } + + [Field ("UTTypeMPEG4Movie")] + UTType Mpeg4Movie { get; } + + [Field ("UTTypeMPEG4Audio")] + UTType Mpeg4Audio { get; } + + [Field ("UTTypeAppleProtectedMPEG4Audio")] + UTType AppleProtectedMpeg4Audio { get; } + + [Field ("UTTypeAppleProtectedMPEG4Video")] + UTType AppleProtectedMpeg4Video { get; } + + [Field ("UTTypeAVI")] + UTType Avi { get; } + + [Field ("UTTypeAIFF")] + UTType Aiff { get; } + + [Field ("UTTypeWAV")] + UTType Wav { get; } + + [Field ("UTTypeMIDI")] + UTType Midi { get; } + + [Field ("UTTypePlaylist")] + UTType Playlist { get; } + + [Field ("UTTypeM3UPlaylist")] + UTType M3uPlaylist { get; } + + [Field ("UTTypeFolder")] + UTType Folder { get; } + + [Field ("UTTypeVolume")] + UTType Volume { get; } + + [Field ("UTTypePackage")] + UTType Package { get; } + + [Field ("UTTypeBundle")] + UTType Bundle { get; } + + [Field ("UTTypePluginBundle")] + UTType PluginBundle { get; } + + [Field ("UTTypeSpotlightImporter")] + UTType SpotlightImporter { get; } + + [Field ("UTTypeQuickLookGenerator")] + UTType QuickLookGenerator { get; } + + [Field ("UTTypeXPCService")] + UTType XpcService { get; } + + [Field ("UTTypeFramework")] + UTType Framework { get; } + + [Field ("UTTypeApplication")] + UTType Application { get; } + + [Field ("UTTypeApplicationBundle")] + UTType ApplicationBundle { get; } + + [Field ("UTTypeApplicationExtension")] + UTType ApplicationExtension { get; } + + [Field ("UTTypeUnixExecutable")] + UTType UnixExecutable { get; } + + [Field ("UTTypeEXE")] + UTType Exe { get; } + + [Field ("UTTypeSystemPreferencesPane")] + UTType SystemPreferencesPane { get; } + + [Field ("UTTypeArchive")] + UTType Archive { get; } + + [Field ("UTTypeGZIP")] + UTType Gzip { get; } + + [Field ("UTTypeBZ2")] + UTType BZ2 { get; } + + [Field ("UTTypeZIP")] + UTType Zip { get; } + + [Field ("UTTypeAppleArchive")] + UTType AppleArchive { get; } + + [Field ("UTTypeSpreadsheet")] + UTType Spreadsheet { get; } + + [Field ("UTTypePresentation")] + UTType Presentation { get; } + + [Field ("UTTypeDatabase")] + UTType Database { get; } + + [Field ("UTTypeMessage")] + UTType Message { get; } + + [Field ("UTTypeContact")] + UTType Contact { get; } + + [Field ("UTTypeVCard")] + UTType VCard { get; } + + [Field ("UTTypeToDoItem")] + UTType ToDoItem { get; } + + [Field ("UTTypeCalendarEvent")] + UTType CalendarEvent { get; } + + [Field ("UTTypeEmailMessage")] + UTType EmailMessage { get; } + + [Field ("UTTypeInternetLocation")] + UTType InternetLocation { get; } + + [Field ("UTTypeInternetShortcut")] + UTType Shortcut { get; } + + [Field ("UTTypeFont")] + UTType Font { get; } + + [Field ("UTTypeBookmark")] + UTType Bookmark { get; } + + [Field ("UTTypePKCS12")] + UTType Pkcs12 { get; } + + [Field ("UTTypeX509Certificate")] + UTType X509Certificate { get; } + + [Field ("UTTypeEPUB")] + UTType Epub { get; } + + [Field ("UTTypeLog")] + UTType Log { get; } + } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Category] + [BaseType (typeof (NSString))] + interface NSString_UTAdditions { + + [Export ("stringByAppendingPathComponent:conformingToType:")] + NSString AppendPathComponent (string partialName, UTType contentType); + + [Export ("stringByAppendingPathExtensionForType:")] + NSString AppendPathExtension (UTType contentType); + } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Category] + [BaseType (typeof (NSUrl))] + interface NSUrl_UTAdditions { + + [Export ("URLByAppendingPathComponent:conformingToType:")] + NSUrl AppendPathComponent (string partialName, UTType contentType); + + [Export ("URLByAppendingPathExtensionForType:")] + NSUrl AppendPathExtension (UTType contentType); + } +} diff --git a/src/usernotifications.cs b/src/usernotifications.cs index 8582a57f61e7..ef291a9215ce 100644 --- a/src/usernotifications.cs +++ b/src/usernotifications.cs @@ -84,6 +84,8 @@ public enum UNAuthorizationStatus : long { Authorized, [iOS (12, 0), TV (12, 0), Watch (5, 0)] Provisional, + [iOS (14,0)][NoMac, NoWatch, NoTV] + Ephemeral, } [iOS (10, 0)] @@ -139,7 +141,15 @@ public enum UNNotificationPresentationOptions : ulong { None = 0, Badge = (1 << 0), Sound = (1 << 1), - Alert = (1 << 2) + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'List | Banner' instead.")] + [Deprecated (PlatformName.TvOS, 14,0, message: "Use 'List | Banner' instead.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'List | Banner' instead.")] + [Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'List | Banner' instead.")] + Alert = (1 << 2), + [iOS (14,0)][TV (14,0)][Watch (7,0)][Mac (11,0)] + List = (1 << 3), + [iOS (14,0)][TV (14,0)][Watch (7,0)][Mac (11,0)] + Banner = (1 << 4), } [NoWatch, NoTV, iOS (11,0)] diff --git a/src/usernotificationsui.cs b/src/usernotificationsui.cs index ce334bb870c8..9ca954443980 100644 --- a/src/usernotificationsui.cs +++ b/src/usernotificationsui.cs @@ -11,13 +11,19 @@ using CoreGraphics; using Foundation; using ObjCRuntime; +#if MONOMAC +using AppKit; +using UIColor = AppKit.NSColor; +#else using UIKit; +#endif using UserNotifications; namespace UserNotificationsUI { [iOS (10, 0)] - [Unavailable (PlatformName.MacOSX)] + [Mac (11,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] [Native] @@ -28,7 +34,8 @@ public enum UNNotificationContentExtensionMediaPlayPauseButtonType : ulong { } [iOS (10, 0)] - [Unavailable (PlatformName.MacOSX)] + [Mac (11,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] [Native] @@ -41,7 +48,8 @@ public enum UNNotificationContentExtensionResponseOption : ulong { interface IUNNotificationContentExtension { } [iOS (10, 0)] - [Unavailable (PlatformName.MacOSX)] + [Mac (11,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] [Protocol] @@ -71,7 +79,8 @@ interface UNNotificationContentExtension { } [iOS (10, 0)] - [Unavailable (PlatformName.MacOSX)] + [Mac (11,0)] + [Introduced (PlatformName.MacCatalyst, 14,0)] [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] [Category] @@ -84,11 +93,11 @@ interface NSExtensionContext_UNNotificationContentExtension { [Export ("mediaPlayingPaused")] void MediaPlayingPaused (); - [NoWatch, NoTV, NoMac, iOS (12,0)] + [iOS (12,0)] [Export ("performNotificationDefaultAction")] void PerformNotificationDefaultAction (); - [NoWatch, NoTV, NoMac, iOS (12,0)] + [iOS (12,0)] [Export ("dismissNotificationContentExtension")] void DismissNotificationContentExtension (); diff --git a/src/videotoolbox.cs b/src/videotoolbox.cs index b312849ebe60..de57b8adc3e8 100644 --- a/src/videotoolbox.cs +++ b/src/videotoolbox.cs @@ -188,6 +188,14 @@ interface VTCompressionPropertyKey { [Mac (10,15), iOS (13,0), TV (13,0)] [Field ("kVTCompressionPropertyKey_UsingGPURegistryID")] NSString UsingGpuRegistryId { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("kVTCompressionPropertyKey_HDRMetadataInsertionMode")] + NSString HdrMetadataInsertionMode { get; } + + [TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("kVTCompressionPropertyKey_PrioritizeEncodingSpeedOverQuality")] + NSString PrioritizeEncodingSpeedOverQuality { get; } } [Mac (10,15), iOS (13,0), TV (13,0)] diff --git a/src/vision.cs b/src/vision.cs index 646a3d32a3d2..67be527c4ae3 100644 --- a/src/vision.cs +++ b/src/vision.cs @@ -11,6 +11,7 @@ using CoreFoundation; using CoreGraphics; using CoreImage; +using CoreMedia; using CoreML; using CoreVideo; using Foundation; @@ -19,6 +20,8 @@ using ImageIO; using Matrix3 = global::OpenTK.NMatrix3; +using Vector2 = global::OpenTK.Vector2; +using Vector3 = global::OpenTK.Vector3; namespace Vision { @@ -44,6 +47,7 @@ enum VNErrorCode : long { InvalidModel, UnsupportedRevision, DataUnavailable, + TimeStampNotFound, } [TV (11,0), Mac (10,13), iOS (11,0)] @@ -266,6 +270,8 @@ enum VNClassifyImageRequestRevision : ulong { enum VNDetectFaceCaptureQualityRequestRevision : ulong { Unspecified = 0, One = 1, + [TV (14,0), Mac (11,0), iOS (14,0)] + Two = 2, } [TV (13,0), Mac (10,15), iOS (13,0)] @@ -323,6 +329,8 @@ enum VNRequestTextRecognitionLevel : long { enum VNRecognizeTextRequestRevision : ulong { Unspecified = 0, One = 1, + [TV (14,0), Mac (11,0), iOS (14,0)] + Two = 2, } [TV (13,0), Mac (10,15), iOS (13,0)] @@ -333,6 +341,244 @@ enum VNElementType : ulong { Double = 2, } + [TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + enum VNDetectContourRequestRevision : ulong { + Unspecified = 0, + One = 1, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + enum VNDetectHumanBodyPoseRequestRevision : ulong { + Unspecified = 0, + One = 1, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + enum VNDetectHumanHandPoseRequestRevision : ulong { + Unspecified = 0, + One = 1, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + enum VNDetectTrajectoriesRequestRevision : ulong { + Unspecified = 0, + One = 1, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + public enum VNGenerateOpticalFlowRequestComputationAccuracy : ulong { + Low = 0, + Medium, + High, + VeryHigh, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + enum VNGenerateOpticalFlowRequestRevision : ulong { + Unspecified = 0, + One = 1, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Native] + enum VNStatefulRequestRevision : ulong { + Unspecified = 0, + One = 1, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + enum VNHumanBodyPoseObservationJointName { + [DefaultEnumValue] + [Field (null)] + None, + + [Field ("VNHumanBodyPoseObservationJointNameNose")] + Nose, + + [Field ("VNHumanBodyPoseObservationJointNameLeftEye")] + LeftEye, + + [Field ("VNHumanBodyPoseObservationJointNameRightEye")] + RightEye, + + [Field ("VNHumanBodyPoseObservationJointNameLeftEar")] + LeftEar, + + [Field ("VNHumanBodyPoseObservationJointNameRightEar")] + RightEar, + + [Field ("VNHumanBodyPoseObservationJointNameLeftShoulder")] + LeftShoulder, + + [Field ("VNHumanBodyPoseObservationJointNameRightShoulder")] + RightShoulder, + + [Field ("VNHumanBodyPoseObservationJointNameNeck")] + Neck, + + [Field ("VNHumanBodyPoseObservationJointNameLeftElbow")] + LeftElbow, + + [Field ("VNHumanBodyPoseObservationJointNameRightElbow")] + RightElbow, + + [Field ("VNHumanBodyPoseObservationJointNameLeftWrist")] + LeftWrist, + + [Field ("VNHumanBodyPoseObservationJointNameRightWrist")] + RightWrist, + + [Field ("VNHumanBodyPoseObservationJointNameLeftHip")] + LeftHip, + + [Field ("VNHumanBodyPoseObservationJointNameRightHip")] + RightHip, + + [Field ("VNHumanBodyPoseObservationJointNameRoot")] + Root, + + [Field ("VNHumanBodyPoseObservationJointNameLeftKnee")] + LeftKnee, + + [Field ("VNHumanBodyPoseObservationJointNameRightKnee")] + RightKnee, + + [Field ("VNHumanBodyPoseObservationJointNameLeftAnkle")] + LeftAnkle, + + [Field ("VNHumanBodyPoseObservationJointNameRightAnkle")] + RightAnkle, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + enum VNHumanBodyPoseObservationJointsGroupName { + [DefaultEnumValue] + [Field (null)] + None, + + [Field ("VNHumanBodyPoseObservationJointsGroupNameFace")] + Face, + + [Field ("VNHumanBodyPoseObservationJointsGroupNameTorso")] + Torso, + + [Field ("VNHumanBodyPoseObservationJointsGroupNameLeftArm")] + LeftArm, + + [Field ("VNHumanBodyPoseObservationJointsGroupNameRightArm")] + RightArm, + + [Field ("VNHumanBodyPoseObservationJointsGroupNameLeftLeg")] + LeftLeg, + + [Field ("VNHumanBodyPoseObservationJointsGroupNameRightLeg")] + RightLeg, + + [Field ("VNHumanBodyPoseObservationJointsGroupNameAll")] + All, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + enum VNHumanHandPoseObservationJointName { + [DefaultEnumValue] + [Field (null)] + None, + + [Field ("VNHumanHandPoseObservationJointNameWrist")] + Wrist, + + [Field ("VNHumanHandPoseObservationJointNameThumbCMC")] + ThumbCmc, + + [Field ("VNHumanHandPoseObservationJointNameThumbMP")] + ThumbMP, + + [Field ("VNHumanHandPoseObservationJointNameThumbIP")] + ThumbIP, + + [Field ("VNHumanHandPoseObservationJointNameThumbTip")] + ThumbTip, + + [Field ("VNHumanHandPoseObservationJointNameIndexMCP")] + IndexMcp, + + [Field ("VNHumanHandPoseObservationJointNameIndexPIP")] + IndexPip, + + [Field ("VNHumanHandPoseObservationJointNameIndexDIP")] + IndexDip, + + [Field ("VNHumanHandPoseObservationJointNameIndexTip")] + IndexTip, + + [Field ("VNHumanHandPoseObservationJointNameMiddleMCP")] + MiddleMcp, + + [Field ("VNHumanHandPoseObservationJointNameMiddlePIP")] + MiddlePip, + + [Field ("VNHumanHandPoseObservationJointNameMiddleDIP")] + MiddleDip, + + [Field ("VNHumanHandPoseObservationJointNameMiddleTip")] + MiddleTip, + + [Field ("VNHumanHandPoseObservationJointNameRingMCP")] + RingMcp, + + [Field ("VNHumanHandPoseObservationJointNameRingPIP")] + RingPip, + + [Field ("VNHumanHandPoseObservationJointNameRingDIP")] + RingDip, + + [Field ("VNHumanHandPoseObservationJointNameRingTip")] + RingTip, + + [Field ("VNHumanHandPoseObservationJointNameLittleMCP")] + LittleMcp, + + [Field ("VNHumanHandPoseObservationJointNameLittlePIP")] + LittlePip, + + [Field ("VNHumanHandPoseObservationJointNameLittleDIP")] + LittleDip, + + [Field ("VNHumanHandPoseObservationJointNameLittleTip")] + LittleTip, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + enum VNHumanHandPoseObservationJointsGroupName { + [DefaultEnumValue] + [Field (null)] + None, + + [Field ("VNHumanHandPoseObservationJointsGroupNameThumb")] + Thumb, + + [Field ("VNHumanHandPoseObservationJointsGroupNameIndexFinger")] + IndexFinger, + + [Field ("VNHumanHandPoseObservationJointsGroupNameMiddleFinger")] + MiddleFinger, + + [Field ("VNHumanHandPoseObservationJointsGroupNameRingFinger")] + RingFinger, + + [Field ("VNHumanHandPoseObservationJointsGroupNameLittleFinger")] + LittleFinger, + + [Field ("VNHumanHandPoseObservationJointsGroupNameAll")] + All, + } + [TV (11,0), Mac (10,13), iOS (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1214,6 +1460,10 @@ interface VNObservation : NSCopying, NSSecureCoding, VNRequestRevisionProviding [Export ("confidence")] float Confidence { get; } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("timeRange", ArgumentSemantic.Assign)] + CMTimeRange TimeRange { get; } } [TV (11,0), Mac (10,13), iOS (11,0)] @@ -1627,6 +1877,22 @@ interface VNImageRequestHandler { [Wrap ("this (imageData, orientation, imageOptions.GetDictionary ()!)")] IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions imageOptions); + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("initWithCMSampleBuffer:options:")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, NSDictionary options); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Wrap ("this (sampleBuffer, imageOptions.GetDictionary ()!)")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, VNImageOptions imageOptions); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("initWithCMSampleBuffer:orientation:options:")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, CGImagePropertyOrientation orientation, NSDictionary options); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Wrap ("this (sampleBuffer, orientation, imageOptions.GetDictionary ()!)")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, CGImagePropertyOrientation orientation, VNImageOptions imageOptions); + [Export ("performRequests:error:")] bool Perform (VNRequest [] requests, out NSError error); } @@ -1669,6 +1935,14 @@ interface VNSequenceRequestHandler { [Export ("performRequests:onImageData:orientation:error:")] bool Perform (VNRequest [] requests, NSData imageData, CGImagePropertyOrientation orientation, out NSError error); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("performRequests:onCMSampleBuffer:error:")] + bool Perform (VNRequest[] requests, CMSampleBuffer sampleBuffer, [NullAllowed] out NSError error); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("performRequests:onCMSampleBuffer:orientation:error:")] + bool Perform (VNRequest[] requests, CMSampleBuffer sampleBuffer, CGImagePropertyOrientation orientation, [NullAllowed] out NSError error); } [TV (11,0), Mac (10,13), iOS (11,0)] @@ -1796,6 +2070,38 @@ interface VNTargetedImageRequest { [Wrap ("this (imageData, orientation, options.GetDictionary ()!, completionHandler)")] IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("initWithTargetedCMSampleBuffer:options:")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, NSDictionary optionsDict); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Wrap ("this (sampleBuffer, options.GetDictionary ()!)")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, VNImageOptions options); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("initWithTargetedCMSampleBuffer:options:completionHandler:")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Wrap ("this (sampleBuffer, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("initWithTargetedCMSampleBuffer:orientation:options:")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Wrap ("this (sampleBuffer, orientation, options.GetDictionary ()!)")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, CGImagePropertyOrientation orientation, VNImageOptions options); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("initWithTargetedCMSampleBuffer:orientation:options:completionHandler:")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Wrap ("this (sampleBuffer, orientation, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (CMSampleBuffer sampleBuffer, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); } [TV (11,0), Mac (10,13), iOS (11,0)] @@ -2302,5 +2608,794 @@ interface VNRequestProgressProviding { bool Indeterminate { get; } } + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNImageBasedRequest))] + [DisableDefaultCtor] + interface VNDetectContoursRequest { + + [Export ("contrastAdjustment")] + float ContrastAdjustment { get; set; } + + [Export ("detectsDarkOnLight")] + bool DetectsDarkOnLight { get; set; } + + [Export ("maximumImageDimension")] + nuint MaximumImageDimension { get; set; } + + [Export ("initWithCompletionHandler:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); + + // We must inline the following 5 properties + // ('Revision', 'WeakSupportedRevisions', 'SupportedRevisions', 'DefaultRevision' and 'CurrentRevision') + // into subclasses so the correct class_ptr is used for the static members and the right enum type is also used. + + [Export ("revision")] + VNDetectContourRequestRevision Revision { get; set; } + + [Static] + [Export ("supportedRevisions", ArgumentSemantic.Copy)] + NSIndexSet WeakSupportedRevisions { get; } + + [Static] + [Wrap ("GetSupportedVersions (WeakSupportedRevisions)")] + VNDetectContourRequestRevision [] SupportedRevisions { get; } + + [Static] + [Export ("defaultRevision")] + VNDetectContourRequestRevision DefaultRevision { get; } + + [Static] + [Export ("currentRevision")] + VNDetectContourRequestRevision CurrentRevision { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNRecognizedPointsObservation))] + [DisableDefaultCtor] + interface VNHumanBodyPoseObservation { + + [BindAs (typeof (VNHumanBodyPoseObservationJointName []))] + [Export ("availableJointNames", ArgumentSemantic.Copy)] + NSString [] AvailableJointNames { get; } + + [BindAs (typeof (VNHumanBodyPoseObservationJointsGroupName []))] + [Export ("availableJointsGroupNames", ArgumentSemantic.Copy)] + NSString [] AvailableJointsGroupNames { get; } + + [Export ("recognizedPointForJointName:error:")] + [return: NullAllowed] + VNRecognizedPoint GetRecognizedPoint ([BindAs (typeof (VNHumanBodyPoseObservationJointName))] NSString jointName, [NullAllowed] out NSError error); + + [Export ("recognizedPointsForJointsGroupName:error:")] + [return: NullAllowed] + NSDictionary GetRecognizedPoints ([BindAs (typeof (VNHumanBodyPoseObservationJointsGroupName))] NSString jointsGroupName, [NullAllowed] out NSError error); + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNImageBasedRequest))] + [DisableDefaultCtor] + interface VNDetectHumanBodyPoseRequest { + + [Static] + [Export ("supportedJointNamesForRevision:error:")] + [return: BindAs (typeof (VNHumanBodyPoseObservationJointName []))] + [return: NullAllowed] + NSString [] GetSupportedJointNames (VNDetectHumanBodyPoseRequestRevision revision, [NullAllowed] out NSError error); + + [Static] + [Export ("supportedJointsGroupNamesForRevision:error:")] + [return: NullAllowed] + [return: BindAs (typeof (VNHumanBodyPoseObservationJointsGroupName []))] + NSString [] GetSupportedJointsGroupNames (VNDetectHumanBodyPoseRequestRevision revision, [NullAllowed] out NSError error); + + [NullAllowed, Export ("results", ArgumentSemantic.Copy)] + VNHumanBodyPoseObservation [] Results { get; } + + [Export ("initWithCompletionHandler:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); + + // We must inline the following 5 properties + // ('Revision', 'WeakSupportedRevisions', 'SupportedRevisions', 'DefaultRevision' and 'CurrentRevision') + // into subclasses so the correct class_ptr is used for the static members and the right enum type is also used. + + [Export ("revision")] + VNDetectHumanBodyPoseRequestRevision Revision { get; set; } + + [Static] + [Export ("supportedRevisions", ArgumentSemantic.Copy)] + NSIndexSet WeakSupportedRevisions { get; } + + [Static] + [Wrap ("GetSupportedVersions (WeakSupportedRevisions)")] + VNDetectHumanBodyPoseRequestRevision [] SupportedRevisions { get; } + + [Static] + [Export ("defaultRevision")] + VNDetectHumanBodyPoseRequestRevision DefaultRevision { get; } + + [Static] + [Export ("currentRevision")] + VNDetectHumanBodyPoseRequestRevision CurrentRevision { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNRecognizedPointsObservation))] + [DisableDefaultCtor] + interface VNHumanHandPoseObservation { + + [BindAs (typeof (VNHumanHandPoseObservationJointName []))] + [Export ("availableJointNames", ArgumentSemantic.Copy)] + NSString [] AvailableJointNames { get; } + + [BindAs (typeof (VNHumanHandPoseObservationJointsGroupName []))] + [Export ("availableJointsGroupNames", ArgumentSemantic.Copy)] + NSString [] AvailableJointsGroupNames { get; } + + [Export ("recognizedPointForJointName:error:")] + [return: NullAllowed] + VNRecognizedPoint GetRecognizedPoint ([BindAs (typeof (VNHumanHandPoseObservationJointName))] NSString jointName, [NullAllowed] out NSError error); + + [Export ("recognizedPointsForJointsGroupName:error:")] + [return: NullAllowed] + NSDictionary GetRecognizedPoints ([BindAs (typeof (VNHumanHandPoseObservationJointsGroupName))] NSString jointsGroupName, [NullAllowed] out NSError error); + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNImageBasedRequest))] + [DisableDefaultCtor] + interface VNDetectHumanHandPoseRequest { + + [Static] + [Export ("supportedJointNamesForRevision:error:")] + [return: NullAllowed] + [return: BindAs (typeof (VNHumanHandPoseObservationJointName []))] + NSString [] GetSupportedJointNames (VNDetectHumanHandPoseRequestRevision revision, [NullAllowed] out NSError error); + + [Static] + [Export ("supportedJointsGroupNamesForRevision:error:")] + [return: NullAllowed] + [return: BindAs (typeof (VNHumanHandPoseObservationJointsGroupName []))] + NSString [] GetSupportedJointsGroupNames (VNDetectHumanHandPoseRequestRevision revision, [NullAllowed] out NSError error); + + [Export ("maximumHandCount")] + nuint MaximumHandCount { get; set; } + + [NullAllowed, Export ("results", ArgumentSemantic.Copy)] + VNHumanHandPoseObservation [] Results { get; } + + [Export ("initWithCompletionHandler:")] + [DesignatedInitializer] + IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); + + // We must inline the following 5 properties + // ('Revision', 'WeakSupportedRevisions', 'SupportedRevisions', 'DefaultRevision' and 'CurrentRevision') + // into subclasses so the correct class_ptr is used for the static members and the right enum type is also used. + + [Export ("revision")] + VNDetectHumanHandPoseRequestRevision Revision { get; set; } + + [Static] + [Export ("supportedRevisions", ArgumentSemantic.Copy)] + NSIndexSet WeakSupportedRevisions { get; } + + [Static] + [Wrap ("GetSupportedVersions (WeakSupportedRevisions)")] + VNDetectHumanHandPoseRequestRevision [] SupportedRevisions { get; } + + [Static] + [Export ("defaultRevision")] + VNDetectHumanHandPoseRequestRevision DefaultRevision { get; } + + [Static] + [Export ("currentRevision")] + VNDetectHumanHandPoseRequestRevision CurrentRevision { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNStatefulRequest))] + [DisableDefaultCtor] + interface VNDetectTrajectoriesRequest { + + [Export ("initWithFrameAnalysisSpacing:trajectoryLength:completionHandler:")] + IntPtr Constructor (CMTime frameAnalysisSpacing, nint trajectoryLength, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Export ("trajectoryLength")] + nint TrajectoryLength { get; } + + [Export ("objectMinimumNormalizedRadius")] + float ObjectMinimumNormalizedRadius { get; set; } + + [Export ("objectMaximumNormalizedRadius")] + float ObjectMaximumNormalizedRadius { get; set; } + [NullAllowed, Export ("results", ArgumentSemantic.Copy)] + VNTrajectoryObservation [] Results { get; } + + // We must inline the following 5 properties + // ('Revision', 'WeakSupportedRevisions', 'SupportedRevisions', 'DefaultRevision' and 'CurrentRevision') + // into subclasses so the correct class_ptr is used for the static members and the right enum type is also used. + + [Export ("revision")] + VNDetectTrajectoriesRequestRevision Revision { get; set; } + + [Static] + [Export ("supportedRevisions", ArgumentSemantic.Copy)] + NSIndexSet WeakSupportedRevisions { get; } + + [Static] + [Wrap ("GetSupportedVersions (WeakSupportedRevisions)")] + VNDetectTrajectoriesRequestRevision [] SupportedRevisions { get; } + + [Static] + [Export ("defaultRevision")] + VNDetectTrajectoriesRequestRevision DefaultRevision { get; } + + [Static] + [Export ("currentRevision")] + VNDetectTrajectoriesRequestRevision CurrentRevision { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VNPoint : NSCopying, NSSecureCoding { + + [Static] + [Export ("zeroPoint", ArgumentSemantic.Strong)] + VNPoint Zero { get; } + + [Static] + [Export ("pointByApplyingVector:toPoint:")] + VNPoint Create (VNVector vector, VNPoint point); + + [Export ("distanceToPoint:")] + double GetDistanceToPoint (VNPoint point); + + [Export ("initWithX:y:")] + [DesignatedInitializer] + IntPtr Constructor (double x, double y); + + [Export ("initWithLocation:")] + IntPtr Constructor (CGPoint location); + + [Export ("location")] + CGPoint Location { get; } + + [Export ("x")] + double X { get; } + + [Export ("y")] + double Y { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VNVector : NSCopying, NSSecureCoding { + + [Static] + [Export ("zeroVector", ArgumentSemantic.Strong)] + VNVector Zero { get; } + + [Static] + [Export ("unitVectorForVector:")] + VNVector CreateUnitVector (VNVector vector); + + [Static] + [Export ("vectorByMultiplyingVector:byScalar:")] + VNVector CreateByMultiplyingVector (VNVector vector, double scalar); + + [Static] + [Export ("vectorByAddingVector:toVector:")] + VNVector CreateByAddingVector (VNVector v1, VNVector v2); + + [Static] + [Export ("vectorBySubtractingVector:fromVector:")] + VNVector CreateBySubtractingVector (VNVector v1, VNVector v2); + + [Static] + [Export ("dotProductOfVector:vector:")] + double GetDotProduct (VNVector v1, VNVector v2); + + [Export ("initWithXComponent:yComponent:")] + [DesignatedInitializer] + IntPtr Constructor (double x, double y); + + [Internal] + [Export ("initWithR:theta:")] + IntPtr InitWithRTheta (double r, double theta); + + [Export ("initWithVectorHead:tail:")] + IntPtr Constructor (VNPoint head, VNPoint tail); + + [Export ("x")] + double X { get; } + + [Export ("y")] + double Y { get; } + + [Export ("r")] + double R { get; } + + [Export ("theta")] + double Theta { get; } + + [Export ("length")] + double Length { get; } + + [Export ("squaredLength")] + double SquaredLength { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VNCircle : NSCopying, NSSecureCoding { + + [Static] + [Export ("zeroCircle", ArgumentSemantic.Strong)] + VNCircle Zero { get; } + + [Internal] + [Export ("initWithCenter:radius:")] + IntPtr InitWithCenterRadius (VNPoint center, double radius); + + [Internal] + [Export ("initWithCenter:diameter:")] + IntPtr InitWithCenterDiameter (VNPoint center, double diameter); + + [Export ("containsPoint:")] + bool Contains (VNPoint point); + + [Export ("containsPoint:inCircumferentialRingOfWidth:")] + bool Contains (VNPoint point, double ringWidth); + + [Export ("center", ArgumentSemantic.Strong)] + VNPoint Center { get; } + + [Export ("radius")] + double Radius { get; } + + [Export ("diameter")] + double Diameter { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] // Not meant to be created but obtained via VNContoursObservation + interface VNContour : NSCopying, VNRequestRevisionProviding { + + [Export ("indexPath")] + NSIndexPath IndexPath { get; } + + [Export ("childContourCount")] + nint ChildContourCount { get; } + + [Export ("childContours")] + VNContour [] ChildContours { get; } + + [Export ("childContourAtIndex:error:")] + [return: NullAllowed] + VNContour GetChildContour (nuint childContourIndex, [NullAllowed] out NSError error); + + [Export ("pointCount")] + nint PointCount { get; } + + [Export ("normalizedPoints")] + Vector2 NormalizedPoints { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + } + + [Export ("normalizedPath")] + CGPath NormalizedPath { get; } + + [Export ("aspectRatio")] + float AspectRatio { get; } + + [Export ("polygonApproximationWithEpsilon:error:")] + [return: NullAllowed] + VNContour GetPolygonApproximation (float epsilon, [NullAllowed] out NSError error); + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNPoint))] + [DisableDefaultCtor] + interface VNDetectedPoint { + + [Export ("confidence")] + float Confidence { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNDetectedPoint))] + [DisableDefaultCtor] + interface VNRecognizedPoint { + + // This can be one of the several smart enums so can't really BindAs + [Export ("identifier")] + NSString Identifier { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VNGeometryUtils { + + [Static] + [Export ("boundingCircleForContour:error:")] + [return: NullAllowed] + VNCircle CreateBoundingCircle (VNContour contour, [NullAllowed] out NSError error); + + [Static] + [Export ("boundingCircleForPoints:error:")] + [return: NullAllowed] + VNCircle CreateBoundingCircle (VNPoint[] points, [NullAllowed] out NSError error); + + [Internal] + [Static] + [Export ("boundingCircleForSIMDPoints:pointCount:error:")] + [return: NullAllowed] + VNCircle CreateBoundingCircle (IntPtr pointsPtr, nint pointCount, out NSError error); + + [Static] + [Export ("calculateArea:forContour:orientedArea:error:")] + bool CalculateArea (out double area, VNContour contour, bool orientedArea, [NullAllowed] out NSError error); + + [Static] + [Export ("calculatePerimeter:forContour:error:")] + bool CalculatePerimeter (out double perimeter, VNContour contour, [NullAllowed] out NSError error); + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNTargetedImageRequest))] + interface VNGenerateOpticalFlowRequest { + + [Export ("computationAccuracy", ArgumentSemantic.Assign)] + VNGenerateOpticalFlowRequestComputationAccuracy ComputationAccuracy { get; set; } + + [Advice ("The only allowed values here are 'TwoComponent16Half' or 'TwoComponent32Float' (Default).")] + [Export ("outputPixelFormat")] + CVPixelFormatType OutputPixelFormat { get; set; } + + // Inlined from parent class + [Export ("initWithTargetedCVPixelBuffer:options:")] + IntPtr Constructor (CVPixelBuffer pixelBuffer, NSDictionary optionsDict); + + [Wrap ("this (pixelBuffer, options.GetDictionary ()!)")] + IntPtr Constructor (CVPixelBuffer pixelBuffer, VNImageOptions options); + + [Export ("initWithTargetedCVPixelBuffer:options:completionHandler:")] + IntPtr Constructor (CVPixelBuffer pixelBuffer, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Wrap ("this (pixelBuffer, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (CVPixelBuffer pixelBuffer, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + [Export ("initWithTargetedCVPixelBuffer:orientation:options:")] + IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict); + + [Wrap ("this (pixelBuffer, orientation, options.GetDictionary ()!)")] + IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, VNImageOptions options); + + [Export ("initWithTargetedCVPixelBuffer:orientation:options:completionHandler:")] + IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Wrap ("this (pixelBuffer, orientation, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + [Export ("initWithTargetedCGImage:options:")] + IntPtr Constructor (CGImage cgImage, NSDictionary optionsDict); + + [Wrap ("this (cgImage, options.GetDictionary ()!)")] + IntPtr Constructor (CGImage cgImage, VNImageOptions options); + + [Export ("initWithTargetedCGImage:options:completionHandler:")] + IntPtr Constructor (CGImage cgImage, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Wrap ("this (cgImage, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (CGImage cgImage, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + [Export ("initWithTargetedCGImage:orientation:options:")] + IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict); + + [Wrap ("this (cgImage, orientation, options.GetDictionary ()!)")] + IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, VNImageOptions options); + + [Export ("initWithTargetedCGImage:orientation:options:completionHandler:")] + IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Wrap ("this (cgImage, orientation, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + [Export ("initWithTargetedCIImage:options:")] + IntPtr Constructor (CIImage ciImage, NSDictionary optionsDict); + + [Wrap ("this (ciImage, options.GetDictionary ()!)")] + IntPtr Constructor (CIImage ciImage, VNImageOptions options); + + [Export ("initWithTargetedCIImage:options:completionHandler:")] + IntPtr Constructor (CIImage ciImage, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Wrap ("this (ciImage, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (CIImage ciImage, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + [Export ("initWithTargetedCIImage:orientation:options:")] + IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict); + + [Wrap ("this (ciImage, orientation, options.GetDictionary ()!)")] + IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, VNImageOptions options); + + [Export ("initWithTargetedCIImage:orientation:options:completionHandler:")] + IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Wrap ("this (ciImage, orientation, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + [Export ("initWithTargetedImageURL:options:")] + IntPtr Constructor (NSUrl imageUrl, NSDictionary optionsDict); + + [Wrap ("this (imageUrl, options.GetDictionary ()!)")] + IntPtr Constructor (NSUrl imageUrl, VNImageOptions options); + + [Export ("initWithTargetedImageURL:options:completionHandler:")] + IntPtr Constructor (NSUrl imageUrl, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Wrap ("this (imageUrl, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (NSUrl imageUrl, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + [Export ("initWithTargetedImageURL:orientation:options:")] + IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, NSDictionary optionsDict); + + [Wrap ("this (imageUrl, orientation, options.GetDictionary ()!)")] + IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, VNImageOptions options); + + [Export ("initWithTargetedImageURL:orientation:options:completionHandler:")] + IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Wrap ("this (imageUrl, orientation, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + [Export ("initWithTargetedImageData:options:")] + IntPtr Constructor (NSData imageData, NSDictionary optionsDict); + + [Wrap ("this (imageData, options.GetDictionary ()!)")] + IntPtr Constructor (NSData imageData, VNImageOptions options); + + [Export ("initWithTargetedImageData:options:completionHandler:")] + IntPtr Constructor (NSData imageData, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Wrap ("this (imageData, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (NSData imageData, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + [Export ("initWithTargetedImageData:orientation:options:")] + IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, NSDictionary optionsDict); + + [Wrap ("this (imageData, orientation, options.GetDictionary ()!)")] + IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions options); + + [Export ("initWithTargetedImageData:orientation:options:completionHandler:")] + IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Wrap ("this (imageData, orientation, options.GetDictionary ()!, completionHandler)")] + IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); + + // We must inline the following 5 properties + // ('Revision', 'WeakSupportedRevisions', 'SupportedRevisions', 'DefaultRevision' and 'CurrentRevision') + // into subclasses so the correct class_ptr is used for the static members and the right enum type is also used. + + [TV (12,0), Mac (10,14), iOS (12,0)] + [Export ("revision")] + VNGenerateOpticalFlowRequestRevision Revision { get; set; } + + [TV (12,0), Mac (10,14), iOS (12,0)] + [Static] + [Export ("supportedRevisions", ArgumentSemantic.Copy)] + NSIndexSet WeakSupportedRevisions { get; } + + [TV (12,0), Mac (10,14), iOS (12,0)] + [Static] + [Wrap ("GetSupportedVersions (WeakSupportedRevisions)")] + VNGenerateOpticalFlowRequestRevision [] SupportedRevisions { get; } + + [TV (12,0), Mac (10,14), iOS (12,0)] + [Static] + [Export ("defaultRevision")] + VNGenerateOpticalFlowRequestRevision DefaultRevision { get; } + + [TV (12,0), Mac (10,14), iOS (12,0)] + [Static] + [Export ("currentRevision")] + VNGenerateOpticalFlowRequestRevision CurrentRevision { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNObservation))] + [DisableDefaultCtor] + interface VNTrajectoryObservation { + + [Export ("detectedPoints", ArgumentSemantic.Copy)] + VNPoint[] DetectedPoints { get; } + + [Export ("projectedPoints", ArgumentSemantic.Copy)] + VNPoint[] ProjectedPoints { get; } + + [Export ("equationCoefficients")] + Vector3 EquationCoefficients { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNObservation))] + [DisableDefaultCtor] + interface VNContoursObservation { + + [Field ("VNRecognizedPointGroupKeyAll")] + NSString RecognizedPointGroupKeyAll { get; } + + [Export ("contourCount")] + nint ContourCount { get; } + + [Export ("contourAtIndex:error:")] + [return: NullAllowed] + VNContour GetContour (nint contourIndex, [NullAllowed] out NSError error); + + [Export ("topLevelContourCount")] + nint TopLevelContourCount { get; } + + [Export ("topLevelContours")] + VNContour [] TopLevelContours { get; } + + [Export ("contourAtIndexPath:error:")] + [return: NullAllowed] + VNContour GetContour (NSIndexPath indexPath, [NullAllowed] out NSError error); + + [Export ("normalizedPath")] + CGPath NormalizedPath { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNObservation))] + [DisableDefaultCtor] + interface VNRecognizedPointsObservation { + + [Advice ("You can use 'GetAvailableKeys ()' where 'T' can be 'VNHumanBodyPoseObservationJointName' or 'VNHumanHandPoseObservationJointName' enum.")] + [Export ("availableKeys", ArgumentSemantic.Copy)] + NSString [] AvailableKeys { get; } + + [Advice ("You can use 'GetAvailableGroupKeys ()' where 'T' can be 'VNHumanBodyPoseObservationJointsGroupName' or 'VNHumanHandPoseObservationJointsGroupName' enum.")] + [Export ("availableGroupKeys", ArgumentSemantic.Copy)] + NSString [] AvailableGroupKeys { get; } + + [Export ("recognizedPointForKey:error:")] + [return: NullAllowed] + VNRecognizedPoint GetRecognizedPoint (NSString pointKey, out NSError error); + + [Wrap ("GetRecognizedPoint (handLandmark.GetConstant ()!, out error)")] + [return: NullAllowed] + VNRecognizedPoint GetRecognizedPoint (VNHumanHandPoseObservationJointName handLandmark, out NSError error); + + [Wrap ("GetRecognizedPoint (bodyLandmark.GetConstant ()!, out error)")] + [return: NullAllowed] + VNRecognizedPoint GetRecognizedPoint (VNHumanBodyPoseObservationJointName bodyLandmark, out NSError error); + + [Export ("recognizedPointsForGroupKey:error:")] + [return: NullAllowed] + NSDictionary GetRecognizedPoints (NSString groupKey, out NSError error); + + [Wrap ("GetRecognizedPoints (bodyLandmarkRegion.GetConstant ()!, out error)")] + [return: NullAllowed] + NSDictionary GetRecognizedPoints (VNHumanBodyPoseObservationJointsGroupName bodyLandmarkRegion, out NSError error); + + [Wrap ("GetRecognizedPoints (handLandmarkRegion.GetConstant ()!, out error)")] + [return: NullAllowed] + NSDictionary GetRecognizedPoints (VNHumanHandPoseObservationJointsGroupName handLandmarkRegion, out NSError error); + + [Export ("keypointsMultiArrayAndReturnError:")] + [return: NullAllowed] + MLMultiArray GetKeypoints (out NSError error); + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNImageBasedRequest))] + [DisableDefaultCtor] + interface VNStatefulRequest { + + [Export ("initWithFrameAnalysisSpacing:completionHandler:")] + IntPtr Constructor (CMTime frameAnalysisSpacing, [NullAllowed] VNRequestCompletionHandler completionHandler); + + [Export ("minimumLatencyFrameCount")] + nint MinimumLatencyFrameCount { get; } + + [Export ("frameAnalysisSpacing")] + CMTime FrameAnalysisSpacing { get; } + + // We must inline the following 5 properties + // ('Revision', 'WeakSupportedRevisions', 'SupportedRevisions', 'DefaultRevision' and 'CurrentRevision') + // into subclasses so the correct class_ptr is used for the static members and the right enum type is also used. + + [Export ("revision")] + VNStatefulRequestRevision Revision { get; set; } + + [Static] + [Export ("supportedRevisions", ArgumentSemantic.Copy)] + NSIndexSet WeakSupportedRevisions { get; } + + [Static] + [Wrap ("GetSupportedVersions (WeakSupportedRevisions)")] + VNStatefulRequestRevision [] SupportedRevisions { get; } + + [Static] + [Export ("defaultRevision")] + VNStatefulRequestRevision DefaultRevision { get; } + + [Static] + [Export ("currentRevision")] + VNStatefulRequestRevision CurrentRevision { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VNVideoProcessor { + + [Export ("initWithURL:")] + IntPtr Constructor (NSUrl videoUrl); + + [Export ("addRequest:processingOptions:error:")] + bool AddRequest (VNRequest request, VNVideoProcessorRequestProcessingOptions processingOptions, [NullAllowed] out NSError error); + + [Export ("removeRequest:error:")] + bool RemoveRequest (VNRequest request, [NullAllowed] out NSError error); + + [Export ("analyzeTimeRange:error:")] + bool Analyze (CMTimeRange timeRange, [NullAllowed] out NSError error); + + [Export ("cancel")] + void Cancel (); + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VNVideoProcessorCadence : NSCopying { + + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNVideoProcessorCadence))] + [DisableDefaultCtor] + interface VNVideoProcessorFrameRateCadence { + + [Export ("initWithFrameRate:")] + [DesignatedInitializer] + IntPtr Constructor (nint frameRate); + + [Export ("frameRate")] + nint FrameRate { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (VNVideoProcessorCadence))] + [DisableDefaultCtor] + interface VNVideoProcessorTimeIntervalCadence { + + [Export ("initWithTimeInterval:")] + [DesignatedInitializer] + IntPtr Constructor (double timeInterval); + + [Export ("timeInterval")] + double TimeInterval { get; } + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + interface VNVideoProcessorRequestProcessingOptions : NSCopying { + + [NullAllowed, Export ("cadence", ArgumentSemantic.Copy)] + VNVideoProcessorCadence Cadence { get; set; } + } } diff --git a/src/watchkit.cs b/src/watchkit.cs index f439280004fc..d3addac65655 100644 --- a/src/watchkit.cs +++ b/src/watchkit.cs @@ -10,6 +10,7 @@ // using ObjCRuntime; using Foundation; +using CloudKit; using CoreGraphics; using CoreLocation; using HealthKit; @@ -131,18 +132,22 @@ interface WKInterfaceController { [Export ("contextsForSegueWithIdentifier:inTable:rowIndex:")] NSObject [] GetContextsForSegue (string segueIdentifier, WKInterfaceTable table, nint rowIndex); + [Deprecated (PlatformName.WatchOS, 7,0)] [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("addMenuItemWithImage:title:action:")] void AddMenuItem (UIImage image, string title, Selector action); + [Deprecated (PlatformName.WatchOS, 7,0)] [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("addMenuItemWithImageNamed:title:action:")] void AddMenuItem (string imageName, string title, Selector action); + [Deprecated (PlatformName.WatchOS, 7,0)] [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("addMenuItemWithItemIcon:title:action:")] void AddMenuItem (WKMenuItemIcon itemIcon, string title, Selector action); + [Deprecated (PlatformName.WatchOS, 7,0)] [Export ("clearAllMenuItems")] void ClearAllMenuItems (); @@ -700,6 +705,7 @@ interface WKInterfaceTable { interface WKInterfaceMap { [Watch (6,0)][Advice ("This API exists for SwiftUI and is not generally needed.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'MKMapView' instead.")] [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("init")] IntPtr Constructor (); @@ -1006,6 +1012,7 @@ interface WKExtension { bool Autorotated { [Bind ("isAutorotated")] get; } [Watch (4,0)] + [Deprecated (PlatformName.WatchOS, 7,0)] [Export ("frontmostTimeoutExtended")] bool FrontmostTimeoutExtended { [Bind ("isFrontmostTimeoutExtended")] get; set; } @@ -1025,6 +1032,30 @@ interface WKExtension { [Watch (6,0)] [Export ("registeredForRemoteNotifications")] bool RegisteredForRemoteNotifications { [Bind ("isRegisteredForRemoteNotifications")] get; } + + [Watch (7,0)] + [Export ("globalTintColor")] + UIColor GlobalTintColor { get; } + + [Watch (7, 0), NoiOS] + [Notification, Field ("WKApplicationDidFinishLaunchingNotification")] + NSString DidFinishLaunchingNotification { get; } + + [Watch (7, 0), NoiOS] + [Notification, Field ("WKApplicationDidBecomeActiveNotification")] + NSString DidBecomeActiveNotification { get; } + + [Watch (7, 0), NoiOS] + [Notification, Field ("WKApplicationWillResignActiveNotification")] + NSString WillResignActiveNotification { get; } + + [Watch (7, 0), NoiOS] + [Notification, Field ("WKApplicationWillEnterForegroundNotification")] + NSString WillEnterForegroundNotification { get; } + + [Watch (7, 0), NoiOS] + [Notification, Field ("WKApplicationDidEnterBackgroundNotification")] + NSString DidEnterBackgroundNotification { get; } } [NoiOS] @@ -1119,6 +1150,10 @@ interface WKExtensionDelegate { [Watch (6,0)] [Export ("didReceiveRemoteNotification:fetchCompletionHandler:")] void DidReceiveRemoteNotification (NSDictionary userInfo, Action completionHandler); + + [Watch (7,0)] + [Export ("userDidAcceptCloudKitShareWithMetadata:")] + void UserDidAcceptCloudKitShare (CKShareMetadata cloudKitShareMetadata); } [Watch (2,2), NoiOS] @@ -1141,6 +1176,7 @@ interface WKInterfaceActivityRing interface WKInterfaceMovie { [Watch (6,0)][Advice ("This API exists for SwiftUI and is not generally needed.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'AVVideoPlayer' instead.")] [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("init")] IntPtr Constructor (); @@ -1430,6 +1466,7 @@ interface WKPanGestureRecognizer { interface WKInterfaceHMCamera { [Watch (6,0)][Advice ("This API exists for SwiftUI and is not generally needed.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'HMCameraView' instead.")] [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("init")] IntPtr Constructor (); @@ -1489,6 +1526,7 @@ interface WKInterfacePaymentButton { interface WKInterfaceSCNScene : SCNSceneRenderer { [Watch (6,0)][Advice ("This API exists for SwiftUI and is not generally needed.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'SCNSceneView' instead.")] [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("init")] IntPtr Constructor (); @@ -1509,6 +1547,7 @@ interface WKInterfaceSCNScene : SCNSceneRenderer { interface WKInterfaceSKScene { [Watch (6,0)][Advice ("This API exists for SwiftUI and is not generally needed.")] + [Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'SKSpriteView' instead.")] [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("init")] IntPtr Constructor (); @@ -1586,6 +1625,7 @@ enum WKExtendedRuntimeSessionInvalidationReason : long { SessionInProgress, Expired, ResignedFrontmost, + SuppressedBySystem, Error = -1, } diff --git a/src/wkwebkit.cs b/src/wkwebkit.cs index 81fbddb12d5d..f6099c70fdd9 100644 --- a/src/wkwebkit.cs +++ b/src/wkwebkit.cs @@ -18,6 +18,8 @@ using AppKit; #else using UIKit; +using NSPrintInfo = Foundation.NSObject; +using NSPrintOperation = Foundation.NSObject; #endif namespace WebKit @@ -226,6 +228,10 @@ interface WKNavigationDelegate { [iOS (9,0)][Mac (10,11)] [Export ("webViewWebContentProcessDidTerminate:")] void ContentProcessDidTerminate (WKWebView webView); + + [Mac (11,0)][iOS (14,0)] + [Export ("webView:authenticationChallenge:shouldAllowDeprecatedTLS:")] + void ShouldAllowDeprecatedTls (WKWebView webView, NSUrlAuthenticationChallenge challenge, Action decisionHandler); } [iOS (8,0), Mac (10,10)] // Not defined in 32-bit @@ -248,6 +254,8 @@ interface WKPreferences : NSSecureCoding { [Export ("minimumFontSize")] nfloat MinimumFontSize { get; set; } + [Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'WKWebPagePreferences.AllowsContentJavaScript' instead.")] + [Deprecated (PlatformName.iOS, 14,0, message: "Use 'WKWebPagePreferences.AllowsContentJavaScript' instead.")] [Export ("javaScriptEnabled")] bool JavaScriptEnabled { get; set; } @@ -291,8 +299,14 @@ interface WKScriptMessage { [Export ("frameInfo", ArgumentSemantic.Copy)] WKFrameInfo FrameInfo { get; } + + [Mac (11,0)][iOS (14,0)] + [Export ("world")] + WKContentWorld World { get; } } + interface IWKScriptMessageHandler {} + [Mac (10,10), iOS (8,0)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -423,6 +437,7 @@ interface WKWebsiteDataType { [iOS (9,0), Mac(10,11)] [BaseType (typeof(NSObject))] + [DisableDefaultCtor] // NSGenericException Reason: Calling [WKWebsiteDataStore init] is not supported. interface WKWebsiteDataStore : NSSecureCoding { [Static] @@ -546,9 +561,21 @@ interface WKUserContentController : NSSecureCoding { [Export ("addScriptMessageHandler:name:")] void AddScriptMessageHandler ([Protocolize] WKScriptMessageHandler scriptMessageHandler, string name); + [Mac (11,0), iOS (14,0)] + [Export ("addScriptMessageHandler:contentWorld:name:")] + void AddScriptMessageHandler (IWKScriptMessageHandler scriptMessageHandler, WKContentWorld world, string name); + + [Mac (11,0), iOS (14,0)] + [Export ("addScriptMessageHandlerWithReply:contentWorld:name:")] + void AddScriptMessageHandler (IWKScriptMessageHandlerWithReply scriptMessageHandlerWithReply, WKContentWorld contentWorld, string name); + [Export ("removeScriptMessageHandlerForName:")] void RemoveScriptMessageHandler (string name); + [Mac (11,0), iOS (14,0)] + [Export ("removeScriptMessageHandlerForName:contentWorld:")] + void RemoveScriptMessageHandler (string name, WKContentWorld contentWorld); + [Mac (10,13), iOS (11,0)] [Export ("addContentRuleList:")] void AddContentRuleList (WKContentRuleList contentRuleList); @@ -560,6 +587,14 @@ interface WKUserContentController : NSSecureCoding { [Mac (10,13), iOS (11,0)] [Export ("removeAllContentRuleLists")] void RemoveAllContentRuleLists (); + + [Mac (11,0), iOS (14,0)] + [Export ("removeAllScriptMessageHandlersFromContentWorld:")] + void RemoveAllScriptMessageHandlers (WKContentWorld contentWorld); + + [Mac (11,0), iOS (14,0)] + [Export ("removeAllScriptMessageHandlers")] + void RemoveAllScriptMessageHandlers (); } [iOS (8,0), Mac (10,10)] // Not defined in 32-bit @@ -570,6 +605,10 @@ interface WKUserScript : NSCopying { [Export ("initWithSource:injectionTime:forMainFrameOnly:")] IntPtr Constructor (NSString source, WKUserScriptInjectionTime injectionTime, bool isForMainFrameOnly); + [Mac (11,0), iOS (14,0)] + [Export ("initWithSource:injectionTime:forMainFrameOnly:inContentWorld:")] + IntPtr Constructor (NSString source, WKUserScriptInjectionTime injectionTime, bool isForMainFrameOnly, WKContentWorld contentWorld); + [Export ("source", ArgumentSemantic.Copy)] NSString Source { get; } @@ -747,6 +786,43 @@ interface WKWebView [Export ("handlesURLScheme:")] bool HandlesUrlScheme (string urlScheme); + [Mac (11,0), iOS (14,0)] + [Async] + [Export ("evaluateJavaScript:inFrame:inContentWorld:completionHandler:")] + void EvaluateJavaScript (string javaScriptString, [NullAllowed] WKFrameInfo frame, WKContentWorld contentWorld, [NullAllowed] Action completionHandler); + + [Mac (11,0), iOS (14,0)] + [Async] + [Export ("callAsyncJavaScript:arguments:inFrame:inContentWorld:completionHandler:")] + void CallAsyncJavaScript (string functionBody, [NullAllowed] NSDictionary arguments, [NullAllowed] WKFrameInfo frame, WKContentWorld contentWorld, [NullAllowed] Action completionHandler); + + [Mac (11,0), iOS (14,0)] + [Async] + [Export ("createPDFWithConfiguration:completionHandler:")] + void CreatePdf ([NullAllowed] WKPdfConfiguration pdfConfiguration, Action completionHandler); + + [Mac (11,0), iOS (14,0)] + [Async] + [Export ("createWebArchiveDataWithCompletionHandler:")] + void CreateWebArchive (Action completionHandler); + + [Mac (11,0), iOS (14,0)] + [Async] + [Export ("findString:withConfiguration:completionHandler:")] + void Find (string @string, [NullAllowed] WKFindConfiguration configuration, Action completionHandler); + + [Mac (11,0), iOS (14,0)] + [NullAllowed, Export ("mediaType")] + string MediaType { get; set; } + + [Mac (11,0), iOS (14,0)] + [Export ("pageZoom")] + nfloat PageZoom { get; set; } + + [NoiOS] + [Mac (11,0)] + [Export ("printOperationWithPrintInfo:")] + NSPrintOperation GetPrintOperation (NSPrintInfo printInfo); } delegate void WKJavascriptEvaluationResult (NSObject result, NSError error); @@ -828,6 +904,11 @@ interface WKWebViewConfiguration : NSCopying, NSSecureCoding { [iOS (13,0)] [Export ("defaultWebpagePreferences", ArgumentSemantic.Copy)] WKWebpagePreferences DefaultWebpagePreferences { get; set; } + + [Mac (11,0)] + [iOS (14,0)] + [Export ("limitsNavigationsToAppBoundDomains")] + bool LimitsNavigationsToAppBoundDomains { get; set; } } [iOS (8,0), Mac (10,10)] // Not defined in 32-bit @@ -921,6 +1002,11 @@ interface WKWebpagePreferences { [Export ("preferredContentMode", ArgumentSemantic.Assign)] WKContentMode PreferredContentMode { get; set; } + + [Mac (11,0)] + [iOS (14,0)] + [Export ("allowsContentJavaScript")] + bool AllowsContentJavaScript { get; set; } } [NoMac] @@ -932,4 +1018,66 @@ interface WKContextMenuElementInfo { NSUrl LinkUrl { get; } } + [Mac (11,0)][iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface WKContentWorld { + + [Static] + [Export ("pageWorld")] + WKContentWorld Page { get; } + + [Static] + [Export ("defaultClientWorld")] + WKContentWorld DefaultClient { get; } + + [Static] + [Export ("worldWithName:")] + WKContentWorld Create (string name); + + [NullAllowed, Export ("name")] + string Name { get; } + } + + [Mac (11,0)][iOS (14,0)] + [BaseType (typeof (NSObject))] + interface WKFindConfiguration : NSCopying { + + [Export ("backwards")] + bool Backwards { get; set; } + + [Export ("caseSensitive")] + bool CaseSensitive { get; set; } + + [Export ("wraps")] + bool Wraps { get; set; } + } + + [Mac (11,0)][iOS (14,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface WKFindResult : NSCopying { + + [Export ("matchFound")] + bool MatchFound { get; } + } + + [Mac (11,0)][iOS (14,0)] + [BaseType (typeof (NSObject), Name = "WKPDFConfiguration")] + interface WKPdfConfiguration : NSCopying { + + [Export ("rect", ArgumentSemantic.Assign)] + CGRect Rect { get; set; } + } + + interface IWKScriptMessageHandlerWithReply {} + + [Mac (11,0)][iOS (14,0)] + [Protocol] + interface WKScriptMessageHandlerWithReply { + + [Abstract] + [Export ("userContentController:didReceiveScriptMessage:replyHandler:")] + void DidReceiveScriptMessage (WKUserContentController userContentController, WKScriptMessage message, Action replyHandler); + } } diff --git a/src/xkit.cs b/src/xkit.cs index a60b8c7a86f1..ee3e47f8ce64 100644 --- a/src/xkit.cs +++ b/src/xkit.cs @@ -1375,6 +1375,10 @@ interface NSParagraphStyle : NSSecureCoding, NSMutableCopying { [NoiOS, NoTV, NoWatch] [Export ("headerLevel")] nint HeaderLevel { get; [NotImplemented] set; } + + [Mac (11,0), Watch (7,0), TV (14,0), iOS (14,0)] + [Export ("lineBreakStrategy")] + NSLineBreakStrategy LineBreakStrategy { get; [NotImplemented] set; } } [ThreadSafe] @@ -1484,5 +1488,10 @@ interface NSMutableParagraphStyle { [Export ("headerLevel")] [Override] nint HeaderLevel { get; set; } + + [Mac (11,0), Watch (7,0), TV (14,0), iOS (14,0)] + [Override] + [Export ("lineBreakStrategy", ArgumentSemantic.Assign)] + NSLineBreakStrategy LineBreakStrategy { get; set; } } } diff --git a/tests/Makefile b/tests/Makefile index 88cdc07e9487..0385efa58556 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -99,6 +99,7 @@ test.config: Makefile $(TOP)/Make.config $(TOP)/mk/mono.mk @echo "TVOS_SDK_VERSION=$(TVOS_SDK_VERSION)" >> $@ @echo "WATCH_SDK_VERSION=$(WATCH_SDK_VERSION)" >> $@ @echo "OSX_SDK_VERSION=$(OSX_SDK_VERSION)" >> $@ + @echo "DOTNET5_BCL_DIR=$(DOTNET5_BCL_DIR)" >> $@ test-system.config: Makefile $(TOP)/Make.config $(TOP)/mk/mono.mk @rm -f $@ @@ -367,7 +368,7 @@ wrench-%: wrench-jenkins: xharness/xharness.exe $(Q) rm -f $@-failed.stamp - $(Q) ulimit -n 4096 && $(SYSTEM_MONO) --trace=E:all --debug $(CURDIR)/$< $(XHARNESS_VERBOSITY) --jenkins --autoconf --rootdir $(CURDIR) --sdkroot $(XCODE_DEVELOPER_ROOT) --label run-all-tests,skip-device-tests --markdown-summary=$(abspath $(CURDIR))/TestSummary.md $(TESTS_PERIODIC_COMMAND) || echo "$$?" > $@-failed.stamp + $(Q) ulimit -n 4096 && $(SYSTEM_MONO) --trace=E:all --debug $(CURDIR)/$< $(XHARNESS_VERBOSITY) --jenkins --autoconf --rootdir $(CURDIR) --sdkroot $(XCODE_DEVELOPER_ROOT) --label run-all-tests,skip-ios-32-tests,skip-device-tests --markdown-summary=$(abspath $(CURDIR))/TestSummary.md $(TESTS_PERIODIC_COMMAND) || echo "$$?" > $@-failed.stamp @echo "@MonkeyWrench: SetSummary:
`cat $(abspath $(CURDIR))/TestSummary.md | awk 1 ORS='
'`" @echo "@MonkeyWrench: AddFile: $(abspath $(CURDIR))/TestSummary.md" $(Q) if test -e $@-failed.stamp; then EC=`cat $@-failed.stamp`; rm -f $@-failed.stamp; exit $$EC; fi diff --git a/tests/apitest/apitest.csproj b/tests/apitest/apitest.csproj index 73df41a7a0b1..73f271a5b1dc 100644 --- a/tests/apitest/apitest.csproj +++ b/tests/apitest/apitest.csproj @@ -161,6 +161,7 @@ TestRuntime.macos.cs +
diff --git a/tests/apitest/src/AppKit/NSScreen.cs b/tests/apitest/src/AppKit/NSScreen.cs new file mode 100644 index 000000000000..66925658f60f --- /dev/null +++ b/tests/apitest/src/AppKit/NSScreen.cs @@ -0,0 +1,63 @@ +using NUnit.Framework; +using System; +using System.Threading; + +using AppKit; +using ObjCRuntime; +using Foundation; + +namespace Xamarin.Mac.Tests +{ + [TestFixture] + public class NSSCreenTests + { + [Test] + public void ScreensNotMainThread () + { + var called = new AutoResetEvent (false); + var screensCount = 0; + var backgroundThread = new Thread (() => { + screensCount = NSScreen.Screens.Length; + called.Set (); + }); + backgroundThread.Start (); + Assert.IsTrue (called.WaitOne (1000), "called"); + Assert.IsTrue (screensCount > 0, "screens count"); + } + + [Test] + public void MainScreenNotMainThread () + { + var called = new AutoResetEvent (false); + NSScreen main = null; + var backgroundThread = new Thread (() => { + main = NSScreen.MainScreen; + called.Set (); + }); + backgroundThread.Start (); + Assert.IsTrue (called.WaitOne (1000), "called"); + Assert.IsNotNull (main, "main screen"); + } + + [Test] + public void DeepScreenNotMainThread () + { + var called = new AutoResetEvent (false); + NSScreen deepScreen = null; + var screenCount = 0; + + var backgroundThread = new Thread (() => { + screenCount = NSScreen.Screens.Length; + deepScreen = NSScreen.DeepestScreen; + called.Set (); + }); + backgroundThread.Start (); + Assert.IsTrue (called.WaitOne (1000), "called"); + if (screenCount > 1) { + Assert.IsNotNull (deepScreen, "deep screen"); + } else { + Assert.Inconclusive ("Only one screen detected."); + } + } + } +} diff --git a/tests/apitest/src/EveryFrameworkSmokeTest.cs b/tests/apitest/src/EveryFrameworkSmokeTest.cs index 079997c740da..a14c7cd3775f 100644 --- a/tests/apitest/src/EveryFrameworkSmokeTest.cs +++ b/tests/apitest/src/EveryFrameworkSmokeTest.cs @@ -76,6 +76,8 @@ LoadStatus CheckLoadFailure (string libraryName, string path) case "NetworkLibrary": case "UserNotificationsLibrary": case "VideoSubscriberAccountLibrary": + // macOS 10.16 + case "ClassKit": return LoadStatus.Acceptable; } } diff --git a/tests/cecil-tests/TaskAssemblyTests.cs b/tests/cecil-tests/TaskAssemblyTests.cs index 0569fd82e9a5..71f5c9371e5c 100644 --- a/tests/cecil-tests/TaskAssemblyTests.cs +++ b/tests/cecil-tests/TaskAssemblyTests.cs @@ -8,6 +8,7 @@ using Mono.Cecil; using Mono.Cecil.Cil; +using Xamarin.Tests; #nullable enable @@ -40,6 +41,8 @@ bool IsTaskType (TypeDefinition? td) [Test] public void EnsureOnlyCodeInBaseTasks () { + if (assembly.Contains ("Xamarin.Mac.Tasks.dll") && !Configuration.include_mac) + Assert.Ignore ("Ignore until Xamarin.Mac is re-enabled. Issue: https://github.com/xamarin/xamarin-macios/issues/9680"); var parameters = new ReaderParameters (ReadingMode.Deferred); var resolver = new DefaultAssemblyResolver (); resolver.AddSearchDirectory ("/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/Current/bin"); diff --git a/tests/cecil-tests/cecil-tests.csproj b/tests/cecil-tests/cecil-tests.csproj index 16eac6759b88..b72d1734a20d 100644 --- a/tests/cecil-tests/cecil-tests.csproj +++ b/tests/cecil-tests/cecil-tests.csproj @@ -34,5 +34,11 @@ Execution.cs + + ApplePlatform.cs + + + TargetFramework.cs + diff --git a/tests/common/Configuration.cs b/tests/common/Configuration.cs index bfaafc4da1e7..58ae26d857d7 100644 --- a/tests/common/Configuration.cs +++ b/tests/common/Configuration.cs @@ -20,6 +20,7 @@ static partial class Configuration static string mt_root; static string ios_destdir; static string mac_destdir; + public static string DotNet5BclDir; public static string mt_src_root; public static string sdk_version; public static string watchos_sdk_version; @@ -265,6 +266,7 @@ static Configuration () include_tvos = !string.IsNullOrEmpty (GetVariable ("INCLUDE_TVOS", "")); include_watchos = !string.IsNullOrEmpty (GetVariable ("INCLUDE_WATCH", "")); include_device = !string.IsNullOrEmpty (GetVariable ("INCLUDE_DEVICE", "")); + DotNet5BclDir = GetVariable ("DOTNET5_BCL_DIR", null); XcodeVersionString = GetXcodeVersion (xcode_root); #if MONOMAC @@ -380,6 +382,68 @@ public static string SdkRoot { } } + static string GetRefNuGetName (TargetFramework targetFramework) + { + switch (targetFramework.Platform) { + case ApplePlatform.iOS: + return "Microsoft.iOS.Ref"; + case ApplePlatform.TVOS: + return "Microsoft.tvOS.Ref"; + case ApplePlatform.WatchOS: + return "Microsoft.watchOS.Ref"; + case ApplePlatform.MacOSX: + return "Microsoft.macOS.Ref"; + default: + throw new InvalidOperationException (targetFramework.ToString ()); + } + } + + static string GetSdkNuGetName (TargetFramework targetFramework) + { + switch (targetFramework.Platform) { + case ApplePlatform.iOS: + return "Microsoft.iOS.Sdk"; + case ApplePlatform.TVOS: + return "Microsoft.tvOS.Sdk"; + case ApplePlatform.WatchOS: + return "Microsoft.watchOS.Sdk"; + case ApplePlatform.MacOSX: + return "Microsoft.macOS.Sdk"; + default: + throw new InvalidOperationException (targetFramework.ToString ()); + } + } + + public static string GetDotNetRoot () + { + return Path.Combine (SourceRoot, "_build"); + } + + public static string GetRefDirectory (TargetFramework targetFramework) + { + if (targetFramework.IsDotNet) + return Path.Combine (GetDotNetRoot (), GetRefNuGetName (targetFramework), "ref", "net5.0"); + + // This is only applicable for .NET + throw new InvalidOperationException (targetFramework.ToString ()); + } + + public static string GetSdkRoot (TargetFramework targetFramework) + { + if (targetFramework.IsDotNet) + return Path.Combine (GetDotNetRoot (), GetSdkNuGetName (targetFramework), "tools"); + switch (targetFramework.Platform) { + case ApplePlatform.iOS: + case ApplePlatform.TVOS: + case ApplePlatform.WatchOS: + return SdkRootXI; + case ApplePlatform.MacOSX: + return SdkRootXM; + default: + throw new InvalidOperationException (); + } + } + public static string SdkRootXI { get { return Path.Combine (TargetDirectoryXI, "Library", "Frameworks", "Xamarin.iOS.framework", "Versions", "Current"); @@ -428,6 +492,30 @@ public static string BGenClassicPath { } } + public static string GetBindingAttributePath (TargetFramework targetFramework) + { + if (targetFramework.IsDotNet) + return Path.Combine (GetSdkRoot (targetFramework), "lib", "Xamarin.Apple.BindingAttributes.dll"); + + switch (targetFramework.Platform) { + case ApplePlatform.iOS: + return Path.Combine (GetSdkRoot (targetFramework), "lib", "bgen", "Xamarin.iOS.BindingAttributes.dll"); + case ApplePlatform.TVOS: + return Path.Combine (GetSdkRoot (targetFramework), "lib", "bgen", "Xamarin.TVOS.BindingAttributes.dll"); + case ApplePlatform.WatchOS: + return Path.Combine (GetSdkRoot (targetFramework), "lib", "bgen", "Xamarin.WatchOS.BindingAttributes.dll"); + case ApplePlatform.MacOSX: + if (targetFramework == TargetFramework.Xamarin_Mac_2_0_Mobile) { + return Path.Combine (GetSdkRoot (targetFramework), "lib", "bgen", "Xamarin.Mac-mobile.BindingAttributes.dll"); + } else if (targetFramework == TargetFramework.Xamarin_Mac_4_5_Full) { + return Path.Combine (GetSdkRoot (targetFramework), "lib", "bgen", "Xamarin.Mac-full.BindingAttributes.dll"); + } + goto default; + default: + throw new InvalidOperationException (); + } + } + public static string MmpPath { get { return Path.Combine (BinDirXM, "mmp"); @@ -468,6 +556,45 @@ public static string GetBaseLibrary (Profile profile) } } + static string GetBaseLibraryName (TargetFramework targetFramework) + { + switch (targetFramework.Platform) { + case ApplePlatform.iOS: + return "Xamarin.iOS.dll"; + case ApplePlatform.TVOS: + return "Xamarin.TVOS.dll"; + case ApplePlatform.WatchOS: + return "Xamarin.WatchOS.dll"; + case ApplePlatform.MacOSX: + return "Xamarin.Mac.dll"; + default: + throw new InvalidOperationException (targetFramework.ToString ()); + } + } + + public static string GetBaseLibrary (TargetFramework targetFramework) + { + if (targetFramework.IsDotNet) + return Path.Combine (GetRefDirectory (targetFramework), GetBaseLibraryName (targetFramework)); + + switch (targetFramework.Platform) { + case ApplePlatform.iOS: + return XamarinIOSDll; + case ApplePlatform.TVOS: + return XamarinTVOSDll; + case ApplePlatform.WatchOS: + return XamarinWatchOSDll; + } + + if (targetFramework == TargetFramework.Xamarin_Mac_2_0_Mobile) { + return XamarinMacMobileDll; + } else if (targetFramework == TargetFramework.Xamarin_Mac_4_5_Full) { + return XamarinMacFullDll; + } + + throw new InvalidOperationException (targetFramework.ToString ()); + } + public static string GetTargetFramework (Profile profile) { switch (profile) { diff --git a/tests/common/TestRuntime.cs b/tests/common/TestRuntime.cs index 5f77a00d8a14..5ae9aab0edb7 100644 --- a/tests/common/TestRuntime.cs +++ b/tests/common/TestRuntime.cs @@ -208,6 +208,24 @@ public static bool CheckExactXcodeVersion (int major, int minor, int beta = 0) public static bool CheckXcodeVersion (int major, int minor, int build = 0) { switch (major) { + case 12: + switch (minor) { + case 0: +#if __WATCHOS__ + return CheckWatchOSSystemVersion (7, 0); +#elif __TVOS__ + return ChecktvOSSystemVersion (14, 0); +#elif __IOS__ + return CheckiOSSystemVersion (14, 0); +#elif MONOMAC + return CheckMacSystemVersion (11, 0, 0); +#else + throw new NotImplementedException (); +#endif + default: + throw new NotImplementedException (); + } + break; case 11: switch (minor) { case 0: diff --git a/tests/dotnet/UnitTests/DotNetUnitTests.csproj b/tests/dotnet/UnitTests/DotNetUnitTests.csproj index d585576ff5b9..6c09204a609a 100644 --- a/tests/dotnet/UnitTests/DotNetUnitTests.csproj +++ b/tests/dotnet/UnitTests/DotNetUnitTests.csproj @@ -36,6 +36,9 @@ external\Cache.cs + + external\TargetFramework.cs + diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index f2532c305ad2..645781803cba 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -8,6 +8,7 @@ using NUnit.Framework; using Xamarin.Utils; +using Xamarin.Tests; namespace Xamarin.Tests { [TestFixture] @@ -58,6 +59,8 @@ public void BuildMySingleView () [Test] public void BuildMyCocoaApp () { + if (!Configuration.include_mac) + Assert.Ignore ("Ignore until Xamarin.Mac is re-enabled. Issue: https://github.com/xamarin/xamarin-macios/issues/9680"); var platform = ApplePlatform.MacOSX; var project_path = GetProjectPath ("MyCocoaApp"); Clean (project_path); @@ -92,6 +95,8 @@ public void BuildMyWatchApp () [TestCase ("macOS")] public void BuildMyClassLibrary (string platform) { + if (platform == "macOS" && !Configuration.include_mac) + Assert.Ignore ("Ignore until Xamarin.Mac is re-enabled. Issue: https://github.com/xamarin/xamarin-macios/issues/9680"); var project_path = GetProjectPath ("MyClassLibrary", platform); Clean (project_path); var result = DotNet.AssertBuild (project_path, verbosity); @@ -104,6 +109,8 @@ public void BuildMyClassLibrary (string platform) [TestCase ("macOS")] public void BuildEmbeddedResourcesTest (string platform) { + if (!Configuration.include_mac) + Assert.Ignore ("Ignore until Xamarin.Mac is re-enabled. Issue: https://github.com/xamarin/xamarin-macios/issues/9680"); var assemblyName = "EmbeddedResources"; var dotnet_bindings_dir = Path.Combine (Configuration.SourceRoot, "tests", assemblyName, "dotnet"); var project_dir = Path.Combine (dotnet_bindings_dir, platform); @@ -136,6 +143,8 @@ public void BuildEmbeddedResourcesTest (string platform) [TestCase ("macOS")] public void BuildFSharpLibraryTest (string platform) { + if (!Configuration.include_mac) + Assert.Ignore ("Ignore until Xamarin.Mac is re-enabled. Issue: https://github.com/xamarin/xamarin-macios/issues/9680"); var assemblyName = "fsharplibrary"; var dotnet_bindings_dir = Path.Combine (Configuration.SourceRoot, "tests", assemblyName, "dotnet"); var project_dir = Path.Combine (dotnet_bindings_dir, platform); @@ -162,6 +171,8 @@ public void BuildFSharpLibraryTest (string platform) [TestCase ("macOS")] public void BuildBindingsTest (string platform) { + if (!Configuration.include_mac) + Assert.Ignore ("Ignore until Xamarin.Mac is re-enabled. Issue: https://github.com/xamarin/xamarin-macios/issues/9680"); var assemblyName = "bindings-test"; var dotnet_bindings_dir = Path.Combine (Configuration.SourceRoot, "tests", assemblyName, "dotnet"); var project_dir = Path.Combine (dotnet_bindings_dir, platform); @@ -191,6 +202,8 @@ public void BuildBindingsTest (string platform) [TestCase ("macOS")] public void BuildBindingsTest2 (string platform) { + if (!Configuration.include_mac) + Assert.Ignore ("Ignore until Xamarin.Mac is re-enabled. Issue: https://github.com/xamarin/xamarin-macios/issues/9680"); var assemblyName = "bindings-test2"; var dotnet_bindings_dir = Path.Combine (Configuration.SourceRoot, "tests", assemblyName, "dotnet"); var project_dir = Path.Combine (dotnet_bindings_dir, platform); @@ -220,6 +233,8 @@ public void BuildBindingsTest2 (string platform) [TestCase ("macOS", "xammac")] public void BuildBundledResources (string platform, string prefix) { + if (!Configuration.include_mac) + Assert.Ignore ("Ignore until Xamarin.Mac is re-enabled. Issue: https://github.com/xamarin/xamarin-macios/issues/9680"); var assemblyName = "BundledResources"; var dotnet_bindings_dir = Path.Combine (Configuration.SourceRoot, "tests", assemblyName, "dotnet"); var project_dir = Path.Combine (dotnet_bindings_dir, platform); diff --git a/tests/generator/BGenTests.cs b/tests/generator/BGenTests.cs index a308fa489b31..2ac85260bf80 100644 --- a/tests/generator/BGenTests.cs +++ b/tests/generator/BGenTests.cs @@ -17,59 +17,73 @@ namespace GeneratorTests public class BGenTests { [Test] +#if !NET [TestCase (Profile.macOSFull)] - [TestCase (Profile.macOSMobile)] [TestCase (Profile.macOSSystem)] +#endif + [TestCase (Profile.macOSMobile)] public void BMac_Smoke (Profile profile) { BuildFile (profile, "bmac_smoke.cs"); } +#if !NET // There's no System.Drawing in the .NET BCL [Test] [TestCase (Profile.macOSSystem)] public void BMac_NonAbsoluteReference_StillBuilds (Profile profile) { BuildFile (profile, true, false, new List () { "System.Drawing" }, "bmac_smoke.cs"); } +#endif +#if !NET [Test] [TestCase (Profile.macOSSystem)] public void BMac_AbsoluteSystemReference_StillBuilds (Profile profile) { BuildFile (profile, true, false, new List () { "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/System.Drawing.dll" }, "bmac_smoke.cs"); } +#endif [Test] +#if !NET [TestCase (Profile.macOSFull)] - [TestCase (Profile.macOSMobile)] [TestCase (Profile.macOSSystem)] +#endif + [TestCase (Profile.macOSMobile)] public void BMac_With_Hyphen_In_Name (Profile profile) { BuildFile (profile, "bmac-with-hyphen-in-name.cs"); } [Test] +#if !NET [TestCase (Profile.macOSFull)] - [TestCase (Profile.macOSMobile)] [TestCase (Profile.macOSSystem)] +#endif + [TestCase (Profile.macOSMobile)] public void PropertyRedefinitionMac (Profile profile) { BuildFile (profile, "property-redefination-mac.cs"); } [Test] +#if !NET [TestCase (Profile.macOSFull)] - [TestCase (Profile.macOSMobile)] [TestCase (Profile.macOSSystem)] +#endif + [TestCase (Profile.macOSMobile)] public void NSApplicationPublicEnsureMethods (Profile profile) { BuildFile (profile, "NSApplicationPublicEnsureMethods.cs"); } [Test] +#if !NET [TestCase (Profile.macOSFull)] - [TestCase (Profile.macOSMobile)] [TestCase (Profile.macOSSystem)] +#endif + [TestCase (Profile.macOSMobile)] public void ProtocolDuplicateAbstract (Profile profile) { BuildFile (profile, "protocol-duplicate-abstract.cs"); @@ -170,9 +184,11 @@ public void Bug29493 () } [Test] +#if !NET [TestCase (Profile.macOSFull)] - [TestCase (Profile.macOSMobile)] [TestCase (Profile.macOSSystem)] +#endif + [TestCase (Profile.macOSMobile)] public void Bug31788 (Profile profile) { var bgen = new BGenTool (); @@ -581,7 +597,7 @@ public void GH5416_setter () public void GHIssue5692 () => BuildFile (Profile.iOS, "ghissue5692.cs"); [Test] - public void GHIssue7304 () => BuildFile (Profile.macOSFull, "ghissue7304.cs"); + public void GHIssue7304 () => BuildFile (Profile.macOSMobile, "ghissue7304.cs"); [Test] public void RefOutParameters () diff --git a/tests/generator/BGenTool.cs b/tests/generator/BGenTool.cs index 7a073aa3a3ce..95fd6624417c 100644 --- a/tests/generator/BGenTool.cs +++ b/tests/generator/BGenTool.cs @@ -1,3 +1,5 @@ +#pragma warning disable 0649 // Field 'X' is never assigned to, and will always have its default value null + using System; using System.Collections.Generic; using System.IO; @@ -15,6 +17,7 @@ namespace Xamarin.Tests { class BGenTool : Tool { + public const string None = "None"; AssemblyDefinition assembly; public Profile Profile; @@ -25,12 +28,23 @@ class BGenTool : Tool public List Sources = new List (); public List References = new List (); + // If BaseLibrary and AttributeLibrary are null, we calculate a default value +#if NET + public string BaseLibrary; + public string AttributeLibrary; + public bool ReferenceBclByDefault = true; +#else + public string BaseLibrary = None; + public string AttributeLibrary = None; + public bool ReferenceBclByDefault = false; +#endif public string [] Defines; public string TmpDirectory; public string ResponseFile; public string WarnAsError; // Set to empty string to pass /warnaserror, set to non-empty string to pass /warnaserror: public string NoWarn; // Set to empty string to pass /nowarn, set to non-empty string to pass /nowarn: public string Out; + public int Verbosity = 1; protected override string ToolPath { get { return Profile == Profile.macOSClassic ? Configuration.BGenClassicPath : Configuration.BGenPath; } } protected override string MessagePrefix { get { return "BI"; } } @@ -61,6 +75,29 @@ string [] BuildArgumentArray () var sb = new List (); var targetFramework = (string) null; +#if NET + switch (Profile) { + case Profile.None: + break; + case Profile.iOS: + targetFramework = TargetFramework.DotNet_5_0_iOS_String; + break; + case Profile.tvOS: + targetFramework = TargetFramework.DotNet_5_0_tvOS_String; + break; + case Profile.watchOS: + targetFramework = TargetFramework.DotNet_5_0_watchOS_String; + break; + case Profile.macOSMobile: + targetFramework = TargetFramework.DotNet_5_0_macOS_String; + break; + case Profile.macOSFull: + case Profile.macOSSystem: + throw new InvalidOperationException ($"Only the Mobile profile can be specified for .NET"); + default: + throw new NotImplementedException ($"Profile: {Profile}"); + } +#else switch (Profile) { case Profile.None: break; @@ -88,6 +125,25 @@ string [] BuildArgumentArray () default: throw new NotImplementedException ($"Profile: {Profile}"); } +#endif + + TargetFramework? tf = null; + if (targetFramework != null) + tf = TargetFramework.Parse (targetFramework); + + if (BaseLibrary == null) { + if (tf.HasValue) + sb.Add ($"--baselib={Configuration.GetBaseLibrary (tf.Value)}"); + } else if (BaseLibrary != None) { + sb.Add ($"--baselib={BaseLibrary}"); + } + + if (AttributeLibrary == null) { + if (tf.HasValue) + sb.Add ($"--attributelib={Configuration.GetBindingAttributePath (tf.Value)}"); + } else if (AttributeLibrary != None) { + sb.Add ($"--attributelib={AttributeLibrary}"); + } if (!string.IsNullOrEmpty (targetFramework)) sb.Add ($"--target-framework={targetFramework}"); @@ -98,6 +154,16 @@ string [] BuildArgumentArray () foreach (var s in Sources) sb.Add ($"-s={s}"); + if (ReferenceBclByDefault) { + if (tf == null) { + // do nothing + } else if (tf.Value.IsDotNet == true) { + References.AddRange (Directory.GetFiles (Configuration.DotNet5BclDir, "*.dll")); + } else { + throw new NotImplementedException ("ReferenceBclByDefault"); + } + } + foreach (var r in References) sb.Add ($"-r={r}"); @@ -131,7 +197,8 @@ string [] BuildArgumentArray () arg += ":" + NoWarn; sb.Add (arg); } - sb.Add ("-v"); + if (Verbosity != 0) + sb.Add ("-" + new string (Verbosity > 0 ? 'v' : 'q', Math.Abs (Verbosity))); return sb.ToArray (); } diff --git a/tests/generator/ErrorTests.cs b/tests/generator/ErrorTests.cs index aa4c72d4093d..ba902f637016 100644 --- a/tests/generator/ErrorTests.cs +++ b/tests/generator/ErrorTests.cs @@ -29,6 +29,7 @@ public void BI0086 () bgen.AssertError (86, "A target framework (--target-framework) must be specified."); } +#if !NET [Test] public void BI0087 () { @@ -38,6 +39,7 @@ public void BI0087 () bgen.AssertExecuteError ("build"); bgen.AssertError (87, "Xamarin.Mac Classic binding projects are not supported anymore. Please upgrade the binding project to a Xamarin.Mac Unified binding project."); } +#endif [Test] [TestCase (Profile.iOS)] @@ -53,7 +55,9 @@ public void BI1036 (Profile profile) } [Test] +#if !NET [TestCase (Profile.macOSFull)] +#endif [TestCase (Profile.macOSMobile)] public void BI1037 (Profile profile) { @@ -66,7 +70,9 @@ public void BI1037 (Profile profile) } [Test] +#if !NET [TestCase (Profile.macOSFull)] +#endif [TestCase (Profile.macOSMobile)] public void BI1038 (Profile profile) { @@ -79,7 +85,9 @@ public void BI1038 (Profile profile) } [Test] +#if !NET [TestCase (Profile.macOSFull)] +#endif [TestCase (Profile.macOSMobile)] public void BI1039 (Profile profile) { @@ -92,7 +100,9 @@ public void BI1039 (Profile profile) } [Test] +#if !NET [TestCase (Profile.macOSFull)] +#endif [TestCase (Profile.macOSMobile)] public void BI1040 (Profile profile) { @@ -105,7 +115,9 @@ public void BI1040 (Profile profile) } [Test] +#if !NET [TestCase (Profile.macOSFull)] +#endif [TestCase (Profile.macOSMobile)] public void BI1041 (Profile profile) { @@ -744,7 +756,9 @@ public void BI1067_1070 () [Test] [TestCase (Profile.iOS)] +#if !NET [TestCase (Profile.macOSFull)] +#endif [TestCase (Profile.macOSMobile)] public void WarnAsError (Profile profile) { @@ -795,7 +809,9 @@ public void WarnAsError (Profile profile) [Test] [TestCase (Profile.iOS)] +#if !NET [TestCase (Profile.macOSFull)] +#endif [TestCase (Profile.macOSMobile)] public void NoWarn (Profile profile) { @@ -846,7 +862,9 @@ public void NoWarn (Profile profile) [Test] [TestCase (Profile.iOS)] +#if !NET [TestCase (Profile.macOSFull)] +#endif [TestCase (Profile.macOSMobile)] public void MissingExportOnProperty (Profile profile) { diff --git a/tests/generator/bug17232.cs b/tests/generator/bug17232.cs index 9614a6f8a712..f4412c835602 100644 --- a/tests/generator/bug17232.cs +++ b/tests/generator/bug17232.cs @@ -1,5 +1,4 @@ using System; -using MonoTouch; using Foundation; using ObjCRuntime; diff --git a/tests/generator/generator-tests.csproj b/tests/generator/generator-tests.csproj index c5232c5d3bad..434325aebe30 100644 --- a/tests/generator/generator-tests.csproj +++ b/tests/generator/generator-tests.csproj @@ -8,7 +8,7 @@ Library generatortests generator-tests - v4.6.1 + v4.8 true @@ -18,12 +18,14 @@ DEBUG; prompt 4 + latest true bin\Release prompt 4 + latest diff --git a/tests/introspection/ApiAvailabilityTest.cs b/tests/introspection/ApiAvailabilityTest.cs index 14d84001373f..d5318c5dfaf0 100644 --- a/tests/introspection/ApiAvailabilityTest.cs +++ b/tests/introspection/ApiAvailabilityTest.cs @@ -48,7 +48,7 @@ public ApiAvailabilityTest () #elif __WATCHOS__ Minimum = new Version (2,0); // Need to special case watchOS 'Maximum' version for OS minor subversions (can't change Constants.SdkVersion) - Maximum = new Version (6,2,5); + //Maximum = new Version (6,2,5); Filter = (AvailabilityBaseAttribute arg) => { return (arg.AvailabilityKind != AvailabilityKind.Introduced) || (arg.Platform != PlatformName.WatchOS); }; diff --git a/tests/introspection/ApiCMAttachmentTest.cs b/tests/introspection/ApiCMAttachmentTest.cs index b82fb3443948..d639741f554c 100644 --- a/tests/introspection/ApiCMAttachmentTest.cs +++ b/tests/introspection/ApiCMAttachmentTest.cs @@ -413,17 +413,9 @@ protected INativeObject GetINativeInstance (Type t) case "CGColor": return UIColor.Black.CGColor; case "CMClock": - CMClockError ce; - CMClock clock = CMClock.CreateAudioClock (out ce); - if (ce == CMClockError.None) - return clock; - throw new InvalidOperationException (string.Format ("Could not create the new instance for type {0}.", t.Name)); + return CMClock.HostTimeClock; case "CMTimebase": - clock = CMClock.CreateAudioClock (out ce); - if (ce == CMClockError.None) { - return new CMTimebase (clock); - } - throw new InvalidOperationException (string.Format ("Could not create the new instance for type {0}.", t.Name)); + return new CMTimebase (CMClock.HostTimeClock); case "CVPixelBufferPool": return new CVPixelBufferPool ( new CVPixelBufferPoolSettings (), diff --git a/tests/introspection/ApiCoreImageFiltersTest.cs b/tests/introspection/ApiCoreImageFiltersTest.cs index 1c2887d97629..fec03d85592f 100644 --- a/tests/introspection/ApiCoreImageFiltersTest.cs +++ b/tests/introspection/ApiCoreImageFiltersTest.cs @@ -45,7 +45,7 @@ public abstract class ApiCoreImageFiltersTest : ApiBaseTest { static Type CIFilterType = typeof (CIFilter); -#if true +#if false static TextWriter BindingOutput; #else static TextWriter BindingOutput = Console.Out; @@ -427,6 +427,13 @@ public void Keys () break; } break; + case "CIGlassDistortion": + switch (key) { + case "textureImage": + key = "texture"; + break; + } + break; } // 'input' is implied (generally) and explicit (in a few cases) if (!key.StartsWith ("input", StringComparison.Ordinal)) @@ -506,6 +513,17 @@ public void Keys () continue; } break; + case "CIAreaAverage": + case "CIAreaHistogram": + case "CIAreaMinMax": + switch (key) { + case "outputImageMPS": + case "outputImageMPS:": + case "outputImageNonMPS:": + // no doc for argument + continue; + } + break; } var cap = Char.ToUpperInvariant (key [0]) + key.Substring (1); diff --git a/tests/introspection/ApiCtorInitTest.cs b/tests/introspection/ApiCtorInitTest.cs index 0dfc3a6ff750..98301de62b68 100644 --- a/tests/introspection/ApiCtorInitTest.cs +++ b/tests/introspection/ApiCtorInitTest.cs @@ -68,6 +68,13 @@ protected virtual bool Skip (Type type) return true; case "NEPacketTunnelProvider": return true; + // On iOS 14 (beta 4) we get: [NISimulator] To simulate Nearby Interaction distance and direction, launch two or more simulators and + // move the simulator windows around the screen. + // The same error occurs when trying to default init NISession in Xcode. + // It seems that it is only possible to create a NISession when there are two devices or sims running, which makes sense given the description of + // NISession from Apple API docs: "An object that identifies a unique connection between two peer devices" + case "NISession": + return true; case "NSUnitDispersion": // -init should never be called on NSUnit! case "NSUnitVolume": // -init should never be called on NSUnit! case "NSUnitDuration": // -init should never be called on NSUnit! @@ -107,6 +114,10 @@ protected virtual bool Skip (Type type) return true; case "MPSImageArithmetic": // Cannot directly initialize MPSImageArithmetic. Use one of the sub-classes of MPSImageArithmetic. return true; + case "CKDiscoverUserInfosOperation": // deprecated, throws exception + case "CKSubscription": + case "MPSCnnConvolutionState": + return true; case "QTMovie": return TestRuntime.CheckSystemVersion (PlatformName.MacOSX, 10, 14, 4); // Broke in macOS 10.14.4. } @@ -418,6 +429,7 @@ protected virtual bool Match (ConstructorInfo ctor, Type type) // they don't make sense without extra arguments return true; case "ASCredentialProviderViewController": // goal is to "provides a standard interface for creating a credential provider extension", not a custom one + case "ASAccountAuthenticationModificationViewController": case "INUIAddVoiceShortcutViewController": // Doesn't make sense without INVoiceShortcut and there is no other way to set this unless you use the other only .ctor case "INUIEditVoiceShortcutViewController": // Doesn't make sense without INVoiceShortcut and there is no other way to set this unless you use the other only .ctor case "ILClassificationUIExtensionViewController": // Meant to be an extension @@ -435,7 +447,7 @@ protected virtual bool Match (ConstructorInfo ctor, Type type) return true; break; case "MPSTemporaryNDArray": // NS_UNAVAILABLE - if (cstr == $"Void .ctor(Metal.IMTLDevice, MetalPerformanceShaders.MPSNDArrayDescriptor)") + if (ctor.ToString () == $"Void .ctor(Metal.IMTLDevice, MetalPerformanceShaders.MPSNDArrayDescriptor)") return true; break; case "MFMailComposeViewController": // You are meant to use the system provided one @@ -471,6 +483,25 @@ protected virtual bool Match (ConstructorInfo ctor, Type type) if (cstr == $"Void .ctor(System.String)") return true; break; + case "UIRefreshControl": // init should be used instead. + if (cstr == $"Void .ctor(CoreGraphics.CGRect)") + return true; + break; + case "PKAddSecureElementPassViewController": + // no overview available yet... unlikely that it can be customized + if (cstr == "Void .ctor(System.String, Foundation.NSBundle)") + return true; + break; + case "VNDetectedPoint": + // This class is not meant to be instantiated + if (cstr == "Void .ctor(Double, Double)") + return true; + break; + case "VNStatefulRequest": + // This class uses another overload to get instantiated + if (cstr == "Void .ctor(Vision.VNRequestCompletionHandler)") + return true; + break; } var ep = ctor.GetParameters (); diff --git a/tests/introspection/ApiFieldTest.cs b/tests/introspection/ApiFieldTest.cs index 1f194535b2ca..f8b987a5e7c9 100644 --- a/tests/introspection/ApiFieldTest.cs +++ b/tests/introspection/ApiFieldTest.cs @@ -225,6 +225,14 @@ public void FieldExists () ReportError ("Could not open the library '{0}' to find the field '{1}': {2}", path, name, Dlfcn.dlerror ()); failed_fields.Add (name); } else if (Dlfcn.GetIndirect (lib, name) == IntPtr.Zero) { +#if __IOS__ + switch (name) { + case "CPMaximumListItemImageSize": + if (TestRuntime.CheckXcodeVersion (12,0)) + continue; + break; + } +#endif ReportError ("Could not find the field '{0}' in {1}", name, path); failed_fields.Add (name); } diff --git a/tests/introspection/ApiProtocolTest.cs b/tests/introspection/ApiProtocolTest.cs index 7bd6d5bd0e18..3b0b81d7edba 100644 --- a/tests/introspection/ApiProtocolTest.cs +++ b/tests/introspection/ApiProtocolTest.cs @@ -96,6 +96,25 @@ protected virtual bool Skip (Type type, string protocolName) // Xcode 11 case "NSFileProviderSearchQuery": return true; + // Xcode 12 + case "ACAccountType": + case "ASAccountAuthenticationModificationExtensionContext": + case "ASCredentialProviderExtensionContext": + case "AVAssetDownloadUrlSession": + case "NSFileProviderDomain": // Conformance not in headers + case "NSUrlSession": + case "SNClassification": + case "SNClassificationResult": + return true; + // PassKit now available on macOS 11+ + case "PKPaymentMethod": + case "PKPaymentMerchantSession": + case "PKPaymentSummaryItem": + case "PKShareablePassMetadata": + case "PKShippingMethod": + case "PKSuicaPassProperties": // Conformance not in headers + case "PKTransitPassProperties": // Conformance not in headers + return true; } break; case "NSMutableCopying": @@ -109,6 +128,9 @@ protected virtual bool Skip (Type type, string protocolName) // Xcode 11 - Conformance not in headers case "UISceneSession": return true; + // xocde 12 beta 1 + case "NSUrlSessionConfiguration": + return true; } break; case "NSCoding": @@ -161,6 +183,47 @@ protected virtual bool Skip (Type type, string protocolName) // Xcode 11.4, not documented case "NSHttpCookie": return true; + // Xcode 12 beta 1 + case "ASAccountAuthenticationModificationExtensionContext": + case "ASCredentialProviderExtensionContext": + case "GCController": + case "GCExtendedGamepad": + case "GCMicroGamepad": + case "GCMotion": + case "INFile": + case "SNClassification": + case "SNClassificationResult": + return true; + // PassKit now available on macOS 11+ + case "PKPayment": + case "PKPaymentSummaryItem": + case "PKShippingMethod": + case "PKPaymentRequest": + case "PKPaymentToken": + case "PKLabeledValue": + case "PKPaymentAuthorizationResult": + case "PKPaymentRequestShippingMethodUpdate": + case "PKPaymentRequestUpdate": + case "PKPaymentRequestPaymentMethodUpdate": + case "PKPaymentRequestShippingContactUpdate": + case "PKSuicaPassProperties": // Conformance not in headers + case "PKTransitPassProperties": // Conformance not in headers + case "PKDisbursementRequest": + case "PKDisbursementVoucher": + case "PKAddCarKeyPassConfiguration": + case "PKAddSecureElementPassConfiguration": + case "PKAddShareablePassConfiguration": + case "PKBarcodeEventConfigurationRequest": + case "PKBarcodeEventMetadataRequest": + case "PKBarcodeEventMetadataResponse": + case "PKBarcodeEventSignatureRequest": + case "PKBarcodeEventSignatureResponse": + case "PKIssuerProvisioningExtensionPaymentPassEntry": + case "PKIssuerProvisioningExtensionStatus": + case "PKPaymentMerchantSession": + case "PKPaymentRequestMerchantSessionUpdate": + case "PKShareablePassMetadata": + return true; } break; case "NSSecureCoding": @@ -225,6 +288,47 @@ protected virtual bool Skip (Type type, string protocolName) // Xcode 11.4, not documented case "NSHttpCookie": return true; + // Xcode 12 + case "ASAccountAuthenticationModificationExtensionContext": + case "ASCredentialProviderExtensionContext": + case "GCController": + case "GCExtendedGamepad": + case "GCMicroGamepad": + case "GCMotion": + case "SNClassification": + case "SNClassificationResult": + case "CPMessageListItem": // Conformance not in headers + return true; + // PassKit now available on macOS 11+ + case "PKPayment": + case "PKPaymentSummaryItem": + case "PKShippingMethod": + case "PKPaymentRequest": + case "PKPaymentToken": + case "PKLabeledValue": + case "PKPaymentAuthorizationResult": + case "PKPaymentRequestShippingMethodUpdate": + case "PKPaymentRequestUpdate": + case "PKPaymentRequestPaymentMethodUpdate": + case "PKPaymentRequestShippingContactUpdate": + case "PKSuicaPassProperties": // Conformance not in headers + case "PKTransitPassProperties": // Conformance not in headers + case "PKDisbursementRequest": + case "PKDisbursementVoucher": + case "PKAddCarKeyPassConfiguration": + case "PKAddSecureElementPassConfiguration": + case "PKAddShareablePassConfiguration": + case "PKBarcodeEventConfigurationRequest": + case "PKBarcodeEventMetadataRequest": + case "PKBarcodeEventMetadataResponse": + case "PKBarcodeEventSignatureRequest": + case "PKBarcodeEventSignatureResponse": + case "PKIssuerProvisioningExtensionPaymentPassEntry": + case "PKIssuerProvisioningExtensionStatus": + case "PKPaymentMerchantSession": + case "PKPaymentRequestMerchantSessionUpdate": + case "PKShareablePassMetadata": + return true; } break; // conformance added in Xcode 8 (iOS 10 / macOS 10.12) @@ -378,6 +482,32 @@ public virtual void SupportsSecureCoding () if (result) { // check that +supportsSecureCoding returns YES if (!supports) { +#if __IOS__ + // broken in xcode 12 beta 1 simulator (only) + if ((Runtime.Arch == Arch.SIMULATOR) && TestRuntime.CheckXcodeVersion (12,0)) { + switch (type.Name) { + case "ARFaceGeometry": + case "ARPlaneGeometry": + case "ARPointCloud": + case "ARAnchor": + case "ARBodyAnchor": + case "AREnvironmentProbeAnchor": + case "ARFaceAnchor": + case "ARGeoAnchor": + case "ARGeometryElement": + case "ARGeometrySource": + case "ARImageAnchor": + case "ARMeshAnchor": + case "ARMeshGeometry": + case "ARObjectAnchor": + case "ARParticipantAnchor": + case "ARPlaneAnchor": + case "ARReferenceObject": + case "ARWorldMap": + return; + } + } +#endif ReportError ("{0} conforms to NSSecureCoding but SupportsSecureCoding returned false", type.Name); } } else if (type.IsPublic && supports) { diff --git a/tests/introspection/ApiSelectorTest.cs b/tests/introspection/ApiSelectorTest.cs index db6758426ee2..8efd5d6c12fc 100644 --- a/tests/introspection/ApiSelectorTest.cs +++ b/tests/introspection/ApiSelectorTest.cs @@ -484,6 +484,114 @@ protected virtual bool Skip (Type type, string selectorName) case "setTileFunction:": case "maxTotalThreadsPerThreadgroup": case "setMaxTotalThreadsPerThreadgroup:": + case "binaryArchives": + case "setBinaryArchives:": + return true; + } + break; + case "MTLBlitPassDescriptor": + switch (selectorName) { + case "sampleBufferAttachments": + return true; + } + break; + case "MTLBlitPassSampleBufferAttachmentDescriptor": + switch (selectorName) { + case "endOfEncoderSampleIndex": + case "setEndOfEncoderSampleIndex:": + case "sampleBuffer": + case "setSampleBuffer:": + case "startOfEncoderSampleIndex": + case "setStartOfEncoderSampleIndex:": + return true; + } + break; + case "MTLComputePassDescriptor": + switch (selectorName) { + case "dispatchType": + case "setDispatchType:": + case "sampleBufferAttachments": + return true; + } + break; + case "MTLComputePassSampleBufferAttachmentDescriptor": + switch (selectorName) { + case "sampleBuffer": + case "setSampleBuffer:": + case "startOfEncoderSampleIndex": + case "setStartOfEncoderSampleIndex:": + case "endOfEncoderSampleIndex": + case "setEndOfEncoderSampleIndex:": + return true; + } + break; + case "MTLCounterSampleBufferDescriptor": + switch (selectorName) { + case "counterSet": + case "setCounterSet:": + case "label": + case "setLabel:": + case "sampleCount": + case "setSampleCount:": + case "storageMode": + case "setStorageMode:": + return true; + } + break; + case "MTLLinkedFunctions": + switch (selectorName) { + case "binaryFunctions": + case "setBinaryFunctions:": + case "functions": + case "setFunctions:": + case "groups": + case "setGroups:": + return true; + } + break; + case "MTLRenderPassSampleBufferAttachmentDescriptor": + switch (selectorName) { + case "endOfFragmentSampleIndex": + case "setEndOfFragmentSampleIndex:": + case "endOfVertexSampleIndex": + case "setEndOfVertexSampleIndex:": + case "sampleBuffer": + case "setSampleBuffer:": + case "startOfFragmentSampleIndex": + case "setStartOfFragmentSampleIndex:": + case "startOfVertexSampleIndex": + case "setStartOfVertexSampleIndex:": + return true; + } + break; + case "MTLIntersectionFunctionTableDescriptor": + switch (selectorName) { + case "functionCount": + case "setFunctionCount:": + return true; + } + break; + case "MTLResourceStatePassDescriptor": + switch (selectorName) { + case "sampleBufferAttachments": + return true; + } + break; + case "MTLResourceStatePassSampleBufferAttachmentDescriptor": + switch (selectorName) { + case "endOfEncoderSampleIndex": + case "setEndOfEncoderSampleIndex:": + case "sampleBuffer": + case "setSampleBuffer:": + case "startOfEncoderSampleIndex": + case "setStartOfEncoderSampleIndex:": + return true; + } + break; + case "MTLVisibleFunctionTableDescriptor": + switch (selectorName) { + case "functionCount": + case "setFunctionCount:": return true; } break; @@ -603,6 +711,13 @@ protected virtual bool Skip (Type type, string selectorName) return true; } break; + case "CPMessageListItem": + switch (selectorName) { + case "initWithConversationIdentifier:text:leadingConfiguration:trailingConfiguration:detailText:trailingText:": + case "initWithFullName:phoneOrEmailAddress:leadingConfiguration:trailingConfiguration:detailText:trailingText:": + return true; + } + break; case "VNFaceLandmarkRegion": case "VNFaceLandmarks": case "PHLivePhoto": @@ -882,6 +997,10 @@ protected virtual bool SkipInit (string selector, MethodBase m) case "initWithMinCenterCoordinateDistance:": case "initExcludingCategories:": case "initIncludingCategories:": + // Vision + case "initWithCenter:diameter:": + case "initWithCenter:radius:": + case "initWithR:theta:": var mi = m as MethodInfo; return mi != null && !mi.IsPublic && mi.ReturnType.Name == "IntPtr"; default: diff --git a/tests/introspection/ApiTypoTest.cs b/tests/introspection/ApiTypoTest.cs index 8ffb343f4ff1..45b185262e20 100644 --- a/tests/introspection/ApiTypoTest.cs +++ b/tests/introspection/ApiTypoTest.cs @@ -69,6 +69,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Accurracy", "Achivements", "Acos", + "Acosh", "Acn", "Actionname", "Activitiy", @@ -91,7 +92,9 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Arraycollation", "Argb", "Asin", + "Asinh", "Atan", + "Atanh", "Atmos", // Dolby Atmos "Ats", // App Transport Security "Attrib", @@ -134,6 +137,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Cavlc", "Cda", // acronym: Clinical Document Architecture "Cdrom", + "Celu", // Continuously Differentiable Exponential Linear Unit (ML) "Cfa", // acronym: Color Filter Array "Celp", // MPEG4ObjectID "Characterteristic", @@ -157,6 +161,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Craete", "Crosstraining", "Cubemap", + "Cmaf", // Common Media Application Format (mpeg4) "Cmy", // acronym: Cyan, magenta, yellow "Cmyk", // acronym: Cyan, magenta, yellow and key "Daap", @@ -165,6 +170,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Deca", "Decomposables", "Deinterlace", + "Depthwise", "Descendents", "Descrete", "Dhe", // Diffie–Hellman key exchange @@ -189,6 +195,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Downmix", // Sound terminology that means making a stereo mix from a 5.1 surround mix. "Dpa", "Dpad", // Directional pad (D-pad) + "Dpads", // plural of above "Droste", "Dtls", "Dtmf", // DTMF @@ -212,6 +219,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Emsg", // 4cc "Enc", "Eppc", + "Epub", "Eftpos", // Electronic funds transfer at point of sale "Eotf", // DisplayP3_PQ_Eotf "Exabits", @@ -235,10 +243,13 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Func", "Gadu", "Gbrg", // acronym for Green-Blue-Reg-Green + "Gelu", // Gaussian Error Linear Unit (ML) "Geocoder", "Gigapascals", "Gibibits", "Gibibytes", + "Girocard", + "Glorot", // NN "Gop", // acronym for Group Of Pictures "Gpp", "Gps", @@ -247,6 +258,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Gru", "Greeking", "Gtin", + "Gui", "Hardlink", "Heics", // High Efficiency Image File Format (Sequence) "Hdmi", @@ -263,6 +275,8 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Hoa", "Hrtf", // acronym used in AUSpatializationAlgorithm "Hvxc", // MPEG4ObjectID + "Icns", + "Ico", "Ies", "Icq", "Ident", @@ -288,6 +302,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Intermenstrual", "Intersector", "Intoi", + "Invitable", "Ios", "Iou", "Ipa", @@ -336,6 +351,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Mada", // payment system "Mapbuffer", "Matchingcoalesce", + "Mcp", // metacarpophalangeal (hand) "Mebibits", "Mebibytes", "Megaampere", @@ -356,16 +372,19 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Mimap", "Minification", "Mncs", + "Mgmt", "Mobike", // acronym "Morpher", "mtouch", "Mpe", // acronym "Mps", + "Msaa", // multisample anti-aliasing "Mtu", // acronym "Mtc", // acronym "Mtgp", "Mul", "Mult", + "Multihead", "Multipath", "Multipeer", "Muxed", @@ -373,6 +392,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Nanograms", "Nanowatts", "Nestrov", + "Nesterov", "nfloat", "Nfnt", "nint", @@ -398,6 +418,8 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Organisation", // kCGImagePropertyIPTCExtRegistryOrganisationID in Xcode9.3-b1 "Orthographyrange", "Orth", + "Osa", // Open Scripting Architecture + "Otsu", // threshold for image binarization "ove", "Paeth", // PNG filter "Palettize", @@ -421,6 +443,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Pkcs", "Placemark", "Playthrough", + "Pnc", // MIDI "Pnorm", "Pointillize", "Polyline", @@ -447,6 +470,8 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Reinvite", "Rel", "Relocalization", + "Relu", // Rectified Linear Unit (ML) + "Relun", // ReLUn - degree n Hermite coefficients "Reprandial", "Replayable", "Requestwith", @@ -460,6 +485,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Rpa", "Rpn", // acronym "Rsa", // Rivest, Shamir and Adleman + "Rsqrt", // reciprocal square root "Rssi", "Rtp", "Rtl", @@ -471,6 +497,8 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Sdtv", // acronym: Standard Definition Tele Vision "Sdnn", "Seekable", + "Selu", // Scaled Exponential Linear unit (ML) + "Sgd", // Stochastic Gradient Descent (ML) "Shadable", "Sharegroup", "Sha", // Secure Hash Algorithm @@ -509,6 +537,9 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Subsec", "Suica", // Japanese contactless smart card type "Superentity", + "Supertype", + "Supertypes", + "Svg", // Scalable Vector Graphics "Sym", "Synchronizable", "Symbologies", @@ -549,6 +580,8 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Underrun", "Unflagged", "Unfocusing", + "Uid", + "Unmap", "Unorm", "Unpremultiplied", "Unpremultiplying", @@ -562,6 +595,8 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Upce", "Uri", "Usac", // Unified Speech and Audio Coding + "Usd", // Universal Scene Description + "Usdz", // USD zip "Uti", "Varispeed", "Vergence", @@ -940,7 +975,11 @@ bool CheckLibrary (string lib) case Constants.CoreImageLibrary: break; default: - if (!File.Exists (lib)) + if (TestRuntime.CheckSystemVersion (PlatformName.MacOSX, 11, 0)) { + // on macOS 11.0 the frameworks binary files are not present (cache) but can be loaded + if (!Directory.Exists (Path.GetDirectoryName (lib))) + return false; + } else if (!File.Exists (lib)) return false; break; } @@ -984,6 +1023,14 @@ public void ConstantsCheck () Assert.True (CheckLibrary (s), fi.Name); break; #endif +#if !__MACOS__ + case "MediaSetupLibrary": + case "MLComputeLibrary": + // Xcode 12 beta 2 does not ship this framework/headers for the simulators + if (Runtime.Arch == Arch.DEVICE) + Assert.True (CheckLibrary (s), fi.Name); + break; +#endif #if __TVOS__ case "MetalPerformanceShadersLibrary": // not supported in tvOS (12.1) simulator so load fails @@ -994,9 +1041,14 @@ public void ConstantsCheck () default: if (fi.Name.EndsWith ("Library", StringComparison.Ordinal)) { #if __IOS__ - // NFC is currently not available on iPad - if (fi.Name == "CoreNFCLibrary" && UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) - continue; + if (fi.Name == "CoreNFCLibrary") { + // NFC is currently not available on iPad + if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) + continue; + // Phone works unless Xcode 12 on simulator + if ((Runtime.Arch == Arch.SIMULATOR) && TestRuntime.CheckXcodeVersion (12, 0)) + continue; + } #endif #if __MACOS__ // Only available in macOS 10.15.4+ diff --git a/tests/introspection/CoreSelectorTest.cs b/tests/introspection/CoreSelectorTest.cs index eb7cdead0222..fdf456fc03da 100644 --- a/tests/introspection/CoreSelectorTest.cs +++ b/tests/introspection/CoreSelectorTest.cs @@ -32,6 +32,15 @@ protected override bool CheckResponse (bool value, Type actualType, MethodBase m if (TestRuntime.CheckXcodeVersion (8, 0)) return true; break; + // broken with Xcode 12 beta 1 + case "MidiCISession": + switch (name) { + case "deviceIdentification": + if (TestRuntime.CheckXcodeVersion (12, 0)) + return true; + break; + } + break; } switch (name) { diff --git a/tests/introspection/Mac/MacApiCtorInitTest.cs b/tests/introspection/Mac/MacApiCtorInitTest.cs index eed8fa0ab411..e1702c50995a 100644 --- a/tests/introspection/Mac/MacApiCtorInitTest.cs +++ b/tests/introspection/Mac/MacApiCtorInitTest.cs @@ -294,6 +294,12 @@ protected override void CheckToString (NSObject obj) case "MonoMac.AVFoundation.AVCaptureDeviceInputSource": // Crashes on 10.9.5 case "AVFoundation.AVCaptureDeviceInputSource": break; + // 11.0 + case "AVFoundation.AVMediaSelection": + case "AVFoundation.AVMutableMediaSelection": + case "CoreLocation.CLBeacon": + case "GameKit.GKTurnBasedMatch": + break; default: base.CheckToString (obj); break; @@ -351,6 +357,9 @@ protected override void Dispose (NSObject obj, Type type) goto default; do_not_dispose.Add (obj); break; + case "CoreLocation.CLBeacon": + do_not_dispose.Add (obj); + break; default: base.Dispose (obj, type); break; diff --git a/tests/introspection/Mac/MacApiProtocolTest.cs b/tests/introspection/Mac/MacApiProtocolTest.cs index da5063ccf203..7c2b456c0a17 100644 --- a/tests/introspection/Mac/MacApiProtocolTest.cs +++ b/tests/introspection/Mac/MacApiProtocolTest.cs @@ -246,6 +246,10 @@ protected override bool Skip (Type type, string protocolName) if (!Mac.CheckSystemVersion (10, 14)) // Was added in 10.14 return true; break; + case "NSMenu": + if (!Mac.CheckSystemVersion (11, 0)) + return true; + break; } break; case "NSUserInterfaceValidations": @@ -274,6 +278,20 @@ protected override bool Skip (Type type, string protocolName) break; } break; + case "NSTextContent": + switch (type.Name) { + case "NSTextField": + case "NSTextView": + case "NSTokenField": + case "NSComboBox": + case "NSSearchField": + case "NSSecureTextField": + if (!Mac.CheckSystemVersion (11, 0)) + return true; + break; + + } + break; } switch (type.Name) { diff --git a/tests/introspection/Mac/MacApiSelectorTest.cs b/tests/introspection/Mac/MacApiSelectorTest.cs index fe8765558e41..f11b4ba9f184 100644 --- a/tests/introspection/Mac/MacApiSelectorTest.cs +++ b/tests/introspection/Mac/MacApiSelectorTest.cs @@ -138,6 +138,13 @@ protected override bool Skip (Type type, string selectorName) if (!Mac.CheckSystemVersion (10, 12)) // NSCoding was added in 10.12 return true; break; + case "MLDictionaryFeatureProvider": + case "MLMultiArray": + case "MLFeatureValue": + case "MLSequence": + if (!Mac.CheckSystemVersion (11, 0)) // NSCoding was added in 10.16 / 11 + return true; + break; } break; case "accessibilityNotifiesWhenDestroyed": @@ -672,6 +679,16 @@ protected override bool Skip (Type type, string selectorName) break; case "AVFoundation": switch (type.Name) { + case "AVCaptureDevice": + switch (selectorName) { + // macOS 11.0 / AVCaptureDeviceTransportControls category selectors don't respond anymore + case "setTransportControlsPlaybackMode:speed:": + case "transportControlsPlaybackMode": + case "transportControlsSpeed": + case "transportControlsSupported": + return true; + } + break; case "AVCapturePhoto": switch (selectorName) { case "fileDataRepresentationWithReplacementMetadata:replacementEmbeddedThumbnailPhotoFormat:replacementEmbeddedThumbnailPixelBuffer:replacementDepthData:": diff --git a/tests/introspection/iOS/iOSApiCtorInitTest.cs b/tests/introspection/iOS/iOSApiCtorInitTest.cs index 617ac09c67f4..7380fe7b0b6e 100644 --- a/tests/introspection/iOS/iOSApiCtorInitTest.cs +++ b/tests/introspection/iOS/iOSApiCtorInitTest.cs @@ -70,6 +70,7 @@ protected override bool Skip (Type type) return true; break; case "DeviceCheck": // Only available on device + case "MLCompute": // Only available on device if (Runtime.Arch == Arch.SIMULATOR) return true; break; @@ -222,6 +223,12 @@ protected override bool Skip (Type type) return TestRuntime.CheckXcodeVersion (11, 2); case "UIMenuController": // Stopped working with Xcode 11.3 beta 1 return TestRuntime.CheckXcodeVersion (11, 3); +#if __TVOS__ + case "MPSPredicate": + // the device .ctor ends up calling `initWithBuffer:offset:` and crash on older (non 4k AppleTV devices) + // MPSPredicate.mm:102: failed assertion `[MPSPredicate initWithBuffer:offset:] device: Apple A8 GPU does not support predication.' + return ((Runtime.Arch == Arch.DEVICE) && (UIScreen.MainScreen.NativeBounds.Width <= 1920)); +#endif default: return base.Skip (type); } @@ -362,6 +369,16 @@ protected override void CheckToString (NSObject obj) if (TestRuntime.CheckXcodeVersion (9, 0)) return; break; + // crash with xcode 12 beta 2 + case "AVMediaSelection": + case "AVMutableMediaSelection": + // crash with xcode 12 beta 3 + case "GKTurnBasedMatch": + // crash with xcode 12 GM + case "CSLocalizedString": + if (TestRuntime.CheckXcodeVersion (12, 0)) + return; + break; default: base.CheckToString (obj); break; diff --git a/tests/introspection/iOS/iOSApiPInvokeTest.cs b/tests/introspection/iOS/iOSApiPInvokeTest.cs index 501c9e472f2a..d9f4952dbdb6 100644 --- a/tests/introspection/iOS/iOSApiPInvokeTest.cs +++ b/tests/introspection/iOS/iOSApiPInvokeTest.cs @@ -65,6 +65,9 @@ protected override bool Skip (string symbolName) return !simulator; default: + // MLCompute not available in simulator as of Xcode 12 beta 3 + if (simulator && symbolName.StartsWith ("MLC", StringComparison.Ordinal)) + return true; return base.Skip (symbolName); } } diff --git a/tests/introspection/iOS/iOSApiProtocolTest.cs b/tests/introspection/iOS/iOSApiProtocolTest.cs index 91b8e29aa142..9f08d3b97d98 100644 --- a/tests/introspection/iOS/iOSApiProtocolTest.cs +++ b/tests/introspection/iOS/iOSApiProtocolTest.cs @@ -191,18 +191,6 @@ protected override bool Skip (Type type, string protocolName) case "HMEvent": case "HMEventTrigger": case "HMLocationEvent": - // new PassKit for payment also *privately* conforms to NSCoding - case "PKPayment": - case "PKPaymentSummaryItem": - case "PKShippingMethod": - case "PKPaymentRequest": - case "PKPaymentToken": - case "PKLabeledValue": - case "PKPaymentAuthorizationResult": - case "PKPaymentRequestShippingMethodUpdate": - case "PKPaymentRequestUpdate": - case "PKPaymentRequestPaymentMethodUpdate": - case "PKPaymentRequestShippingContactUpdate": // iOS9 case "UIFont": case "AVAssetTrackSegment": @@ -252,8 +240,6 @@ protected override bool Skip (Type type, string protocolName) case "UIDocumentBrowserAction": // Conformance not in headers return true; // iOS 11.3 - case "PKSuicaPassProperties": // Conformance not in headers - case "PKTransitPassProperties": // Conformance not in headers case "ARReferenceImage": // Conformance removed from headers in Xcode 9.3 Beta 4 case "NKAssetDownload": case "NKIssue": @@ -270,11 +256,7 @@ protected override bool Skip (Type type, string protocolName) case "ARDirectionalLightEstimate": case "ARFrame": case "ARLightEstimate": - case "ASCredentialProviderExtensionContext": case "ILClassificationUIExtensionContext": // Conformance not in headers - // iOS 12.2 - case "PKDisbursementRequest": - case "PKDisbursementVoucher": return true; // iOS 13 beta 1 (to be reviewed) case "LAContext": @@ -386,6 +368,31 @@ protected override bool Skip (Type type, string protocolName) case "TVTopShelfSectionedItem": return true; #endif + // Xcode 12 beta 2 + case "MSServiceAccount": + case "SRAmbientLightSample": + case "SRApplicationUsage": + case "SRDeviceUsageReport": + case "SRKeyboardMetrics": + case "SRKeyboardProbabilityMetric`1": + case "SRMessagesUsageReport": + case "SRNotificationUsage": + case "SRPhoneUsageReport": + case "SRVisit": + case "SRWebUsage": + return true; + // Xcode 12 beta 6 + case "CPButton": // conformance not in headers + case "CPContactCallButton": // conformance not in headers + case "CPContactDirectionsButton": // conformance not in headers + case "CPContactMessageButton": // conformance not in headers + case "CPMessageListItem": // Conformance not in headers + case "CPMessageListItemLeadingConfiguration": // conformance not in headers + case "CPMessageListItemTrailingConfiguration": // conformance not in headers + case "CPTextButton": // conformance not in headers + case "CPListImageRowItem": // conformance not in headers + case "CPListItem": // conformance not in headers + return true; } break; case "NSSecureCoding": @@ -410,18 +417,6 @@ protected override bool Skip (Type type, string protocolName) case "HMEventTrigger": case "HMLocationEvent": return true; - // new PassKit for payment also *privately* conforms to NSCoding - case "PKPayment": - case "PKPaymentSummaryItem": - case "PKShippingMethod": - case "PKPaymentRequest": - case "PKPaymentToken": - case "PKLabeledValue": - case "PKPaymentAuthorizationResult": - case "PKPaymentRequestShippingMethodUpdate": - case "PKPaymentRequestUpdate": - case "PKPaymentRequestPaymentMethodUpdate": - case "PKPaymentRequestShippingContactUpdate": // iOS9 case "UIFont": case "AVAssetTrackSegment": @@ -480,8 +475,6 @@ protected override bool Skip (Type type, string protocolName) case "UIDocumentBrowserAction": // Conformance not in headers return true; // iOS 11.3 - case "PKSuicaPassProperties": // Conformance not in headers - case "PKTransitPassProperties": // Conformance not in headers case "ARReferenceImage": // Conformance removed from headers in Xcode 9.3 Beta 4 case "NKAssetDownload": case "NKIssue": @@ -495,11 +488,7 @@ protected override bool Skip (Type type, string protocolName) case "HMAccessControl": return true; // Xcode 10 - case "ASCredentialProviderExtensionContext": case "ILClassificationUIExtensionContext": // Conformance not in headers - // iOS 12.2 - case "PKDisbursementRequest": - case "PKDisbursementVoucher": return true; // iOS 13 beta 1 (to be reviewed) case "LAContext": @@ -614,6 +603,29 @@ protected override bool Skip (Type type, string protocolName) case "TVTopShelfSectionedItem": return true; #endif + // Xcode 12 beta 2 + case "MSServiceAccount": + case "SRAmbientLightSample": + case "SRApplicationUsage": + case "SRDeviceUsageReport": + case "SRKeyboardMetrics": + case "SRKeyboardProbabilityMetric`1": + case "SRMessagesUsageReport": + case "SRNotificationUsage": + case "SRPhoneUsageReport": + case "SRVisit": + case "SRWebUsage": + return true; + // Xcode 12 beta 6 + case "CPButton": // conformance not in headers + case "CPContactCallButton": // conformance not in headers + case "CPContactDirectionsButton": // conformance not in headers + case "CPContactMessageButton": // conformance not in headers + case "CPMessageListItemLeadingConfiguration": // conformance not in headers + case "CPMessageListItemTrailingConfiguration": // conformance not in headers + case "CPTextButton": // conformance not in headers + case "CPListImageRowItem": // conformance not in headers + return true; } break; case "NSCopying": @@ -624,10 +636,6 @@ protected override bool Skip (Type type, string protocolName) case "MPMediaItemCollection": case "MPMediaEntity": return true; // skip - // new PassKit for payment also *privately* conforms to NSCoding - case "PKPaymentSummaryItem": - case "PKShippingMethod": - return true; // skip // iOS9 case "ACAccount": case "HKCategorySample": @@ -636,7 +644,6 @@ protected override bool Skip (Type type, string protocolName) case "HKQuantitySample": case "HKSample": case "HKWorkout": - case "PKPaymentMethod": // iOS 10 case "CXCallDirectoryExtensionContext": case "HKDocumentSample": @@ -648,7 +655,6 @@ protected override bool Skip (Type type, string protocolName) case "ACAccountCredential": // b2: Conformance not in headers case "ILMessageFilterExtensionContext": // b2: Conformance not in headers case "HMCharacteristicEvent": // Selectors not available on 32 bit - case "NSFileProviderDomain": // Conformance not in headers case "FPUIActionExtensionContext": // Conformance not in headers case "CXCall": // Conformance not in headers case "UIDocumentBrowserAction": // Conformance not in headers @@ -657,8 +663,6 @@ protected override bool Skip (Type type, string protocolName) case "ARDirectionalLightEstimate": return true; // iOS 11.3 - case "PKSuicaPassProperties": // Conformance not in headers - case "PKTransitPassProperties": // Conformance not in headers case "WKPreferences": // Conformance not in headers return true; #if __WATCHOS__ @@ -666,7 +670,6 @@ protected override bool Skip (Type type, string protocolName) return true; #endif // Xcode 10 - case "ASCredentialProviderExtensionContext": case "ILClassificationUIExtensionContext": // Conformance not in headers return true; // iOS 12.2 @@ -685,6 +688,9 @@ protected override bool Skip (Type type, string protocolName) case "HKAudiogramSample": // Conformance not in headers case "UIImage": // only complains on tvOS beta 6 return true; + // Xcode 12 beta 2 + case "HKElectrocardiogram": // Conformance not in headers + return true; } break; case "NSMutableCopying": @@ -906,6 +912,10 @@ protected override bool Skip (Type type, string protocolName) case "PKAddPassButton": case "INUIAddVoiceShortcutButton": return true; + // xcode 12 beta 1 + case "UIBarButtonItem": + case "MKUserTrackingBarButtonItem": + return true; } break; diff --git a/tests/introspection/iOS/iOSApiSelectorTest.cs b/tests/introspection/iOS/iOSApiSelectorTest.cs index 3c88dce2e176..c726c115a7db 100644 --- a/tests/introspection/iOS/iOSApiSelectorTest.cs +++ b/tests/introspection/iOS/iOSApiSelectorTest.cs @@ -37,6 +37,7 @@ protected override bool Skip (Type type) // they don't answer on the simulator (Apple implementation does not work) but fine on devices case "GameController": case "MonoTouch.GameController": + case "MLCompute": // xcode 12 beta 3 return Runtime.Arch == Arch.SIMULATOR; case "CoreAudioKit": @@ -343,9 +344,53 @@ protected override bool CheckResponse (bool value, Type actualType, MethodBase m break; } break; - } +#if __TVOS__ + // broken with Xcode 12 beta 1 + case "CKDiscoveredUserInfo": + switch (name) { + case "copyWithZone:": + case "encodeWithCoder:": + if (TestRuntime.CheckXcodeVersion (12, 0)) + return true; + break; + } + break; + case "CKSubscription": + switch (name) { + case "setZoneID:": + if (TestRuntime.CheckXcodeVersion (12, 0)) + return true; + break; + } + break; +#endif +#if __IOS__ + // broken with Xcode 12 beta 1 + case "ARBodyTrackingConfiguration": + case "ARImageTrackingConfiguration": + case "ARObjectScanningConfiguration": + case "ARWorldTrackingConfiguration": + switch (name) { + case "isAutoFocusEnabled": + case "setAutoFocusEnabled:": + if ((Runtime.Arch == Arch.SIMULATOR) && TestRuntime.CheckXcodeVersion (12, 0)) + return true; + break; + } + break; + case "ARReferenceImage": + switch (name) { + case "copyWithZone:": + if ((Runtime.Arch == Arch.SIMULATOR) && TestRuntime.CheckXcodeVersion (12, 0)) + return true; + break; + } + break; +#endif + break; + } - switch (name) { + switch (name) { // UIResponderStandardEditActions - stuffed inside UIResponder case "cut:": case "copy:": diff --git a/tests/linker/CommonLinkAllTest.cs b/tests/linker/CommonLinkAllTest.cs index ad35d1bc43a5..4817a95ef3f6 100644 --- a/tests/linker/CommonLinkAllTest.cs +++ b/tests/linker/CommonLinkAllTest.cs @@ -54,9 +54,6 @@ class TypeDescriptorTest { public class CommonLinkAllTest { string WorkAroundLinkerHeuristics { get { return ""; } } -#if NET - [Ignore ("https://github.com/xamarin/xamarin-macios/issues/9562")] -#endif [Test] public void BindingsAndBeforeInitField () { diff --git a/tests/mmptest/src/MMPTest.cs b/tests/mmptest/src/MMPTest.cs index fd77a3babe6d..67abe4692a5f 100644 --- a/tests/mmptest/src/MMPTest.cs +++ b/tests/mmptest/src/MMPTest.cs @@ -571,7 +571,7 @@ public void BuildUnified_AboveSDKDeploymentTargetShouldFail () RunMMPTest (tmpDir => { TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) { PlistReplaceStrings = new Dictionary { - { "10.9", "11.0"} + { "10.9", "19.0"} } }; TI.TestUnifiedExecutable (test, shouldFail: true); @@ -627,6 +627,7 @@ public void MM0132 (string opt) } [Test] + [Ignore ("https://github.com/xamarin/xamarin-macios/issues/8939")] public void MM0143 () { MMPTests.RunMMPTest (tmpDir => { diff --git a/tests/monotouch-test/ARKit/ARAnchorTest.cs b/tests/monotouch-test/ARKit/ARAnchorTest.cs index 61884497a80e..7259de1ace16 100644 --- a/tests/monotouch-test/ARKit/ARAnchorTest.cs +++ b/tests/monotouch-test/ARKit/ARAnchorTest.cs @@ -12,6 +12,7 @@ using System; using ARKit; using Foundation; +using ObjCRuntime; using NUnit.Framework; using MatrixFloat4x4 = global::OpenTK.NMatrix4; diff --git a/tests/monotouch-test/ARKit/AREnvironmentProbeAnchorTest.cs b/tests/monotouch-test/ARKit/AREnvironmentProbeAnchorTest.cs index 12dd822608cd..9ee9b89dfb56 100644 --- a/tests/monotouch-test/ARKit/AREnvironmentProbeAnchorTest.cs +++ b/tests/monotouch-test/ARKit/AREnvironmentProbeAnchorTest.cs @@ -12,6 +12,7 @@ using System; using ARKit; using Foundation; +using ObjCRuntime; using NUnit.Framework; using VectorFloat3 = global::OpenTK.NVector3; @@ -34,11 +35,19 @@ public void MarshallingTest () { var probeAnchor = new AREnvironmentProbeAnchor (MatrixFloat4x4.Identity, new VectorFloat3 (1, 1, 1)); Assert.AreEqual (MatrixFloat4x4.Identity, probeAnchor.Transform, "Transform"); - Assert.AreEqual (new VectorFloat3 (1, 1, 1), probeAnchor.Extent, "Extent"); + // broken since xcode 12 beta 1 on simulator (only) + if ((Runtime.Arch == Arch.DEVICE) || !TestRuntime.CheckXcodeVersion (12, 0)) + Assert.AreEqual (new VectorFloat3 (1, 1, 1), probeAnchor.Extent, "Extent"); + } + [Test] + public void MarshallingTest2 () + { var probeAnchorWithName = new AREnvironmentProbeAnchor ("My Anchor", MatrixFloat4x4.Identity, new VectorFloat3 (1, 1, 1)); Assert.AreEqual (MatrixFloat4x4.Identity, probeAnchorWithName.Transform, "Transform"); - Assert.AreEqual (new VectorFloat3 (1, 1, 1), probeAnchorWithName.Extent, "Extent"); + // broken since xcode 12 beta 1 on simulator (only) + if ((Runtime.Arch == Arch.DEVICE) || !TestRuntime.CheckXcodeVersion (12, 0)) + Assert.AreEqual (new VectorFloat3 (1, 1, 1), probeAnchorWithName.Extent, "Extent"); } } } diff --git a/tests/monotouch-test/ARKit/ARReferenceObjectTest.cs b/tests/monotouch-test/ARKit/ARReferenceObjectTest.cs index ca52420838c5..cd1fefeb77ad 100644 --- a/tests/monotouch-test/ARKit/ARReferenceObjectTest.cs +++ b/tests/monotouch-test/ARKit/ARReferenceObjectTest.cs @@ -12,6 +12,7 @@ using System; using ARKit; using Foundation; +using ObjCRuntime; using NUnit.Framework; using VectorFloat3 = global::OpenTK.NVector3; @@ -32,6 +33,8 @@ public void Setup () [Test] public void MarshallingTest () { + if ((Runtime.Arch == Arch.SIMULATOR) && TestRuntime.CheckXcodeVersion (12, 0)) + Assert.Ignore ("broken with beta 1 - can't instantiate the object"); var model3 = new ARReferenceObject (NSUrl.FromFilename ("Model3.arobject"), out NSError error); Assert.AreEqual ("Model3", model3.Name, "Name"); Assert.NotNull (model3.Center, "Center"); diff --git a/tests/monotouch-test/ARKit/ARSkeletonTest.cs b/tests/monotouch-test/ARKit/ARSkeletonTest.cs new file mode 100644 index 000000000000..2690c48d41d4 --- /dev/null +++ b/tests/monotouch-test/ARKit/ARSkeletonTest.cs @@ -0,0 +1,24 @@ +#if __IOS__ + +using System; +using System.Runtime.InteropServices; +using System.Threading.Tasks; +using ARKit; +using Foundation; +using NUnit.Framework; +using ObjCRuntime; + +namespace monotouchtest.ARKit { + [TestFixture] + [Preserve (AllMembers = true)] + public class ARSkeletonTest { + [Test] + public void UnknownPointTest () + { + using (var notKnownPoint = new NSString ("nariz")) + Assert.IsNull (ARSkeleton.CreateJointName (notKnownPoint)); + } + + } +} +#endif diff --git a/tests/monotouch-test/AVFoundation/CaptureMetadataOutputTest.cs b/tests/monotouch-test/AVFoundation/CaptureMetadataOutputTest.cs index 124795ef1add..a93cc353b86b 100644 --- a/tests/monotouch-test/AVFoundation/CaptureMetadataOutputTest.cs +++ b/tests/monotouch-test/AVFoundation/CaptureMetadataOutputTest.cs @@ -122,6 +122,9 @@ public void MetadataObjectTypesTest () // fail *and crash* on iOS 8 (at least on 32bits devices) if (!TestRuntime.CheckXcodeVersion (11, 0)) continue; + // xcode 12 beta 1 on device + if ((Runtime.Arch == Arch.DEVICE) && TestRuntime.CheckXcodeVersion (12, 0)) + continue; break; } metadataOutput.MetadataObjectTypes = val; diff --git a/tests/monotouch-test/AudioUnit/AudioUnitTest.cs b/tests/monotouch-test/AudioUnit/AudioUnitTest.cs index 6eb8a6dd9483..6302d3213a63 100644 --- a/tests/monotouch-test/AudioUnit/AudioUnitTest.cs +++ b/tests/monotouch-test/AudioUnit/AudioUnitTest.cs @@ -49,6 +49,25 @@ public void GetElementCount () var mixer = graph.GetNodeInfo (mixerNode); Assert.AreEqual (1, mixer.GetElementCount (AudioUnitScopeType.Global)); } + + [Test] + public void CopyIconTest () + { + TestRuntime.AssertXcodeVersion (12, 0); + AudioComponentDescription cd = new AudioComponentDescription () { + ComponentType = AudioComponentType.Output, +#if MONOMAC + ComponentSubType = (int)AudioUnitSubType.VoiceProcessingIO, +#else + ComponentSubType = 0x72696f63, // Remote_IO +#endif + ComponentManufacturer = AudioComponentManufacturerType.Apple + }; + AudioComponent component = AudioComponent.FindComponent (ref cd); + Assert.DoesNotThrow ( () => { + var icon = component.CopyIcon (); // ensuring that the manual binding does not throw, we do not care about the result + }); + } } } diff --git a/tests/monotouch-test/CarPlay/CPMessageListItemTests.cs b/tests/monotouch-test/CarPlay/CPMessageListItemTests.cs new file mode 100644 index 000000000000..6bd0ec02fb32 --- /dev/null +++ b/tests/monotouch-test/CarPlay/CPMessageListItemTests.cs @@ -0,0 +1,60 @@ +// +// Unit tests for CPMessageListItem +// +// Authors: +// Whitney Schmidt +// +// Copyright (c) Microsoft Corporation. +// + +#if __IOS__ +using System; +using NUnit.Framework; + +using CarPlay; +using Foundation; + +namespace MonoTouchFixtures.CarPlay { + + [TestFixture] + [Preserve (AllMembers = true)] + public class CPMessageListItemTest { + + [SetUp] + public void Setup () => TestRuntime.AssertXcodeVersion (12, 0); + + [Test] + public void InitUsingConversationIdentifier () + { + var leadingItemConfig = new CPMessageListItemLeadingConfiguration (new CPMessageLeadingItem (), null, false); + var trailingItemConfig = new CPMessageListItemTrailingConfiguration (new CPMessageTrailingItem (), null); + CPMessageListItem listItem = new CPMessageListItem ("convoId", "text", leadingItemConfig, trailingItemConfig, "detailText", "trailingText", CPMessageListItemType.Identifier); + + Assert.NotNull (listItem, "CPMessageListItem not be null."); + Assert.AreEqual (listItem.Text, "text"); + Assert.AreEqual (listItem.ConversationIdentifier, "convoId"); + Assert.AreSame (listItem.LeadingConfiguration, leadingItemConfig); + Assert.AreSame (listItem.TrailingConfiguration, trailingItemConfig); + Assert.AreEqual (listItem.DetailText, "detailText"); + Assert.AreEqual (listItem.TrailingText, "trailingText"); + } + + [Test] + public void InitUsingFullName () + { + var leadingItemConfig = new CPMessageListItemLeadingConfiguration (new CPMessageLeadingItem (), null, false); + var trailingItemConfig = new CPMessageListItemTrailingConfiguration (new CPMessageTrailingItem (), null); + CPMessageListItem listItem = new CPMessageListItem ("fullName", "phoneOrEmail", leadingItemConfig, trailingItemConfig, "detailText", "trailingText", CPMessageListItemType.FullName); + + Assert.NotNull (listItem, "CPMessageListItem not be null."); + Assert.AreEqual (listItem.Text, "fullName"); + Assert.AreEqual (listItem.PhoneOrEmailAddress, "phoneOrEmail"); + Assert.AreSame (listItem.LeadingConfiguration, leadingItemConfig); + Assert.AreSame (listItem.TrailingConfiguration, trailingItemConfig); + Assert.AreEqual (listItem.DetailText, "detailText"); + Assert.AreEqual (listItem.TrailingText, "trailingText"); + } + + } +} +#endif // __IOS__ diff --git a/tests/monotouch-test/ClockKit/CLKComplicationTest.cs b/tests/monotouch-test/ClockKit/CLKComplicationTest.cs new file mode 100644 index 000000000000..c42bb586ad36 --- /dev/null +++ b/tests/monotouch-test/ClockKit/CLKComplicationTest.cs @@ -0,0 +1,28 @@ +#if __WATCHOS__ +using System; +using NUnit.Framework; + +using ClockKit; +using Foundation; + +namespace MonoTouchFixtures.ClockKit { + + [TestFixture] + [Preserve (AllMembers = true)] + public class CLKComplicationTest { + + [SetUp] + public void Setup () + { + TestRuntime.AssertXcodeVersion (12, 0); + } + + [Test] + public void GetAllComplicationFamiliesTest () + { + var families = CLKComplication.GetAllComplicationFamilies (); + Assert.IsNotNull (families, "Families should not be null."); + } + } +} +#endif diff --git a/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs b/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs index 6d0106eba259..2ca003e15d27 100644 --- a/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs +++ b/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs @@ -137,6 +137,9 @@ public void CreateIndexed () Assert.False (cs.SupportsOutput, "SupportsOutput"); Assert.Null (cs.GetIccData (), "GetIccData"); } + + if (TestRuntime.CheckXcodeVersion (12, 0)) + Assert.False (cs.UsesExtendedRange, "UsesExtendedRange"); } } @@ -161,7 +164,10 @@ public void CreateExtendedSrgb () Assert.True (cs.SupportsOutput, "SupportsOutput"); using (var icc_data = cs.GetIccData ()) - Assert.That (icc_data.Length, Is.EqualTo ((nuint) 3144), "GetIccData"); + Assert.That (icc_data.Length, Is.EqualTo ((nuint)3144), "GetIccData"); + + if (TestRuntime.CheckXcodeVersion (12, 0)) + Assert.True (cs.UsesExtendedRange, "UsesExtendedRange"); } } diff --git a/tests/monotouch-test/CoreGraphics/ColorTest.cs b/tests/monotouch-test/CoreGraphics/ColorTest.cs index 2610c08e5387..e76676df0776 100644 --- a/tests/monotouch-test/CoreGraphics/ColorTest.cs +++ b/tests/monotouch-test/CoreGraphics/ColorTest.cs @@ -20,22 +20,14 @@ namespace MonoTouchFixtures.CoreGraphics { [Preserve (AllMembers = true)] public class ColorTest { -#if !XAMCORE_3_0 || MONOMAC - - // those API are not availably (officially) in iOS according to Apple header files - // still they do work which makes them _private_ API that we should not expose - [Test] public void GetConstantColor () { - // !unknown-pinvoke! CGColorGetConstantColor bound - // CGColorGetConstantColor -> CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA); - // constants to be used are not available either (and not bound) - // kCGColorWhite, kCGColorBlack and kCGColorClear - - var lib = Dlfcn.dlopen (Constants.CoreGraphicsLibrary, 0); - var clear = Dlfcn.GetStringConstant (lib, "kCGColorClear"); // constant also marked as __IPHONE_NA - using (var c = new CGColor (clear)) { +#if __IOS__ + // existing for a while outside iOS + TestRuntime.AssertXcodeVersion (12, 0); +#endif + using (var c = new CGColor (CGConstantColor.Clear)) { Assert.That (c.Handle, Is.Not.EqualTo (IntPtr.Zero), "CGColorGetConstantColor"); } } @@ -43,8 +35,10 @@ public void GetConstantColor () [Test] public void CreateGenericGray () { - // !unknown-pinvoke! CGColorCreateGenericGray bound - // CGColorCreateGenericGray -> CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA); +#if __IOS__ + // existing for a while outside iOS + TestRuntime.AssertXcodeVersion (12, 0); +#endif using (var c = new CGColor (0.5f, 0.5f)) { Assert.That (c.Handle, Is.Not.EqualTo (IntPtr.Zero), "CGColorCreateGenericGray"); } @@ -53,8 +47,10 @@ public void CreateGenericGray () [Test] public void CreateGenericRGB () { - // !unknown-pinvoke! CGColorCreateGenericRGB bound - // CGColorCreateGenericRGB -> CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA); +#if __IOS__ + // existing for a while outside iOS + TestRuntime.AssertXcodeVersion (12, 0); +#endif using (var c = new CGColor (0.5f, 0.5f, 0.5f, 0.5f)) { Assert.That (c.Handle, Is.Not.EqualTo (IntPtr.Zero), "CGColorCreateGenericRGB"); } @@ -68,7 +64,7 @@ public void ColorSpace () Assert.IsNotNull (spc, "ColorSpace"); } } -#endif + [Test] public void CreateSrgb () { @@ -90,6 +86,27 @@ public void CreateGenericGrayGamma2_2 () Assert.That (c.ColorSpace.Model, Is.EqualTo (CGColorSpaceModel.Monochrome), "CGColorSpaceModel"); } } + + [Test] + public void Cmyk () + { + TestRuntime.AssertXcodeVersion (12, 0); + using (var c = CGColor.CreateCmyk (0.1f, 0.2f, 0.3f, 0.4f, 0.5f)) { + Assert.That (c.NumberOfComponents, Is.EqualTo ((nint) 5), "NumberOfComponents"); + Assert.That ((Single) c.Alpha, Is.InRange (0.5f, 0.50001f), "Alpha"); + Assert.That (c.ColorSpace.Model, Is.EqualTo (CGColorSpaceModel.CMYK), "CGColorSpaceModel"); + } + } + + [Test] + public void GetAXName () + { + TestRuntime.AssertXcodeVersion (12, 0); + using (var c = new CGColor (CGConstantColor.Black)) { + Assert.IsNotNull (c.AXName, "AXName"); + } + } + } } diff --git a/tests/monotouch-test/CoreGraphics/PDFInfoTest.cs b/tests/monotouch-test/CoreGraphics/PDFInfoTest.cs index d79c34efe4c1..aff67d74d2d5 100644 --- a/tests/monotouch-test/CoreGraphics/PDFInfoTest.cs +++ b/tests/monotouch-test/CoreGraphics/PDFInfoTest.cs @@ -39,6 +39,8 @@ static public CGPDFInfo GetInfo () Subject = "My Subject", Title = "My Title", UserPassword = "My UserPassword", + CreatePdfA2u = true, + CreateLinearizedPdf = true, }; } @@ -52,6 +54,7 @@ public void ToDictionary () var info = GetInfo (); UIGraphics.BeginPDFContext("file", CGRect.Empty, info); } +#endif [Test] public void ToDictionaryWithPermissions () @@ -74,6 +77,5 @@ public void ToDictionaryWithPermissions () } } } -#endif } } diff --git a/tests/monotouch-test/CoreText/FontTest.cs b/tests/monotouch-test/CoreText/FontTest.cs index a9b8e801c074..3fc9f22ad599 100644 --- a/tests/monotouch-test/CoreText/FontTest.cs +++ b/tests/monotouch-test/CoreText/FontTest.cs @@ -11,6 +11,7 @@ using CoreGraphics; using CoreText; using Foundation; +using ObjCRuntime; #if MONOMAC using AppKit; #else @@ -115,5 +116,18 @@ public void CTFontCreateForStringWithLanguage () Assert.That (f3.Handle, Is.Not.EqualTo (IntPtr.Zero), "f3"); } } + + [Test] + public void CTFontCopyNameForGlyph () + { + TestRuntime.AssertXcodeVersion (12, 0); + + using (var ctfont = new CTFont ("HoeflerText-Regular", 10, CTFontOptions.Default)) + Assert.That (ctfont.GetGlyphName ((ushort) 65), Is.EqualTo ("asciicircum"), "1"); + + using (var font = CGFont.CreateWithFontName ("AppleColorEmoji")) + using (var ctfont = font.ToCTFont ((nfloat) 10.0)) + Assert.Null (ctfont.GetGlyphName ('\ud83d'), "2"); + } } } diff --git a/tests/monotouch-test/Foundation/UbiquitousKeyValueStoreTest.cs b/tests/monotouch-test/Foundation/UbiquitousKeyValueStoreTest.cs index 733707ce505f..b2d3e9aa7eb7 100644 --- a/tests/monotouch-test/Foundation/UbiquitousKeyValueStoreTest.cs +++ b/tests/monotouch-test/Foundation/UbiquitousKeyValueStoreTest.cs @@ -1,5 +1,5 @@ // -// Unit tests for NSTimer +// Unit tests for NSUbiquitousKeyValueStore // // Authors: // Rolf Bjarne Kvinge @@ -31,9 +31,21 @@ public void Indexer () using (var key = new NSString ("key")) { using (var value = new NSString ("value")) { store [key] = value; +#if __TVOS__ + // broken on appletv devices running tvOS 14, test will fail when fixed + if ((Runtime.Arch == Arch.DEVICE) && TestRuntime.CheckXcodeVersion (12,0)) + Assert.Null (store [key], "key 1"); + else +#endif Assert.AreEqual (value, store [key], "key 1"); store [(string) key] = value; +#if __TVOS__ + // broken on appletv devices running tvOS 14, test will fail when fixed + if ((Runtime.Arch == Arch.DEVICE) && TestRuntime.CheckXcodeVersion (12,0)) + Assert.Null (store [(string) key], "key 2"); + else +#endif Assert.AreEqual (value, store [(string) key], "key 2"); } diff --git a/tests/monotouch-test/Foundation/UrlSessionTaskTransactionMetricsTest.cs b/tests/monotouch-test/Foundation/UrlSessionTaskTransactionMetricsTest.cs index dbe411235bdf..d26beb2cac91 100644 --- a/tests/monotouch-test/Foundation/UrlSessionTaskTransactionMetricsTest.cs +++ b/tests/monotouch-test/Foundation/UrlSessionTaskTransactionMetricsTest.cs @@ -58,7 +58,7 @@ public void Properties () Assert.Null (sttm.ResponseEndDate, "ResponseEndDate"); Assert.Null (sttm.ResponseStartDate, "ResponseStartDate"); } - Assert.That (sttm.ReusedConnection, Is.EqualTo (true).Or.EqualTo (false), "ReusedConnection"); + Assert.AreEqual (TestRuntime.CheckXcodeVersion (12,0), sttm.ReusedConnection, "ReusedConnection"); Assert.Null (sttm.SecureConnectionEndDate, "SecureConnectionEndDate"); Assert.Null (sttm.SecureConnectionStartDate, "SecureConnectionStartDate"); } diff --git a/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs b/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs index f79fe233c696..ccf4393284d9 100644 --- a/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs +++ b/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs @@ -47,11 +47,10 @@ public void EnumValues_22351 () if (!TestRuntime.CheckXcodeVersion (11, 0)) continue; break; -#if !__WATCHOS__ + case HKCategoryTypeIdentifier.GeneralizedBodyAche: case HKCategoryTypeIdentifier.AbdominalCramps: case HKCategoryTypeIdentifier.Acne: case HKCategoryTypeIdentifier.AppetiteChanges: - case HKCategoryTypeIdentifier.GeneralizedBodyAche: case HKCategoryTypeIdentifier.Bloating: case HKCategoryTypeIdentifier.BreastPain: case HKCategoryTypeIdentifier.ChestTightnessOrPain: @@ -84,7 +83,17 @@ public void EnumValues_22351 () if (!TestRuntime.CheckXcodeVersion (11, 6)) continue; break; -#endif + case HKCategoryTypeIdentifier.BladderIncontinence: + case HKCategoryTypeIdentifier.DrySkin: + case HKCategoryTypeIdentifier.HairLoss: + case HKCategoryTypeIdentifier.MemoryLapse: + case HKCategoryTypeIdentifier.NightSweats: + case HKCategoryTypeIdentifier.VaginalDryness: + case HKCategoryTypeIdentifier.EnvironmentalAudioExposureEvent: + case HKCategoryTypeIdentifier.HandwashingEvent: + if (!TestRuntime.CheckXcodeVersion (12, 0)) + continue; + break; default: if (!TestRuntime.CheckXcodeVersion (7, 0)) continue; diff --git a/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs b/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs index 446fe5b2f449..bd468044bbd3 100644 --- a/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs +++ b/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs @@ -67,6 +67,17 @@ public void EnumValues_22351 () if (!TestRuntime.CheckXcodeVersion(11, 0)) continue; break; + case HKQuantityTypeIdentifier.SixMinuteWalkTestDistance: + case HKQuantityTypeIdentifier.StairAscentSpeed: + case HKQuantityTypeIdentifier.StairDescentSpeed: + case HKQuantityTypeIdentifier.WalkingAsymmetryPercentage: + case HKQuantityTypeIdentifier.WalkingDoubleSupportPercentage: + case HKQuantityTypeIdentifier.WalkingSpeed: + case HKQuantityTypeIdentifier.WalkingStepLength: + if (!TestRuntime.CheckXcodeVersion (12, 0)) + continue; + break; + } try { diff --git a/tests/monotouch-test/MLCompute/MLEnumsTest.cs b/tests/monotouch-test/MLCompute/MLEnumsTest.cs new file mode 100644 index 000000000000..9546d39edb56 --- /dev/null +++ b/tests/monotouch-test/MLCompute/MLEnumsTest.cs @@ -0,0 +1,44 @@ +#if !__WATCHOS__ + +using System; + +using Foundation; +using MLCompute; +using ObjCRuntime; +using NUnit.Framework; + +namespace MonoTouchFixtures.MLCompute { + + [TestFixture] + [Preserve (AllMembers = true)] + public class MLEnumsTest { + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); +#if !MONOMAC + if (Runtime.Arch == Arch.SIMULATOR) + Assert.Ignore ("https://github.com/xamarin/maccore/issues/2271"); +#endif + } + + [Test] + public void GetDebugDescription () + { + Assert.That (MLCActivationType.ReLU.GetDebugDescription (), Is.EqualTo ("ReLU"), "MLCActivationType"); + Assert.That (MLCArithmeticOperation.Add.GetDebugDescription (), Is.EqualTo ("Add"), "MLCArithmeticOperation"); + Assert.That (MLCPaddingPolicy.UsePaddingSize.GetDebugDescription (), Is.EqualTo ("Use Padding Size"), "MLCPaddingPolicy"); + Assert.That (MLCLossType.MeanAbsoluteError.GetDebugDescription (), Is.EqualTo ("Absolute Error"), "MLCLossType"); + Assert.That (MLCReductionType.ArgMax.GetDebugDescription (), Is.EqualTo ("Arg Max"), "MLCReductionType"); + Assert.That (MLCPaddingType.Constant.GetDebugDescription (), Is.EqualTo ("Constant"), "MLCPaddingType"); + Assert.That (MLCConvolutionType.Standard.GetDebugDescription (), Is.EqualTo ("Standard"), "MLCConvolutionType"); + Assert.That (MLCPoolingType.L2Norm.GetDebugDescription (), Is.EqualTo ("L2 Norm"), "MLCPoolingType"); + Assert.That (MLCSoftmaxOperation.LogSoftmax.GetDebugDescription (), Is.EqualTo ("Log Softmax"), "MLCSoftmaxOperation"); + Assert.That (MLCSampleMode.Nearest.GetDebugDescription (), Is.EqualTo ("Nearest"), "MLCSampleMode"); + Assert.That (MLCLstmResultMode.OutputAndStates.GetDebugDescription (), Is.EqualTo ("Output and States"), "MLCLstmResultMode"); + } + } +} + +#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/MapKit/PinAnnotationViewTest.cs b/tests/monotouch-test/MapKit/PinAnnotationViewTest.cs index 644ef4f952be..59bcead774c9 100644 --- a/tests/monotouch-test/MapKit/PinAnnotationViewTest.cs +++ b/tests/monotouch-test/MapKit/PinAnnotationViewTest.cs @@ -80,7 +80,8 @@ public void InitWithFrame () Assert.Null (av.PinTintColor, "PinTintColor"); // differs from the other init call } #else - if (TestRuntime.CheckSystemVersion (PlatformName.iOS, 10, 0)) + bool not_null = TestRuntime.CheckSystemVersion (PlatformName.iOS, 10, 0); + if (not_null) Assert.NotNull (av.PinTintColor, "PinTintColor"); else Assert.Null (av.PinTintColor, "PinTintColor"); // differs from the other init call diff --git a/tests/monotouch-test/MediaAccessibility/ImageCaptioningTest.cs b/tests/monotouch-test/MediaAccessibility/ImageCaptioningTest.cs index cb3adbb4ae7d..42dbe2a52138 100644 --- a/tests/monotouch-test/MediaAccessibility/ImageCaptioningTest.cs +++ b/tests/monotouch-test/MediaAccessibility/ImageCaptioningTest.cs @@ -95,12 +95,20 @@ public void SetCaption () Assert.Null (e, "ro / set / no error"); // weird, it can't be saved back to the file metadata var s = MAImageCaptioning.GetCaption (url, out e); - Assert.Null (s, "ro / roundtrip"); // not very surprising since Set can't save it + if (TestRuntime.CheckXcodeVersion (12, 0)) { + Assert.AreEqual ("xamarin", s, "ro / roundtrip"); + } else { + Assert.Null (s, "ro / roundtrip"); // not very surprising since Set can't save it + } Assert.Null (e, "ro / get / no error"); Assert.True (MAImageCaptioning.SetCaption (url, "xamarin", out e), "Set 2"); s = MAImageCaptioning.GetCaption (url, out e); - Assert.Null (s, "ro / back to original"); + if (TestRuntime.CheckXcodeVersion (12, 0)) { + Assert.AreEqual ("xamarin", s, "ro / back to original"); + } else { + Assert.Null (s, "ro / back to original"); + } Assert.Null (e, "ro / get back / no error"); } @@ -113,12 +121,20 @@ public void SetCaption () Assert.Null (e, "rw / set / no error"); // weird, it can't be saved back to the file metadata var s = MAImageCaptioning.GetCaption (rw_url, out e); - Assert.Null (s, "rw / roundtrip"); // :( + if (TestRuntime.CheckXcodeVersion (12, 0)) { + Assert.AreEqual ("xamarin", s, "rw / roundtrip"); // :) + } else { + Assert.Null (s, "rw / roundtrip"); // :( + } Assert.Null (e, "rw / get / no error"); Assert.True (MAImageCaptioning.SetCaption (rw_url, "xamarin", out e), "Set 2"); s = MAImageCaptioning.GetCaption (rw_url, out e); - Assert.Null (s, "rw / back to original"); + if (TestRuntime.CheckXcodeVersion (12, 0)) { + Assert.AreEqual ("xamarin", s, "rw / back to original"); + } else { + Assert.Null (s, "rw / back to original"); + } Assert.Null (e, "rw / get back / no error"); } } diff --git a/tests/monotouch-test/Metal/MTLBlitPassDescriptorTest.cs b/tests/monotouch-test/Metal/MTLBlitPassDescriptorTest.cs new file mode 100644 index 000000000000..fc5fd5ba4537 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLBlitPassDescriptorTest.cs @@ -0,0 +1,36 @@ +#if !__WATCHOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLBlitPassDescriptorTest { + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + } + + [Test] + public void TestSampleBufferAttachments () + { + // need to be tested since it fails intro + using var passDescripton = MTLBlitPassDescriptor.Create (); + Assert.IsNotNull (passDescripton, "passDescriptor"); + Assert.DoesNotThrow (() => { + using var attachments = passDescripton.SampleBufferAttachments; // don't care about the value, just that it works + }, "Attachements"); + } + } + +} + +#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/Metal/MTLBlitPassSampleBufferAttachmentDescriptorArrayTest.cs b/tests/monotouch-test/Metal/MTLBlitPassSampleBufferAttachmentDescriptorArrayTest.cs new file mode 100644 index 000000000000..60e12ff1adcb --- /dev/null +++ b/tests/monotouch-test/Metal/MTLBlitPassSampleBufferAttachmentDescriptorArrayTest.cs @@ -0,0 +1,47 @@ +#if !__WATCHOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLBlitPassSampleBufferAttachmentDescriptorArrayTest { + MTLBlitPassSampleBufferAttachmentDescriptorArray array; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + array = new MTLBlitPassSampleBufferAttachmentDescriptorArray (); + } + + [TearDown] + public void TearDown () + { + array?.Dispose (); + array = null; + } + + [Test] + public void IndexerTest () + { + + var obj = new MTLBlitPassSampleBufferAttachmentDescriptor (); + MTLBlitPassSampleBufferAttachmentDescriptor dupe = null; + Assert.DoesNotThrow (() => { + array [0] = obj; + }); + Assert.DoesNotThrow (() => { + dupe = array [0]; + }); + Assert.IsNotNull (dupe, "Dupe"); + Assert.AreNotEqual (IntPtr.Zero, dupe.Handle, "Dupe"); + } + } +} +#endif diff --git a/tests/monotouch-test/Metal/MTLBlitPassSampleBufferAttachmentDescriptorTest.cs b/tests/monotouch-test/Metal/MTLBlitPassSampleBufferAttachmentDescriptorTest.cs new file mode 100644 index 000000000000..e064234c7d92 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLBlitPassSampleBufferAttachmentDescriptorTest.cs @@ -0,0 +1,76 @@ +#if !__WATCHOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLBlitPassSampleBufferAttachmentDescriptorTest { + MTLBlitPassSampleBufferAttachmentDescriptor descriptor; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + descriptor = new MTLBlitPassSampleBufferAttachmentDescriptor (); + } + + [TearDown] + public void TearDown () + { + descriptor?.Dispose (); + descriptor = null; + } + + [Test] + public void SampleBufferTest () + { + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.SampleBuffer = null; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + using var buffer = descriptor.SampleBuffer; + }, "Getter"); + } + + [Test] + public void StartOfEncoderSampleIndexTest () + { + nuint newIndex = 10; + nuint objIndex = 0; + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.StartOfEncoderSampleIndex = newIndex ; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + objIndex = descriptor.StartOfEncoderSampleIndex; + }, "Getter"); + Assert.AreEqual (newIndex, objIndex, "Value"); + } + + [Test] + public void EndOfEncoderSampleIndexTest () + { + nuint newIndex = 10; + nuint objIndex = 0; + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.EndOfEncoderSampleIndex = newIndex ; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + objIndex = descriptor.EndOfEncoderSampleIndex; + }, "Getter"); + Assert.AreEqual (newIndex, objIndex, "Value"); + } + } + +} + +#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/Metal/MTLComputePassDescriptorTest.cs b/tests/monotouch-test/Metal/MTLComputePassDescriptorTest.cs new file mode 100644 index 000000000000..859d26f31375 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLComputePassDescriptorTest.cs @@ -0,0 +1,57 @@ +#if !__WATCHOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLComputePassDescriptorTest { + MTLComputePassDescriptor descriptor; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + descriptor = MTLComputePassDescriptor.Create (); + } + + [TearDown] + public void TearDown () + { + descriptor?.Dispose (); + descriptor = null; + } + + [Test] + public void DispatchTypeTest () + { + MTLDispatchType newType = MTLDispatchType.Concurrent; + MTLDispatchType objType = MTLDispatchType.Serial; + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.DispatchType = newType; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + objType = descriptor.DispatchType; + }, "Getter"); + Assert.AreEqual (newType, objType, "Type"); + } + + [Test] + public void SampleBufferAttachments () + { + Assert.DoesNotThrow (() => { + using var attachments = descriptor.SampleBufferAttachments; // testing the selector, dont care about the value. + }, "Getter"); + } + + } + +} + +#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/Metal/MTLComputePassSampleBufferAttachmentDescriptorArrayTest.cs b/tests/monotouch-test/Metal/MTLComputePassSampleBufferAttachmentDescriptorArrayTest.cs new file mode 100644 index 000000000000..ccef84320826 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLComputePassSampleBufferAttachmentDescriptorArrayTest.cs @@ -0,0 +1,47 @@ +#if !__WATCHOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLComputePassSampleBufferAttachmentDescriptorArrayTest { + MTLComputePassSampleBufferAttachmentDescriptorArray array; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + array = new MTLComputePassSampleBufferAttachmentDescriptorArray (); + } + + [TearDown] + public void TearDown () + { + array?.Dispose (); + array = null; + } + + [Test] + public void IndexerTest () + { + + var obj = new MTLComputePassSampleBufferAttachmentDescriptor (); + MTLComputePassSampleBufferAttachmentDescriptor dupe = null; + Assert.DoesNotThrow (() => { + array [0] = obj; + }); + Assert.DoesNotThrow (() => { + dupe = array [0]; + }); + Assert.IsNotNull (dupe, "Dupe"); + Assert.AreNotEqual (IntPtr.Zero, dupe.Handle, "Dupe"); + } + } +} +#endif diff --git a/tests/monotouch-test/Metal/MTLComputePassSampleBufferAttachmentDescriptorTest.cs b/tests/monotouch-test/Metal/MTLComputePassSampleBufferAttachmentDescriptorTest.cs new file mode 100644 index 000000000000..8ddc726c4848 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLComputePassSampleBufferAttachmentDescriptorTest.cs @@ -0,0 +1,75 @@ +#if !__WATCHOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLComputePassSampleBufferAttachmentDescriptorTest { + MTLComputePassSampleBufferAttachmentDescriptor descriptor; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + descriptor = new MTLComputePassSampleBufferAttachmentDescriptor (); + } + + [TearDown] + public void TearDown () + { + descriptor?.Dispose (); + descriptor = null; + } + + [Test] + public void SampleBufferTest () + { + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.SampleBuffer = null; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + using var buffer = descriptor.SampleBuffer; + }, "Getter"); + } + + [Test] + public void StartOfEncoderSampleIndexTest () + { + nuint newIndex = 10; + nuint objIndex = 0; + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.StartOfEncoderSampleIndex = newIndex ; + }, "Setter"); + Assert.DoesNotThrow (() => { + objIndex = descriptor.StartOfEncoderSampleIndex; + }, "Getter"); + Assert.AreEqual (newIndex, objIndex, "Value"); + } + + [Test] + public void EndOfEncoderSampleIndexTest () + { + nuint newIndex = 10; + nuint objIndex = 0; + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.EndOfEncoderSampleIndex = newIndex ; + }, "Setter"); + Assert.DoesNotThrow (() => { + objIndex = descriptor.EndOfEncoderSampleIndex; + }, "Getter"); + Assert.AreEqual (newIndex, objIndex, "Value"); + } + } + +} + +#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/Metal/MTLCounterSampleBufferDescriptorTest.cs b/tests/monotouch-test/Metal/MTLCounterSampleBufferDescriptorTest.cs new file mode 100644 index 000000000000..d5b0a6a69fdd --- /dev/null +++ b/tests/monotouch-test/Metal/MTLCounterSampleBufferDescriptorTest.cs @@ -0,0 +1,87 @@ +#if !__WATCHOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLCounterSampleBufferDescriptorTest { + MTLCounterSampleBufferDescriptor descriptor; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + descriptor = new MTLCounterSampleBufferDescriptor (); + } + + [TearDown] + public void TearDown () + { + descriptor?.Dispose (); + descriptor = null; + } + + [Test] + public void CounterSetTest () + { + Assert.DoesNotThrow (() => { + descriptor.CounterSet = null; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + using var buffer = descriptor.CounterSet; + }, "Getter"); + } + + [Test] + public void LabelTest () + { + string newLabel = "MyLabel"; + string objLabel = null; + + Assert.DoesNotThrow (() => { + descriptor.Label = newLabel; + }, "Setter"); + Assert.DoesNotThrow (() => { + objLabel = descriptor.Label; + }, "Getter"); + Assert.AreEqual (newLabel, objLabel, "Label"); + } + + [Test] + public void StorageModeTest () + { + var newMode = MTLStorageMode.Private; + var objMode = MTLStorageMode.Memoryless; + Assert.DoesNotThrow (() => { + descriptor.StorageMode = newMode; + }, "Setter"); + Assert.DoesNotThrow (() => { + objMode = descriptor.StorageMode; + }, "Getter"); + Assert.AreEqual (newMode, objMode, "Mode"); + } + + [Test] + public void SampleCountTest () + { + nuint newCount = 10; + nuint objCount = 0; + + Assert.DoesNotThrow (() => { + descriptor.SampleCount = newCount; + }, "Setter"); + Assert.DoesNotThrow (() => { + objCount = descriptor.SampleCount; + }, "Getter"); + Assert.AreEqual (newCount, objCount, "Count"); + } + } +} + +#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/Metal/MTLIntersectionFunctionTableDescriptorTest.cs b/tests/monotouch-test/Metal/MTLIntersectionFunctionTableDescriptorTest.cs new file mode 100644 index 000000000000..59efb5b18496 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLIntersectionFunctionTableDescriptorTest.cs @@ -0,0 +1,40 @@ +#if !__WATCHOS__ && !__TVOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLIntersectionFunctionTableDescriptorTest { + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + } + + [Test] + public void FunctionCountTest () + { + using var descriptor = MTLIntersectionFunctionTableDescriptor.Create (); + + nuint newCount = 10; + nuint objCount = 0; + + Assert.DoesNotThrow (() => { + descriptor.FunctionCount = newCount; + }, "Setter"); + Assert.DoesNotThrow (() => { + objCount = descriptor.FunctionCount; + }, "Getter"); + Assert.AreEqual (newCount, objCount, "Count"); + } + } +} + +#endif diff --git a/tests/monotouch-test/Metal/MTLIntersectionFunctionTableTests.cs b/tests/monotouch-test/Metal/MTLIntersectionFunctionTableTests.cs new file mode 100644 index 000000000000..3fef35888c5e --- /dev/null +++ b/tests/monotouch-test/Metal/MTLIntersectionFunctionTableTests.cs @@ -0,0 +1,77 @@ +#if !__WATCHOS__ && !__TVOS__ + +using System; +using Foundation; +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLIntersectionFunctionTableTests { + IMTLDevice device; + IMTLIntersectionFunctionTable functionTable; + IMTLComputePipelineState pipelineState; + IMTLLibrary library; + IMTLFunction function; + MTLIntersectionFunctionTableDescriptor descriptor; + + [SetUp] + public void SetUp () + { + + TestRuntime.AssertXcodeVersion (12,0); + + device = MTLDevice.SystemDefault; + // some older hardware won't have a default + if (device == null) + Assert.Inconclusive ("Metal is not supported"); + + library = device.CreateDefaultLibrary (); + if (library == null) // this happens on a simulator + Assert.Inconclusive ("Could not get the functions library for the device."); + + if (library.FunctionNames.Length == 0) + Assert.Inconclusive ("Could not get functions for the pipeline."); + + function = library.CreateFunction (library.FunctionNames [0]); + pipelineState = device.CreateComputePipelineState (function, MTLPipelineOption.ArgumentInfo, out MTLComputePipelineReflection reflection, out NSError error); + + if (error != null) { + Assert.Inconclusive ($"Could not create pipeline {error}"); + } + descriptor = MTLIntersectionFunctionTableDescriptor.Create (); + functionTable = pipelineState.CreateIntersectionFunctionTable (descriptor); + } + + [TearDown] + public void TearDown () + { + functionTable?.Dispose (); + pipelineState?.Dispose (); + library?.Dispose (); + function?.Dispose (); + descriptor?.Dispose (); + } + + [Test] + public void SetBuffersTest () + { + Assert.Throws (() => { + functionTable.SetBuffers (null, new nuint [0], new NSRange ()); + }, "Null buffers should throw."); + + Assert.Throws (() => { + functionTable.SetBuffers (new IMTLBuffer [0] , null, new NSRange ()); + }, "Null offsets should throw."); + + // assert we do not crash or throw, we are testing the extension method + Assert.DoesNotThrow (() => { + functionTable.SetBuffers (new IMTLBuffer [0], new nuint [0], new NSRange ()); + }, "Should not throw"); + } + + } +} +#endif diff --git a/tests/monotouch-test/Metal/MTLLinkedFunctionsTest.cs b/tests/monotouch-test/Metal/MTLLinkedFunctionsTest.cs new file mode 100644 index 000000000000..e775e30003cd --- /dev/null +++ b/tests/monotouch-test/Metal/MTLLinkedFunctionsTest.cs @@ -0,0 +1,67 @@ +#if !__WATCHOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLLinkedFunctionsTest { + MTLLinkedFunctions functions; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + functions = MTLLinkedFunctions.Create (); + } + + [TearDown] + public void TearDown () + { + functions?.Dispose (); + functions = null; + } + + [Test] + public void FunctionsTest () + { + Assert.DoesNotThrow (() => { + functions.Functions = null; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + var f = functions.Functions; + }, "Getter"); + } + +#if !__TVOS__ // Not present on tvos + [Test] + public void BinaryFunctions () + { + Assert.DoesNotThrow (() => { + functions.BinaryFunctions = null; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + var f = functions.BinaryFunctions; + }, "Getter"); + } +#endif + + [Test] + public void Groupstest () + { + Assert.DoesNotThrow (() => { + functions.Groups = null; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + var g = functions.Groups; + }, "Getter"); + } + } +} + +#endif diff --git a/tests/monotouch-test/Metal/MTLRenderPassSampleBufferAttachmentDescriptorArrayTest.cs b/tests/monotouch-test/Metal/MTLRenderPassSampleBufferAttachmentDescriptorArrayTest.cs new file mode 100644 index 000000000000..cd7d1b58b2d6 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLRenderPassSampleBufferAttachmentDescriptorArrayTest.cs @@ -0,0 +1,47 @@ +#if !__WATCHOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLRenderPassSampleBufferAttachmentDescriptorArrayTest { + MTLRenderPassSampleBufferAttachmentDescriptorArray array; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + array = new MTLRenderPassSampleBufferAttachmentDescriptorArray (); + } + + [TearDown] + public void TearDown () + { + array?.Dispose (); + array = null; + } + + [Test] + public void IndexerTest () + { + + var obj = new MTLRenderPassSampleBufferAttachmentDescriptor (); + MTLRenderPassSampleBufferAttachmentDescriptor dupe = null; + Assert.DoesNotThrow (() => { + array [0] = obj; + }); + Assert.DoesNotThrow (() => { + dupe = array [0]; + }); + Assert.IsNotNull (dupe, "Dupe"); + Assert.AreNotEqual (IntPtr.Zero, dupe.Handle, "Dupe"); + } + } +} +#endif diff --git a/tests/monotouch-test/Metal/MTLRenderPassSampleBufferAttachmentDescriptorTest.cs b/tests/monotouch-test/Metal/MTLRenderPassSampleBufferAttachmentDescriptorTest.cs new file mode 100644 index 000000000000..65e5339728e2 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLRenderPassSampleBufferAttachmentDescriptorTest.cs @@ -0,0 +1,103 @@ +#if !__WATCHOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLRenderPassSampleBufferAttachmentDescriptorTest { + MTLRenderPassSampleBufferAttachmentDescriptor descriptor; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + descriptor = new MTLRenderPassSampleBufferAttachmentDescriptor (); + } + + [TearDown] + public void TearDown () + { + descriptor?.Dispose (); + descriptor = null; + } + + [Test] + public void SampleBufferTest () + { + + Assert.DoesNotThrow (() => { + descriptor.SampleBuffer = null; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + using var f = descriptor.SampleBuffer; + }, "Getter"); + } + + [Test] + public void StartOfVertexSampleIndexTest () + { + nuint newIndex = 10; + nuint objIndex = 0; + + Assert.DoesNotThrow (() => { + descriptor.StartOfVertexSampleIndex = newIndex; + }, "Setter"); + Assert.DoesNotThrow (() => { + objIndex = descriptor.StartOfVertexSampleIndex; + }, "Getter"); + Assert.AreEqual (newIndex, objIndex, "Index"); + } + + [Test] + public void EndOfVertexSampleIndexTest () + { + nuint newIndex = 10; + nuint objIndex = 0; + + Assert.DoesNotThrow (() => { + descriptor.EndOfVertexSampleIndex = newIndex; + }, "Setter"); + Assert.DoesNotThrow (() => { + objIndex = descriptor.EndOfVertexSampleIndex; + }, "Getter"); + Assert.AreEqual (newIndex, objIndex, "Index"); + } + + [Test] + public void StartOfFragmentSampleIndexTest () + { + nuint newIndex = 10; + nuint objIndex = 0; + + Assert.DoesNotThrow (() => { + descriptor.StartOfFragmentSampleIndex = newIndex; + }, "Setter"); + Assert.DoesNotThrow (() => { + objIndex = descriptor.StartOfFragmentSampleIndex; + }, "Getter"); + Assert.AreEqual (newIndex, objIndex, "Index"); + } + + [Test] + public void EndOfFragmentSampleIndexTest () + { + nuint newIndex = 10; + nuint objIndex = 0; + + Assert.DoesNotThrow (() => { + descriptor.EndOfFragmentSampleIndex = newIndex; + }, "Setter"); + Assert.DoesNotThrow (() => { + objIndex = descriptor.EndOfFragmentSampleIndex; + }, "Getter"); + Assert.AreEqual (newIndex, objIndex, "Index"); + } + } +} +#endif diff --git a/tests/monotouch-test/Metal/MTLResourceStatePassDescriptorTest.cs b/tests/monotouch-test/Metal/MTLResourceStatePassDescriptorTest.cs new file mode 100644 index 000000000000..c677777c90d6 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLResourceStatePassDescriptorTest.cs @@ -0,0 +1,40 @@ +#if !__WATCHOS__ && !__TVOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLResourceStatePassDescriptorTest { + MTLResourceStatePassDescriptor descriptor; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + descriptor = MTLResourceStatePassDescriptor.Create (); + } + + [TearDown] + public void TearDown () + { + descriptor?.Dispose (); + descriptor = null; + } + + [Test] + public void SampleBufferAttachments () + { + Assert.DoesNotThrow (() => { + using var attachments = descriptor.SampleBufferAttachments; // testing the selector, dont care about the value. + }, "Getter"); + } + } +} + +#endif diff --git a/tests/monotouch-test/Metal/MTLResourceStatePassSampleBufferAttachmentDescriptorArrayTest.cs b/tests/monotouch-test/Metal/MTLResourceStatePassSampleBufferAttachmentDescriptorArrayTest.cs new file mode 100644 index 000000000000..8ea90c563820 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLResourceStatePassSampleBufferAttachmentDescriptorArrayTest.cs @@ -0,0 +1,47 @@ +#if !__WATCHOS__ && !__TVOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLResourceStatePassSampleBufferAttachmentDescriptorArrayTest { + MTLResourceStatePassSampleBufferAttachmentDescriptorArray array; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + array = new MTLResourceStatePassSampleBufferAttachmentDescriptorArray (); + } + + [TearDown] + public void TearDown () + { + array?.Dispose (); + array = null; + } + + [Test] + public void IndexerTest () + { + + var obj = new MTLResourceStatePassSampleBufferAttachmentDescriptor (); + MTLResourceStatePassSampleBufferAttachmentDescriptor dupe = null; + Assert.DoesNotThrow (() => { + array [0] = obj; + }); + Assert.DoesNotThrow (() => { + dupe = array [0]; + }); + Assert.IsNotNull (dupe, "Dupe"); + Assert.AreNotEqual (IntPtr.Zero, dupe.Handle, "Dupe"); + } + } +} +#endif diff --git a/tests/monotouch-test/Metal/MTLResourceStatePassSampleBufferAttachmentDescriptorTest.cs b/tests/monotouch-test/Metal/MTLResourceStatePassSampleBufferAttachmentDescriptorTest.cs new file mode 100644 index 000000000000..c774263bc9ae --- /dev/null +++ b/tests/monotouch-test/Metal/MTLResourceStatePassSampleBufferAttachmentDescriptorTest.cs @@ -0,0 +1,74 @@ +#if !__WATCHOS__ && !__TVOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLResourceStatePassSampleBufferAttachmentDescriptorTest { + + MTLResourceStatePassSampleBufferAttachmentDescriptor descriptor; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + descriptor = new MTLResourceStatePassSampleBufferAttachmentDescriptor (); + } + + [TearDown] + public void TearDown () + { + descriptor?.Dispose (); + descriptor = null; + } + + [Test] + public void SampleBufferTest () + { + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.SampleBuffer = null; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + using var buffer = descriptor.SampleBuffer; + }, "Getter"); + } + + [Test] + public void StartOfEncoderSampleIndexTest () + { + nuint newIndex = 10; + nuint objIndex = 0; + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.StartOfEncoderSampleIndex = newIndex ; + }, "Setter"); + Assert.DoesNotThrow (() => { + objIndex = descriptor.StartOfEncoderSampleIndex; + }, "Getter"); + Assert.AreEqual (newIndex, objIndex, "Value"); + } + + [Test] + public void EndOfEncoderSampleIndexTest () + { + nuint newIndex = 10; + nuint objIndex = 0; + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.EndOfEncoderSampleIndex = newIndex ; + }, "Setter"); + Assert.DoesNotThrow (() => { + objIndex = descriptor.EndOfEncoderSampleIndex; + }, "Getter"); + Assert.AreEqual (newIndex, objIndex, "Value"); + } + } +} +#endif diff --git a/tests/monotouch-test/Metal/MTLTileRenderPipelineDescriptorTest.cs b/tests/monotouch-test/Metal/MTLTileRenderPipelineDescriptorTest.cs new file mode 100644 index 000000000000..cdac2c00a199 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLTileRenderPipelineDescriptorTest.cs @@ -0,0 +1,44 @@ +#if !__WATCHOS__ && !__TVOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLTileRenderPipelineDescriptorTest { + + MTLTileRenderPipelineDescriptor descriptor; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + descriptor = new MTLTileRenderPipelineDescriptor (); + } + + [TearDown] + public void TearDown () + { + descriptor?.Dispose (); + descriptor = null; + } + + [Test] + public void BinaryArchivesTest () + { + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.BinaryArchives = null; // we are testing if the property works, so setting to null does test the selector + }, "Setter"); + Assert.DoesNotThrow (() => { + var bin = descriptor.BinaryArchives; + }, "Getter"); + } + } +} +#endif diff --git a/tests/monotouch-test/Metal/MTLVisibleFunctionTableDescriptorTest.cs b/tests/monotouch-test/Metal/MTLVisibleFunctionTableDescriptorTest.cs new file mode 100644 index 000000000000..1b15b8c7ef31 --- /dev/null +++ b/tests/monotouch-test/Metal/MTLVisibleFunctionTableDescriptorTest.cs @@ -0,0 +1,47 @@ +#if !__WATCHOS__ && !__TVOS__ +#nullable enable + +using System; + +using Metal; + +using NUnit.Framework; + +namespace MonoTouchFixtures.Metal { + + [TestFixture] + public class MTLVisibleFunctionTableDescriptorTest { + + MTLVisibleFunctionTableDescriptor descriptor; + + [SetUp] + public void SetUp () + { + TestRuntime.AssertXcodeVersion (12, 0); + descriptor = MTLVisibleFunctionTableDescriptor.Create (); + } + + [TearDown] + public void TearDown () + { + descriptor?.Dispose (); + descriptor = null; + } + + [Test] + public void FunctionCountTest () + { + nuint newFunctionCount = 10; + nuint objFunctionCount = 0; + // we want to make sure we do not crash because intro fails + Assert.DoesNotThrow (() => { + descriptor.FunctionCount = newFunctionCount ; + }, "Setter"); + Assert.DoesNotThrow (() => { + objFunctionCount = descriptor.FunctionCount; + }, "Getter"); + Assert.AreEqual (newFunctionCount, objFunctionCount, "Value"); + } + } +} +#endif diff --git a/tests/monotouch-test/NaturalLanguage/NLTaggerTest.cs b/tests/monotouch-test/NaturalLanguage/NLTaggerTest.cs index 76f5e192155b..ddf7cdb97a1f 100644 --- a/tests/monotouch-test/NaturalLanguage/NLTaggerTest.cs +++ b/tests/monotouch-test/NaturalLanguage/NLTaggerTest.cs @@ -48,5 +48,45 @@ public void GetTags () Assert.NotNull (tag, tag); } } - } + + [Test] + public void GetModels () + { + TestRuntime.AssertXcodeVersion (11, 0); + using (var tagger = new NLTagger (NLTagScheme.LexicalClass) { String = Text }) { + foreach (var scheme in typeof (NLTagScheme).GetEnumValues ()) { + var constant = ((NLTagScheme) scheme).GetConstant (); + if (constant == null) + continue; // can vary by SDK version + Assert.That (tagger.GetModels (constant), Is.Empty, constant); + } + } + } + + [Test] + public void GetTagHypotheses () + { + TestRuntime.AssertXcodeVersion (12, 0); + using (var tagger = new NLTagger (NLTagScheme.LexicalClass) { String = Text }) { + var dict = tagger.GetTagHypotheses (0, NLTokenUnit.Sentence, NLTagScheme.LexicalClass, nuint.MaxValue); + Assert.That (dict.Count, Is.EqualTo (1), "Count"); + var item = dict [NLLanguage.Unevaluated]; + Assert.That (item, Is.EqualTo (1.0d), "value"); + } + } + + [Test] + public void GetTagHypotheses_Range () + { + TestRuntime.AssertXcodeVersion (12, 0); + using (var tagger = new NLTagger (NLTagScheme.LexicalClass) { String = Text }) { + var dict = tagger.GetTagHypotheses (0, NLTokenUnit.Sentence, NLTagScheme.LexicalClass, nuint.MaxValue, out NSRange range); + Assert.That (dict.Count, Is.EqualTo (1), "Count"); + var item = dict [NLLanguage.Unevaluated]; + Assert.That (item, Is.EqualTo (1.0d), "value"); + Assert.That (range.Location, Is.EqualTo ((nint) 0), "Location"); + Assert.That (range.Length, Is.EqualTo ((nint) 88), "Length"); + } + } + } } diff --git a/tests/monotouch-test/NearbyInteraction/NINearbyObjectTest.cs b/tests/monotouch-test/NearbyInteraction/NINearbyObjectTest.cs new file mode 100644 index 000000000000..151ad841897a --- /dev/null +++ b/tests/monotouch-test/NearbyInteraction/NINearbyObjectTest.cs @@ -0,0 +1,36 @@ +// Copyright 2020 Microsoft Corp. + +#if __IOS__ + +using System; +using Foundation; +using ObjCRuntime; +using NearbyInteraction; +using NUnit.Framework; +using OpenTK; + +namespace MonoTouchFixtures.NearbyInteraction { + + [TestFixture] + [Preserve (AllMembers = true)] + public class NINearbyObjectTest { + + [Test] + public void DirectionNotAvailable () + { + TestRuntime.AssertXcodeVersion (12, 0); + + Vector3 vect = NINearbyObject.DirectionNotAvailable; + + unsafe { + Vector3* v = &vect; + byte* ptr = (byte*) v; + byte zero = 0; + for (var i = 0; i < sizeof (Vector3); i++) + Assert.That (ptr [i], Is.EqualTo (zero), $"Position {i}"); + } + } + } +} + +#endif // __IOS__ diff --git a/tests/monotouch-test/Network/NWBrowserTest.cs b/tests/monotouch-test/Network/NWBrowserTest.cs index 5649774363a1..653e43d1bf7c 100644 --- a/tests/monotouch-test/Network/NWBrowserTest.cs +++ b/tests/monotouch-test/Network/NWBrowserTest.cs @@ -73,6 +73,8 @@ public void TestStartNoQ () { [Test] public void TestStateChangesHandler () { + if (Runtime.Arch == Arch.DEVICE) + Assert.Ignore ("This test makes connection assumtions and can crash the device tests."); // In the test we are doing the following: // // 1. Start a browser. At this point, we have no listeners (unless someone is exposing it in the lab) @@ -94,7 +96,7 @@ public void TestStateChangesHandler () TestRuntime.RunAsync (DateTime.Now.AddSeconds (30), async () => { // start the browser, before the listener browser.SetStateChangesHandler ((st, er) => { - Assert.IsNotNull (st, "State"); + // assert here with a `st` of `Fail` Assert.IsNull (er, "Error"); if (st == NWBrowserState.Ready) browserReady.Set (); diff --git a/tests/monotouch-test/Security/KeyTest.cs b/tests/monotouch-test/Security/KeyTest.cs index b1a46b45434f..564950c78d46 100644 --- a/tests/monotouch-test/Security/KeyTest.cs +++ b/tests/monotouch-test/Security/KeyTest.cs @@ -265,6 +265,7 @@ public void RoundtripRSA1024OAEP () } [Test] + [Ignore ("crash with Xcode 12")] public void SignVerifyRSAMinPKCS1SHA1 () { SecKey private_key; diff --git a/tests/monotouch-test/Security/TrustTest.cs b/tests/monotouch-test/Security/TrustTest.cs index f1f13c6f6a0e..ee82a5baf12d 100644 --- a/tests/monotouch-test/Security/TrustTest.cs +++ b/tests/monotouch-test/Security/TrustTest.cs @@ -298,6 +298,12 @@ void Trust_NoRoot (SecTrust trust, SecPolicy policy) using (SecKey pkey = trust.GetPublicKey ()) { Assert.That (CFGetRetainCount (pkey.Handle), Is.GreaterThanOrEqualTo ((nint) 1), "RetainCount(pkey)"); } + if (TestRuntime.CheckXcodeVersion (12,0)) { + using (SecKey key = trust.GetKey ()) { + Assert.That (key.BlockSize, Is.EqualTo (128), "BlockSize"); + Assert.That (CFGetRetainCount (key.Handle), Is.GreaterThanOrEqualTo ((nint) 1), "RetainCount(key)"); + } + } if (TestRuntime.CheckXcodeVersion (10,0)) { Assert.False (trust.Evaluate (out var error), "Evaluate"); Assert.NotNull (error, "error"); @@ -383,7 +389,12 @@ void Trust_FullChain (SecTrust trust, SecPolicy policy, X509CertificateCollectio // since we modified the `trust` instance it's result was invalidated (marked as unspecified on iOS 11) Assert.That (trust.GetTrustResult (), Is.EqualTo (trust_result), "GetTrustResult-2"); } - if (TestRuntime.CheckXcodeVersion (11, 0)) { + if (TestRuntime.CheckXcodeVersion (12, 0)) { + // old certificate (built in our tests) was not quite up to spec and it eventually became important + Assert.False (trust.Evaluate (out var error), "Evaluate"); + Assert.NotNull (error, "error"); + Assert.That (error.LocalizedDescription, Is.EqualTo ("“mail.google.com” certificate is not standards compliant"), "desc"); + } else if (TestRuntime.CheckXcodeVersion (11, 0)) { Assert.False (trust.Evaluate (out var error), "Evaluate"); Assert.NotNull (error, "error"); Assert.That (error.LocalizedDescription, Does.Contain ("\"mail.google.com\",\"Thawte SGC CA\",\"Class 3 Public Primary Certification Authority\" certificates do not meet pinning requirements")); diff --git a/tests/monotouch-test/UIKit/AccessibilityTest.cs b/tests/monotouch-test/UIKit/AccessibilityTest.cs index 04c12dfdb095..4b3090c48ff9 100644 --- a/tests/monotouch-test/UIKit/AccessibilityTest.cs +++ b/tests/monotouch-test/UIKit/AccessibilityTest.cs @@ -32,6 +32,20 @@ public void RequestGuidedAccessSession () }); UIAccessibility.RequestGuidedAccessSession (false, null); } + + [Test] + public void ButtonShapesEnabled () + { + TestRuntime.AssertXcodeVersion (12, 0); + Assert.False (UIAccessibility.ButtonShapesEnabled); + } + + [Test] + public void PrefersCrossFadeTransitions () + { + TestRuntime.AssertXcodeVersion (12, 0); + Assert.False (UIAccessibility.PrefersCrossFadeTransitions); + } } } diff --git a/tests/monotouch-test/UIKit/CellAccessoryTest.cs b/tests/monotouch-test/UIKit/CellAccessoryTest.cs new file mode 100644 index 000000000000..24a15dcfb90e --- /dev/null +++ b/tests/monotouch-test/UIKit/CellAccessoryTest.cs @@ -0,0 +1,43 @@ +#if __IOS__ || __TVOS__ + +using System; +using Foundation; +using UIKit; +using ObjCRuntime; +using NUnit.Framework; + +namespace MonoTouchFixtures.UIKit { + + [TestFixture] + [Preserve (AllMembers = true)] + public class CellAccessoryTest { + + [Test] + public void GetPositionBeforeAccessory () + { + TestRuntime.AssertXcodeVersion (12, 0); + var cap = UICellAccessory.GetPositionBeforeAccessory (new Class ("UIButton")); + Assert.NotNull (cap, "Class/cap"); + Assert.That (cap (new UICellAccessory [0]), Is.EqualTo ((nuint) 0), "Class/Invoke"); + + cap = UICellAccessory.GetPositionBeforeAccessory (typeof (UICellAccessory)); + Assert.NotNull (cap, "Type/cap"); + Assert.That (cap (new UICellAccessory [0]), Is.EqualTo ((nuint) 0), "Type/Invoke"); + } + + [Test] + public void GetPositionAfterAccessory () + { + TestRuntime.AssertXcodeVersion (12, 0); + var cap = UICellAccessory.GetPositionAfterAccessory (new Class ("UIButton")); + Assert.NotNull (cap, "Class/cap"); + Assert.That (cap (new UICellAccessory [0]), Is.EqualTo ((nuint) 0), "Class/Invoke"); + + cap = UICellAccessory.GetPositionAfterAccessory (typeof (UICellAccessory)); + Assert.NotNull (cap, "Type/cap"); + Assert.That (cap (new UICellAccessory [0]), Is.EqualTo ((nuint) 0), "Type/Invoke"); + } + } +} + +#endif diff --git a/tests/monotouch-test/UIKit/ColorTest.cs b/tests/monotouch-test/UIKit/ColorTest.cs index ad46ea8e1fe7..ca65bcf6218b 100644 --- a/tests/monotouch-test/UIKit/ColorTest.cs +++ b/tests/monotouch-test/UIKit/ColorTest.cs @@ -292,6 +292,18 @@ public void WAConstructor (double w, double a) var r = new UIColor (nw, na); Assert.That (r.ToString (), Is.EqualTo (c.ToString ()), c.ToString ()); } + +#if !__WATCHOS__ + [Test] + public void UIConfigurationColorTransformerTest () + { + TestRuntime.AssertXcodeVersion (12, 0); + var redColor = UIColor.Red; + var transformer = UIConfigurationColorTransformer.Grayscale; + var grayColor = transformer (redColor); + Assert.NotNull (grayColor, "Not null"); + } +#endif } } #endif \ No newline at end of file diff --git a/tests/monotouch-test/UniformTypeIdentifiers/TypeTest.cs b/tests/monotouch-test/UniformTypeIdentifiers/TypeTest.cs new file mode 100644 index 000000000000..15343e2c584d --- /dev/null +++ b/tests/monotouch-test/UniformTypeIdentifiers/TypeTest.cs @@ -0,0 +1,29 @@ +using System; +using NUnit.Framework; + +using Foundation; +using UniformTypeIdentifiers; + +namespace MonoTouchFixtures.UniformTypeIdentifiers { + + [TestFixture] + [Preserve (AllMembers = true)] + public class UTTypeTests { + + [SetUp] + public void Setup () + { + TestRuntime.AssertXcodeVersion (12, 0); + } + + [Test] + public void Archive () + { + var a = UTTypes.Archive; + Assert.False (a.Dynamic, "Dynamic"); + var z = UTTypes.Zip; + Assert.True (z.IsSubtypeOf (a), "IsSubtypeOf"); + Assert.True (a.IsSupertypeOf (z), "IsSupertypeOf"); + } + } +} diff --git a/tests/monotouch-test/VideoToolbox/VTUtilitiesTests.cs b/tests/monotouch-test/VideoToolbox/VTUtilitiesTests.cs index 394789ec01f1..f8fe03d976c3 100644 --- a/tests/monotouch-test/VideoToolbox/VTUtilitiesTests.cs +++ b/tests/monotouch-test/VideoToolbox/VTUtilitiesTests.cs @@ -16,6 +16,7 @@ using Foundation; using VideoToolbox; +using CoreMedia; #if MONOMAC using AppKit; #else @@ -84,6 +85,48 @@ public void ToCGImageTest () var retainCount = CFGetRetainCount (newImage.Handle); Assert.That (retainCount, Is.EqualTo (1), "RetainCount"); } + +#if MONOMAC + + [TestCase (CMVideoCodecType.YUV422YpCbCr8)] + [TestCase (CMVideoCodecType.Animation)] + [TestCase (CMVideoCodecType.Cinepak)] + [TestCase (CMVideoCodecType.JPEG)] + [TestCase (CMVideoCodecType.JPEG_OpenDML)] + [TestCase (CMVideoCodecType.SorensonVideo)] + [TestCase (CMVideoCodecType.SorensonVideo3)] + [TestCase (CMVideoCodecType.H263)] + [TestCase (CMVideoCodecType.H264)] + [TestCase (CMVideoCodecType.Mpeg4Video)] + [TestCase (CMVideoCodecType.Mpeg2Video)] + [TestCase (CMVideoCodecType.Mpeg1Video)] + [TestCase (CMVideoCodecType.VP9)] + [TestCase (CMVideoCodecType.DvcNtsc)] + [TestCase (CMVideoCodecType.DvcPal)] + [TestCase (CMVideoCodecType.DvcProPal)] + [TestCase (CMVideoCodecType.DvcPro50NTSC)] + [TestCase (CMVideoCodecType.DvcPro50PAL)] + [TestCase (CMVideoCodecType.DvcProHD720p60)] + [TestCase (CMVideoCodecType.DvcProHD720p50)] + [TestCase (CMVideoCodecType.DvcProHD1080i60)] + [TestCase (CMVideoCodecType.DvcProHD1080i50)] + [TestCase (CMVideoCodecType.DvcProHD1080p30)] + [TestCase (CMVideoCodecType.DvcProHD1080p25)] + [TestCase (CMVideoCodecType.AppleProRes4444)] + [TestCase (CMVideoCodecType.AppleProRes422HQ)] + [TestCase (CMVideoCodecType.AppleProRes422)] + [TestCase (CMVideoCodecType.AppleProRes422LT)] + [TestCase (CMVideoCodecType.AppleProRes422Proxy)] + [TestCase (CMVideoCodecType.Hevc)] + public void TestRegisterSupplementalVideoDecoder (CMVideoCodecType codec) + { + TestRuntime.AssertXcodeVersion (12, 0); + // ensure that the call does not crash, we do not have anyother thing to test since there is + // no way to know if it was a success + VTUtilities.RegisterSupplementalVideoDecoder (codec); + } +#endif + } } diff --git a/tests/monotouch-test/Vision/VNCircleTests.cs b/tests/monotouch-test/Vision/VNCircleTests.cs new file mode 100644 index 000000000000..624abdda97af --- /dev/null +++ b/tests/monotouch-test/Vision/VNCircleTests.cs @@ -0,0 +1,53 @@ +// +// Unit tests for VNRequestTests +// +// Authors: +// Alex Soto +// +// Copyright (c) Microsoft Corporation. +// + +#if !__WATCHOS__ + +using System; +using System.Collections; +using System.Collections.Generic; +using NUnit.Framework; + +using CoreGraphics; +using Foundation; +using Vision; + +namespace MonoTouchFixtures.Vision { + + [TestFixture] + [Preserve (AllMembers = true)] + public class VNCircleTests { + + [SetUp] + public void Setup () => TestRuntime.AssertXcodeVersion (12, 0); + + [Test] + public void CreateUsingRadiusTest () + { + var circle = VNCircle.CreateUsingRadius (new VNPoint (10, 10), radius: 10); + Assert.NotNull (circle, "Circle not null"); + Assert.AreEqual (circle.Radius, 10, "Radius"); + Assert.AreEqual (circle.Center.X, 10, "X"); + Assert.AreEqual (circle.Center.Y, 10, "Y"); + Assert.That (circle.RetainCount, Is.EqualTo ((nuint) 1), "RetainCount"); + } + + [Test] + public void CreateUsingDiameterTest () + { + var circle = VNCircle.CreateUsingDiameter (new VNPoint (5, 6), diameter: 7); + Assert.NotNull (circle, "Circle not null"); + Assert.AreEqual (circle.Diameter, 7, "Diameter"); + Assert.AreEqual (circle.Center.Y, 6, "Y"); + Assert.AreEqual (circle.Center.X, 5, "X"); + Assert.That (circle.RetainCount, Is.EqualTo ((nuint) 1), "RetainCount"); + } + } +} +#endif diff --git a/tests/monotouch-test/Vision/VNGeometryUtilsTests.cs b/tests/monotouch-test/Vision/VNGeometryUtilsTests.cs new file mode 100644 index 000000000000..f9194a882a78 --- /dev/null +++ b/tests/monotouch-test/Vision/VNGeometryUtilsTests.cs @@ -0,0 +1,61 @@ +// +// Unit tests for VNGeometryUtils +// +// Authors: +// Alex Soto +// +// Copyright (c) Microsoft Corporation. +// + +#if !__WATCHOS__ + +using System; +using System.Collections; +using System.Collections.Generic; +using NUnit.Framework; +using OpenTK; + +using CoreGraphics; +using Foundation; +using Vision; + +namespace MonoTouchFixtures.Vision { + + [TestFixture] + [Preserve (AllMembers = true)] + public class VNGeometryUtilsTests { + + [SetUp] + public void Setup () => TestRuntime.AssertXcodeVersion (12, 0); + + [Test] + public void CreateBoundingCircleTest () + { + var nvectors = new [] { + new VNPoint (1,1), + new VNPoint (-1,1), + new VNPoint (-1,-1), + new VNPoint (1,-1), + }; + + var ncircle = VNGeometryUtils.CreateBoundingCircle (nvectors, out var nerror); + Assert.Null (nerror, "nerror was not null"); + Assert.NotNull (ncircle, "ncircle was null"); + + var vectors = new [] { + new Vector2 (1,1), + new Vector2 (-1,1), + new Vector2 (-1,-1), + new Vector2 (1,-1), + }; + + var circle = VNGeometryUtils.CreateBoundingCircle (vectors, out var error); + Assert.Null (error, "Error was not null"); + Assert.NotNull (circle, "circle was null"); + + Assert.AreEqual (ncircle.Diameter, circle.Diameter, "Diameter"); + Assert.AreEqual (ncircle.Radius, circle.Radius, "Radius"); + } + } +} +#endif diff --git a/tests/monotouch-test/Vision/VNRequestTests.cs b/tests/monotouch-test/Vision/VNRequestTests.cs index 1f9acd600394..1ca8b908e7fa 100644 --- a/tests/monotouch-test/Vision/VNRequestTests.cs +++ b/tests/monotouch-test/Vision/VNRequestTests.cs @@ -136,7 +136,7 @@ public void VNSupportedRevisionsUnsupportedTest () Assert.That (faceObservation.BoundingBox, Is.EqualTo (rect)); var recognizedObjectObservation = VNRecognizedObjectObservation.FromBoundingBox (VNRecognizedObjectObservationRequestRevision.Unspecified, rect); - if (TestRuntime.CheckXcodeVersion (11, 0)) { + if (TestRuntime.CheckXcodeVersion (11, 0) && !TestRuntime.CheckXcodeVersion (12, 0)) { Assert.IsNull (recognizedObjectObservation, "recognizedObjectObservation is null"); } else { Assert.NotNull (recognizedObjectObservation, "recognizedObjectObservation is null"); @@ -167,7 +167,7 @@ public void VNSupportedRevisionsUnsupportedTest () Assert.That (faceObservation.BoundingBox, Is.EqualTo (rect)); var recognizedObjectObservation = VNRecognizedObjectObservation.FromBoundingBox ((VNRecognizedObjectObservationRequestRevision) 5000, rect); - if (TestRuntime.CheckXcodeVersion (11, 0)) { + if (TestRuntime.CheckXcodeVersion (11, 0) && !TestRuntime.CheckXcodeVersion (12, 0)) { Assert.IsNull (recognizedObjectObservation, "randomRevision recognizedObjectObservation is null"); } else { Assert.NotNull (recognizedObjectObservation, "randomRevision recognizedObjectObservation is null"); @@ -203,7 +203,7 @@ public void VNSupportedRevisionsTwoTest () Assert.That (faceObservation.BoundingBox, Is.EqualTo (rect)); var recognizedObjectObservation = VNRecognizedObjectObservation.FromBoundingBox (VNRecognizedObjectObservationRequestRevision.Two, rect); - if (TestRuntime.CheckXcodeVersion (11, 0)) { + if (TestRuntime.CheckXcodeVersion (11, 0) && !TestRuntime.CheckXcodeVersion (12, 0)) { Assert.Null (recognizedObjectObservation, "recognizedObjectObservation is null"); } else { Assert.NotNull (recognizedObjectObservation, "recognizedObjectObservation is null"); diff --git a/tests/monotouch-test/Vision/VNVectorTests.cs b/tests/monotouch-test/Vision/VNVectorTests.cs new file mode 100644 index 000000000000..3a4b3fffeea0 --- /dev/null +++ b/tests/monotouch-test/Vision/VNVectorTests.cs @@ -0,0 +1,41 @@ +// +// Unit tests for VNVector +// +// Authors: +// Alex Soto +// +// Copyright (c) Microsoft Corporation. +// + +#if !__WATCHOS__ + +using System; +using System.Collections; +using System.Collections.Generic; +using NUnit.Framework; + +using CoreGraphics; +using Foundation; +using Vision; + +namespace MonoTouchFixtures.Vision { + + [TestFixture] + [Preserve (AllMembers = true)] + public class VNVectorTests { + + [SetUp] + public void Setup () => TestRuntime.AssertXcodeVersion (12, 0); + + [Test] + public void VNVectorCreateTest () + { + var vector = VNVector.Create (r: 10, theta: 0.5); + Assert.NotNull (vector, "vector not null"); + Assert.AreEqual (vector.R, 10, "R"); + Assert.AreEqual (vector.Theta, 0.5, "Theta"); + Assert.That (vector.RetainCount, Is.EqualTo ((nuint) 1), "RetainCount"); + } + } +} +#endif diff --git a/tests/monotouch-test/monotouch-test.csproj b/tests/monotouch-test/monotouch-test.csproj index ce366971bdb4..27b680a31990 100644 --- a/tests/monotouch-test/monotouch-test.csproj +++ b/tests/monotouch-test/monotouch-test.csproj @@ -275,6 +275,7 @@ + @@ -291,6 +292,7 @@ + diff --git a/tests/msbuild-mac/msbuild-mac.csproj b/tests/msbuild-mac/msbuild-mac.csproj index 35c72d46e131..a3e155823525 100644 --- a/tests/msbuild-mac/msbuild-mac.csproj +++ b/tests/msbuild-mac/msbuild-mac.csproj @@ -73,6 +73,12 @@ Cache.cs + + TargetFramework.cs + + + ApplePlatform.cs + diff --git a/tests/mtouch/MTouch.cs b/tests/mtouch/MTouch.cs index a12f02461a8f..4c608c339664 100644 --- a/tests/mtouch/MTouch.cs +++ b/tests/mtouch/MTouch.cs @@ -3106,6 +3106,30 @@ static void Main () } } + [Test] + public void MT5223 () + { + using (var mtouch = new MTouchTool ()) { + var code = @" +using System; + +class Test { + static void Main () + { + Console.WriteLine (typeof (IOSurface.IOSurface)); + } +} +"; + mtouch.NoFastSim = true; + mtouch.CreateTemporaryApp (code: code); + mtouch.CreateTemporaryCacheDirectory (); + + mtouch.AssertExecute (MTouchAction.BuildSim, "build"); + mtouch.AssertWarning ("MT", 5223, "Did not link with the framework 'IOSurface', because the current iOS SDK does not contain support for this framework in the simulator."); + mtouch.AssertWarningCount (1); + } + } + [Test] public void TestCaseMismatchedAssemblyName () { diff --git a/tests/mtouch/mtouch.csproj b/tests/mtouch/mtouch.csproj index c8b29a4ea665..bf6060c48f8c 100644 --- a/tests/mtouch/mtouch.csproj +++ b/tests/mtouch/mtouch.csproj @@ -109,6 +109,9 @@ Execution.cs + + TargetFramework.cs + diff --git a/tests/sampletester/sampletester.csproj b/tests/sampletester/sampletester.csproj index f8d3f237f85f..be6e6bca26d4 100644 --- a/tests/sampletester/sampletester.csproj +++ b/tests/sampletester/sampletester.csproj @@ -62,6 +62,12 @@ external\Execution.cs + + external\ApplePlatform.cs + + + external\TargetFramework.cs + diff --git a/tests/xammac_tests/xammac_tests.csproj b/tests/xammac_tests/xammac_tests.csproj index 3f937b7ca4c3..5669de78460d 100644 --- a/tests/xammac_tests/xammac_tests.csproj +++ b/tests/xammac_tests/xammac_tests.csproj @@ -118,6 +118,12 @@ Cache.cs + + TargetFramework.cs + + + ApplePlatform.cs + diff --git a/tests/xharness/AppRunner.cs b/tests/xharness/AppRunner.cs index 4ff8c4e85074..8484e3b721fc 100644 --- a/tests/xharness/AppRunner.cs +++ b/tests/xharness/AppRunner.cs @@ -349,8 +349,11 @@ public async Task RunAsync () MainLog.WriteLine ("*** Executing {0}/{1} in the simulator ***", AppInformation.AppName, runMode); if (EnsureCleanSimulatorState) { - foreach (var sim in simulators) - await sim.PrepareSimulator (MainLog, AppInformation.BundleIdentifier); + foreach (var sim in simulators) { + using var tcclog = Logs.Create ($"prepare-simulator-{Helpers.Timestamp}.log", "Simulator preparation"); + var rv = await sim.PrepareSimulator (tcclog, AppInformation.BundleIdentifier); + tcclog.Description += rv ? " ✅ " : " (failed) ⚠️"; + } } args.Add (new SimulatorUDIDArgument (simulator.UDID)); diff --git a/tests/xharness/Jenkins/Jenkins.cs b/tests/xharness/Jenkins/Jenkins.cs index 2007e2d15b18..9a90fc9ddc90 100644 --- a/tests/xharness/Jenkins/Jenkins.cs +++ b/tests/xharness/Jenkins/Jenkins.cs @@ -38,7 +38,7 @@ class Jenkins { public bool IncludeMac = true; public bool IncludeiOS = true; public bool IncludeiOS64 = true; - public bool IncludeiOS32 = true; + public bool IncludeiOS32 = false; // broken in xcode 12 beta 3, not possible with DTK public bool IncludeiOSExtensions; public bool ForceExtensionBuildOnly; public bool IncludetvOS = true; diff --git a/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs b/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs index dda9b6de39b4..3779853d23fd 100644 --- a/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs +++ b/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs @@ -4,6 +4,8 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.DotNet.XHarness.iOS.Shared; +using Microsoft.DotNet.XHarness.iOS.Shared.Logging; +using Microsoft.DotNet.XHarness.iOS.Shared.Utilities; namespace Xharness.Jenkins.TestTasks { // This class groups simulator run tasks according to the @@ -70,8 +72,13 @@ protected override async Task ExecuteAsync () } Jenkins.MainLog.WriteLine ("Selected simulator: {0}", devices.Length > 0 ? devices [0].Name : "none"); - foreach (var dev in devices) - await dev.PrepareSimulator (Jenkins.MainLog, executingTasks.Select ((v) => v.BundleIdentifier).ToArray ()); + foreach (var dev in devices) { + using var tcclog = Logs.Create ($"prepare-simulator-{Helpers.Timestamp}.log", "Simulator preparation"); + var rv = await dev.PrepareSimulator (tcclog, executingTasks.Select ((v) => v.BundleIdentifier).ToArray ()); + tcclog.Description += rv ? " ✅ " : " (failed) ⚠️"; + foreach (var task in executingTasks.Where ((v) => v.Simulators.Contains (dev))) + task.Logs.Add (tcclog); + } foreach (var task in executingTasks) { task.AcquiredResource = desktop; diff --git a/tests/xharness/Jenkins/TestTasks/RunTestTask.cs b/tests/xharness/Jenkins/TestTasks/RunTestTask.cs index 8079e170249e..ce4bd7544cdd 100644 --- a/tests/xharness/Jenkins/TestTasks/RunTestTask.cs +++ b/tests/xharness/Jenkins/TestTasks/RunTestTask.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using Microsoft.DotNet.XHarness.iOS.Shared; using Microsoft.DotNet.XHarness.iOS.Shared.Execution; +using Microsoft.DotNet.XHarness.iOS.Shared.Listeners; using Microsoft.DotNet.XHarness.iOS.Shared.Logging; using Xharness.TestTasks; diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared.Tests/Hardware/TCCDatabaseTests.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared.Tests/Hardware/TCCDatabaseTests.cs index 049f5ed0135a..4e50cbe8dd28 100644 --- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared.Tests/Hardware/TCCDatabaseTests.cs +++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared.Tests/Hardware/TCCDatabaseTests.cs @@ -45,6 +45,9 @@ public void TearDown () [TestCase ("com.apple.CoreSimulator.SimRuntime.tvOS-8-1", 2)] [TestCase ("com.apple.CoreSimulator.SimRuntime.watchOS-5-1", 3)] [TestCase ("com.apple.CoreSimulator.SimRuntime.watchOS-4-1", 2)] + [TestCase ("com.apple.CoreSimulator.SimRuntime.iOS-14-0", 4)] + [TestCase ("com.apple.CoreSimulator.SimRuntime.tvOS-14-0", 4)] + [TestCase ("com.apple.CoreSimulator.SimRuntime.watchOS-7-0", 4)] public void GetTCCFormatTest (string runtime, int expected) { Assert.AreEqual (expected, database.GetTCCFormat (runtime)); @@ -61,7 +64,7 @@ public async Task AgreeToPromptsAsyncNoIdentifiers () { // we should write in the log that we did not managed to agree to it executionLog.Setup (l => l.WriteLine (It.IsAny ())); - await database.AgreeToPromptsAsync (simRuntime, dataPath, executionLog.Object); + await database.AgreeToPromptsAsync (simRuntime, dataPath, "udid", executionLog.Object); executionLog.Verify (l => l.WriteLine ("No bundle identifiers given when requested permission editing.")); } @@ -76,7 +79,7 @@ public async Task AgreeToPropmtsAsyncTimeoutsTest () return Task.FromResult (new ProcessExecutionResult { ExitCode = 1, TimedOut = true }); }); // try to accept and fail because we always timeout - await database.AgreeToPromptsAsync (simRuntime, dataPath, executionLog.Object, "my-bundle-id", "your-bundle-id"); + await database.AgreeToPromptsAsync (simRuntime, dataPath, "udid", executionLog.Object, "my-bundle-id", "your-bundle-id");; // verify that we did write in the logs and that we did call sqlite3 Assert.AreEqual ("sqlite3", processName, "sqlite3 process"); @@ -86,10 +89,11 @@ public async Task AgreeToPropmtsAsyncTimeoutsTest () [TestCase ("com.apple.CoreSimulator.SimRuntime.iOS-12-1", 3)] [TestCase ("com.apple.CoreSimulator.SimRuntime.iOS-10-1", 2)] [TestCase ("com.apple.CoreSimulator.SimRuntime.iOS-7-1", 1)] - public async Task AgreeToPropmtsAsyncSuccessTest (string runtime, int dbVersion) + public async Task AgreeToPromptsAsyncSuccessTest (string runtime, int dbVersion) { string bundleIdentifier = "my-bundle-identifier"; var services = new string [] { + "kTCCServiceAll", "kTCCServiceAddressBook", "kTCCServiceCalendar", "kTCCServicePhotos", @@ -130,7 +134,7 @@ public async Task AgreeToPropmtsAsyncSuccessTest (string runtime, int dbVersion) return Task.FromResult (new ProcessExecutionResult { ExitCode = 0, TimedOut = false }); }); - await database.AgreeToPromptsAsync (runtime, dataPath, executionLog.Object, bundleIdentifier); + await database.AgreeToPromptsAsync (runtime, dataPath, "you did, didn't you?", executionLog.Object, bundleIdentifier); Assert.AreEqual ("sqlite3", processName, "sqlite3 process"); // assert that the sql is present diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared.Tests/Samples/NUnitV3SampleParameterizedFailure.xml b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared.Tests/Samples/NUnitV3SampleParameterizedFailure.xml new file mode 100644 index 000000000000..49fb7fcf34a3 --- /dev/null +++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared.Tests/Samples/NUnitV3SampleParameterizedFailure.xml @@ -0,0 +1,3696 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/execute-Mac_Modern-20200923_052627.txt + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/main-20200923_052836.log + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/test-Mac_Modern-20200923_052627-clean.xml + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/test-Mac_Modern-20200923_052627.xml + + + + + + + + + + + + + + + + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/execute-Mac_Modern-20200923_052627.txt + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/main-20200923_052836.log + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/test-Mac_Modern-20200923_052627-clean.xml + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/test-Mac_Modern-20200923_052627.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/execute-Mac_Modern-20200923_052627.txt + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/main-20200923_052836.log + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/test-Mac_Modern-20200923_052627-clean.xml + + + /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/jenkins-results/tests/xammac-tests/311/test-Mac_Modern-20200923_052627.xml + + + + + + diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared.Tests/XmlResultParserTests.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared.Tests/XmlResultParserTests.cs index 876061161a4e..fd520b89b3e3 100644 --- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared.Tests/XmlResultParserTests.cs +++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared.Tests/XmlResultParserTests.cs @@ -86,7 +86,7 @@ public void IsValidXmlTest (XmlResultJargon jargon) [TestCase ("nunit-", XmlResultJargon.NUnitV2)] - [TestCase ("nunit-", XmlResultJargon.NUnitV2)] + [TestCase ("nunit-", XmlResultJargon.NUnitV3)] [TestCase ("nunit-", XmlResultJargon.TouchUnit)] [TestCase ("xunit-", XmlResultJargon.xUnit)] public void GetXmlFilePathTest (string prefix, XmlResultJargon jargon) @@ -308,40 +308,44 @@ public void GenerateFailureTest (XmlResultJargon jargon) Directory.Delete (logsDir, true); } - /// - /// https://github.com/xamarin/xamarin-macios/issues/8214 - /// - [Test] - public void Issue8214Test () + [TestCase ("Issue8214.xml", true, "Tests run: 2376 Passed: 2301 Inconclusive: 13 Failed: 1 Ignored: 74")] // https://github.com/xamarin/xamarin-macios/issues/8214 + [TestCase ("NUnitV2Sample.xml", true, "Tests run: 21 Passed: 4 Inconclusive: 1 Failed: 2 Ignored: 7")] + [TestCase ("NUnitV2SampleFailure.xml", true, "Tests run: 21 Passed: 4 Inconclusive: 1 Failed: 2 Ignored: 7")] + [TestCase ("NUnitV3Sample.xml", true, "Tests run: 25 Passed: 12 Inconclusive: 1 Failed: 2 Ignored: 4")] + [TestCase ("NUnitV3SampleFailure.xml", true, "Tests run: 5 Passed: 3 Inconclusive: 1 Failed: 2 Ignored: 4")] + [TestCase ("TestCaseFailures.xml", true, "Tests run: 440 Passed: 405 Inconclusive: 0 Failed: 23 Ignored: 6")] + [TestCase ("TouchUnitSample.xml", false, "Tests run: 2354 Passed: 2223 Inconclusive: 13 Failed: 0 Ignored: 59", new string [] { "Tests run: 2286 Passed: 2282 Inconclusive: 4 Failed: 0 Ignored: 47" })] // The counting is a bit off here, seems like that's in Touch.Unit + [TestCase ("xUnitSample.xml", false, "Tests run: 53821 Passed: 53801 Inconclusive: 0 Failed: 0 Ignored: 20")] + [TestCase ("NUnitV3SampleParameterizedFailure.xml", true, "Tests run: 2086 Passed: 2041 Inconclusive: 7 Failed: 2 Ignored: 43", new string [] { " [FAIL] GHIssue8342(OK,\"mandel\",\"12345678\",\"mandel\",\"12345678\") : Status not ok" })] + public void HumanReadableResultsTest (string xmlFile, bool expectedFailure, string expectedResultLine, string [] additionalLines = null) { - string expectedResultLine = "Tests run: 2376 Passed: 2301 Inconclusive: 13 Failed: 1 Ignored: 74"; - // get the sample that was added to the issue to validate that we do parse the resuls correctly and copy it to a local - // path to be parsed - var name = GetType ().Assembly.GetManifestResourceNames ().Where (a => a.EndsWith ("Issue8214.xml", StringComparison.Ordinal)).FirstOrDefault (); - var tempPath = Path.GetTempFileName (); - var destinationFile = Path.GetTempFileName (); - using (var outputStream = new StreamWriter (tempPath)) - using (var sampleStream = new StreamReader (GetType ().Assembly.GetManifestResourceStream (name))) { - string line; - while ((line = sampleStream.ReadLine ()) != null) - outputStream.WriteLine (line); + // get the sample xml to parse + var name = GetType ().Assembly.GetManifestResourceNames ().Where (a => a.EndsWith (xmlFile, StringComparison.Ordinal)).FirstOrDefault (); + using var validXmlSource = new StreamReader (GetType ().Assembly.GetManifestResourceStream (name)); + using var source = new StreamReader (GetType ().Assembly.GetManifestResourceStream (name)); + using var destination = new StringWriter (); + + // Get the xml type + Assert.IsTrue (resultParser.IsValidXml (validXmlSource, out var type), "Valid Xml"); + + // generate the results + var (resultLine, failed) = resultParser.GenerateHumanReadableResults (source, destination, type); + var output = destination.ToString (); + + Assert.AreEqual (expectedFailure, failed, "failed"); + Assert.AreEqual (expectedResultLine, resultLine, "result line"); + + if (additionalLines != null) { + var lines = output.Split ('\n'); + foreach (var line in additionalLines) + Assert.That (lines, Does.Contain (line), "Expected line"); } - var (resultLine, failed) = resultParser.GenerateHumanReadableResults (tempPath, destinationFile, XmlResultJargon.NUnitV3); - Assert.IsTrue (failed, "failed"); - Assert.AreEqual (expectedResultLine, resultLine, "resultLine"); - // verify that the destination does contain the result line - string resultLineInDestinationFile = null; - using (var resultReader = new StreamReader (destinationFile)) { - string line; - while ((line = resultReader.ReadLine ()) != null) { - if (line.Contains ("Tests run:")) { - resultLineInDestinationFile = line; - break; - } - } + + if (expectedFailure) { + Assert.That (output, Does.Contain ("[FAIL]"), "FAIL"); + } else { + Assert.That (output, Does.Not.Contain ("[FAIL]"), "Not FAIL"); } - Assert.IsNotNull (resultLineInDestinationFile, "result file result line"); - Assert.AreEqual (expectedResultLine, resultLineInDestinationFile, "content result file result line"); } [Test] diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/ISimulatorDevice.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/ISimulatorDevice.cs index 1cda821cbee5..678996446379 100644 --- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/ISimulatorDevice.cs +++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/ISimulatorDevice.cs @@ -38,7 +38,7 @@ public interface ISimulatorDevice : IDevice { bool IsWatchSimulator { get; } Task Erase (ILog log); Task Shutdown (ILog log); - Task PrepareSimulator (ILog log, params string [] bundle_identifiers); + Task PrepareSimulator (ILog log, params string [] bundle_identifiers); Task KillEverything (ILog log); } diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorDevice.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorDevice.cs index 08b8c1849ae6..c4d0affe5b2b 100644 --- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorDevice.cs +++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorDevice.cs @@ -95,7 +95,7 @@ async Task OpenSimulator (ILog log) await processManager.ExecuteCommandAsync ("open", new [] { "-a", simulator_app, "--args", "-CurrentDeviceUDID", UDID }, log, TimeSpan.FromSeconds (15)); } - public async Task PrepareSimulator (ILog log, params string [] bundle_identifiers) + public async Task PrepareSimulator (ILog log, params string [] bundle_identifiers) { // Kill all existing processes await KillEverything (log); @@ -118,8 +118,9 @@ public async Task PrepareSimulator (ILog log, params string [] bundle_identifier } } + bool rv = true; if (File.Exists (TCC_db)) { - await tCCDatabase.AgreeToPromptsAsync (SimRuntime, TCC_db, log, bundle_identifiers); + rv &= await tCCDatabase.AgreeToPromptsAsync (SimRuntime, TCC_db, UDID, log, bundle_identifiers); } else { log.WriteLine ("No TCC.db found for the simulator {0} (SimRuntime={1} and SimDeviceType={1})", UDID, SimRuntime, SimDeviceType); } @@ -129,6 +130,8 @@ public async Task PrepareSimulator (ILog log, params string [] bundle_identifier // Make 100% sure we're shutdown await Shutdown (log); + + return rv; } } diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/TCCDatabase.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/TCCDatabase.cs index 857217f16689..490a1f4d9ffa 100644 --- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/TCCDatabase.cs +++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/TCCDatabase.cs @@ -8,7 +8,7 @@ namespace Microsoft.DotNet.XHarness.iOS.Shared.Hardware { public interface ITCCDatabase { - Task AgreeToPromptsAsync (string simRuntime, string dataPath, ILog log, params string [] bundle_identifiers); + Task AgreeToPromptsAsync (string simRuntime, string dataPath, string udid, ILog log, params string [] bundle_identifiers); int GetTCCFormat (string simRuntime); } @@ -29,9 +29,12 @@ public int GetTCCFormat (string simRuntime) { // v1: < iOS 9 // v2: >= iOS 9 && < iOS 12 // v3: >= iOS 12 + // v4: >= iOS 14 if (simRuntime.StartsWith (iOSSimRuntimePrefix, StringComparison.Ordinal)) { var v = Version.Parse (simRuntime.Substring (iOSSimRuntimePrefix.Length).Replace ('-', '.')); - if (v.Major >= 12) { + if (v.Major >= 14) { + return 4; + } else if (v.Major >= 12) { return 3; } else if (v.Major >= 9) { return 2; @@ -40,14 +43,18 @@ public int GetTCCFormat (string simRuntime) { } } else if (simRuntime.StartsWith (tvOSSimRuntimePrefix, StringComparison.Ordinal)) { var v = Version.Parse (simRuntime.Substring (tvOSSimRuntimePrefix.Length).Replace ('-', '.')); - if (v.Major >= 12) { + if (v.Major >= 14) { + return 4; + } else if (v.Major >= 12) { return 3; } else { return 2; } } else if (simRuntime.StartsWith (watchOSRuntimePrefix, StringComparison.Ordinal)) { var v = Version.Parse (simRuntime.Substring (watchOSRuntimePrefix.Length).Replace ('-', '.')); - if (v.Major >= 5) { + if (v.Major >= 7) { + return 4; + } else if (v.Major >= 5) { return 3; } else { return 2; @@ -57,14 +64,15 @@ public int GetTCCFormat (string simRuntime) { } } - public async Task AgreeToPromptsAsync (string simRuntime, string TCCDb, ILog log, params string [] bundle_identifiers) + public async Task AgreeToPromptsAsync (string simRuntime, string TCCDb, string udid, ILog log, params string [] bundle_identifiers) { if (bundle_identifiers == null || bundle_identifiers.Length == 0) { log.WriteLine ("No bundle identifiers given when requested permission editing."); - return; + return false; } var sim_services = new string [] { + "kTCCServiceAll", // You'd think 'All' means all prompts, but some prompts still show up. "kTCCServiceAddressBook", "kTCCServiceCalendar", "kTCCServicePhotos", @@ -75,50 +83,75 @@ public async Task AgreeToPromptsAsync (string simRuntime, string TCCDb, ILog log }; var failure = false; - var tcc_edit_timeout = 30; + var tcc_edit_timeout = 3; var watch = new Stopwatch (); watch.Start (); - - do { - if (failure) { - log.WriteLine ("Failed to edit TCC.db, trying again in 1 second... ", (int) (tcc_edit_timeout - watch.Elapsed.TotalSeconds)); - await Task.Delay (TimeSpan.FromSeconds (1)); - } - failure = false; + var format = GetTCCFormat (simRuntime); + if (format >= 4) { + // We don't care if booting fails (it'll fail if it's already booted for instance) + await processManager.ExecuteXcodeCommandAsync ("simctl", new [] { "boot", udid }, log, TimeSpan.FromMinutes (1)); + // execute 'simctl privacy grant all ' for each bundle identifier foreach (var bundle_identifier in bundle_identifiers) { - var args = new List (); - var sql = new System.Text.StringBuilder ("\n"); - args.Add (TCCDb); foreach (var bundle_id in new [] { bundle_identifier, bundle_identifier + ".watchkitapp" }) { foreach (var service in sim_services) { - switch (GetTCCFormat (simRuntime)) { - case 1: - // CREATE TABLE access (service TEXT NOT NULL, client TEXT NOT NULL, client_type INTEGER NOT NULL, allowed INTEGER NOT NULL, prompt_count INTEGER NOT NULL, csreq BLOB, CONSTRAINT key PRIMARY KEY (service, client, client_type)); - sql.AppendFormat ("DELETE FROM access WHERE service = '{0}' AND client = '{1}';\n", service, bundle_id); - sql.AppendFormat ("INSERT INTO access VALUES('{0}','{1}',0,1,0,NULL);\n", service, bundle_id); - break; - case 2: - // CREATE TABLE access (service TEXT NOT NULL, client TEXT NOT NULL, client_type INTEGER NOT NULL, allowed INTEGER NOT NULL, prompt_count INTEGER NOT NULL, csreq BLOB, policy_id INTEGER, PRIMARY KEY (service, client, client_type), FOREIGN KEY (policy_id) REFERENCES policies(id) ON DELETE CASCADE ON UPDATE CASCADE); - sql.AppendFormat ("DELETE FROM access WHERE service = '{0}' AND client = '{1}';\n", service, bundle_id); - sql.AppendFormat ("INSERT INTO access VALUES('{0}','{1}',0,1,0,NULL,NULL);\n", service, bundle_id); - break; - case 3: // Xcode 10+ - // CREATE TABLE access ( service TEXT NOT NULL, client TEXT NOT NULL, client_type INTEGER NOT NULL, allowed INTEGER NOT NULL, prompt_count INTEGER NOT NULL, csreq BLOB, policy_id INTEGER, indirect_object_identifier_type INTEGER, indirect_object_identifier TEXT, indirect_object_code_identity BLOB, flags INTEGER, last_modified INTEGER NOT NULL DEFAULT (CAST(strftime('%s','now') AS INTEGER)), PRIMARY KEY (service, client, client_type, indirect_object_identifier), FOREIGN KEY (policy_id) REFERENCES policies(id) ON DELETE CASCADE ON UPDATE CASCADE) - sql.AppendFormat ("INSERT OR REPLACE INTO access VALUES('{0}','{1}',0,1,0,NULL,NULL,NULL,'UNUSED',NULL,NULL,{2});\n", service, bundle_id, DateTimeOffset.Now.ToUnixTimeSeconds ()); + var args = new List (); + args.Add ("privacy"); + args.Add (udid); + args.Add ("grant"); + args.Add (service); + args.Add (bundle_id); + var rv = await processManager.ExecuteXcodeCommandAsync ("simctl", args, log, TimeSpan.FromSeconds (30)); + if (!rv.Succeeded) { + failure = true; break; - default: - throw new NotImplementedException (); } } } - args.Add (sql.ToString ()); - var rv = await processManager.ExecuteCommandAsync ("sqlite3", args, log, TimeSpan.FromSeconds (5)); - if (!rv.Succeeded) { - failure = true; + if (failure) break; - } } - } while (failure && watch.Elapsed.TotalSeconds <= tcc_edit_timeout); + } else { + do { + if (failure) { + log.WriteLine ("Failed to edit TCC.db, trying again in 1 second... ", (int) (tcc_edit_timeout - watch.Elapsed.TotalSeconds)); + await Task.Delay (TimeSpan.FromSeconds (1)); + } + failure = false; + foreach (var bundle_identifier in bundle_identifiers) { + var args = new List (); + var sql = new System.Text.StringBuilder ("\n"); + args.Add (TCCDb); + foreach (var bundle_id in new [] { bundle_identifier, bundle_identifier + ".watchkitapp" }) { + foreach (var service in sim_services) { + switch (format) { + case 1: + // CREATE TABLE access (service TEXT NOT NULL, client TEXT NOT NULL, client_type INTEGER NOT NULL, allowed INTEGER NOT NULL, prompt_count INTEGER NOT NULL, csreq BLOB, CONSTRAINT key PRIMARY KEY (service, client, client_type)); + sql.AppendFormat ("DELETE FROM access WHERE service = '{0}' AND client = '{1}';\n", service, bundle_id); + sql.AppendFormat ("INSERT INTO access VALUES('{0}','{1}',0,1,0,NULL);\n", service, bundle_id); + break; + case 2: + // CREATE TABLE access (service TEXT NOT NULL, client TEXT NOT NULL, client_type INTEGER NOT NULL, allowed INTEGER NOT NULL, prompt_count INTEGER NOT NULL, csreq BLOB, policy_id INTEGER, PRIMARY KEY (service, client, client_type), FOREIGN KEY (policy_id) REFERENCES policies(id) ON DELETE CASCADE ON UPDATE CASCADE); + sql.AppendFormat ("DELETE FROM access WHERE service = '{0}' AND client = '{1}';\n", service, bundle_id); + sql.AppendFormat ("INSERT INTO access VALUES('{0}','{1}',0,1,0,NULL,NULL);\n", service, bundle_id); + break; + case 3: // Xcode 10+ + // CREATE TABLE access ( service TEXT NOT NULL, client TEXT NOT NULL, client_type INTEGER NOT NULL, allowed INTEGER NOT NULL, prompt_count INTEGER NOT NULL, csreq BLOB, policy_id INTEGER, indirect_object_identifier_type INTEGER, indirect_object_identifier TEXT, indirect_object_code_identity BLOB, flags INTEGER, last_modified INTEGER NOT NULL DEFAULT (CAST(strftime('%s','now') AS INTEGER)), PRIMARY KEY (service, client, client_type, indirect_object_identifier), FOREIGN KEY (policy_id) REFERENCES policies(id) ON DELETE CASCADE ON UPDATE CASCADE) + sql.AppendFormat ("INSERT OR REPLACE INTO access VALUES('{0}','{1}',0,1,0,NULL,NULL,NULL,'UNUSED',NULL,NULL,{2});\n", service, bundle_id, DateTimeOffset.Now.ToUnixTimeSeconds ()); + break; + default: + throw new NotImplementedException (); + } + } + } + args.Add (sql.ToString ()); + var rv = await processManager.ExecuteCommandAsync ("sqlite3", args, log, TimeSpan.FromSeconds (5)); + if (!rv.Succeeded) { + failure = true; + break; + } + } + } while (failure && watch.Elapsed.TotalSeconds <= tcc_edit_timeout); + } if (failure) { log.WriteLine ("Failed to edit TCC.db, the test run might hang due to permission request dialogs"); @@ -128,6 +161,8 @@ public async Task AgreeToPromptsAsync (string simRuntime, string TCCDb, ILog log log.WriteLine ("Current TCC database contents:"); await processManager.ExecuteCommandAsync ("sqlite3", new [] { TCCDb, ".dump" }, log, TimeSpan.FromSeconds (5)); + + return !failure; } } } diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/IResultParser.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/IResultParser.cs index cbbc2721352f..39b45b2b235c 100644 --- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/IResultParser.cs +++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/IResultParser.cs @@ -12,7 +12,7 @@ public interface IResultParser { // failure perse but the situation in which the app could not be built, timeout or crashed. void GenerateFailure (ILogs logs, string source, string appName, string variation, string title, string message, string stderrPath, XmlResultJargon jargon); - void GenerateFailure (ILogs logs, string source, string appName, string variation, string title, string message, StreamReader stderrReader, XmlResultJargon jargon); + void GenerateFailure (ILogs logs, string source, string appName, string variation, string title, string message, TextReader stderrReader, XmlResultJargon jargon); // updates a given xml result to contain a list of attachments. This is useful for CI to be able to add logs as part of the attachments of a failing test. void UpdateMissingData (string source, string destination, string applicationName, IEnumerable attachments); diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/XmlResultParser.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/XmlResultParser.cs index 8e787e676242..7d9acdb75269 100644 --- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/XmlResultParser.cs +++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/XmlResultParser.cs @@ -28,43 +28,145 @@ public bool IsValidXml (string path, out XmlResultJargon type) if (!File.Exists (path)) return false; - using (var stream = File.OpenText (path)) { - string line; - while ((line = stream.ReadLine ()) != null) { // special case when get got the tcp connection - if (line.Contains ("ping")) - continue; - if (line.Contains ("test-run")) { // first element of the NUnitV3 test collection - type = XmlResultJargon.NUnitV3; - return true; - } - if (line.Contains ("TouchUnitTestRun")) { - type = XmlResultJargon.TouchUnit; - return true; - } - if (line.Contains ("test-results")) { // first element of the NUnitV3 test collection - type = XmlResultJargon.NUnitV2; - return true; - } - if (line.Contains ("")) { // first element of the xUnit test collection - type = XmlResultJargon.xUnit; - return true; + using (var stream = File.OpenText (path)) + return IsValidXml (stream, out type); + } + + // test if the file is valid xml, or at least, that can be read it. + public bool IsValidXml (TextReader stream, out XmlResultJargon type) + { + type = XmlResultJargon.Missing; + + string line; + while ((line = stream.ReadLine ()) != null) { // special case when get got the tcp connection + if (line.Contains ("ping")) + continue; + if (line.Contains ("test-run")) { // first element of the NUnitV3 test collection + type = XmlResultJargon.NUnitV3; + return true; + } + if (line.Contains ("TouchUnitTestRun")) { + type = XmlResultJargon.TouchUnit; + return true; + } + if (line.Contains ("test-results")) { // first element of the NUnitV3 test collection + type = XmlResultJargon.NUnitV2; + return true; + } + if (line.Contains ("")) { // first element of the xUnit test collection + type = XmlResultJargon.xUnit; + return true; + } + if (line.Contains (" ("time", "0"), ("asserts", "1")); - static void WriteNUnitV2TestCase (XmlWriter writer, string title, string message, StreamReader stderr) + static void WriteNUnitV2TestCase (XmlWriter writer, string title, string message, TextReader stderr) { writer.WriteStartElement ("test-case"); WriteAttributes (writer, @@ -787,7 +841,7 @@ static void WriteNUnitV2TestCase (XmlWriter writer, string title, string message writer.WriteEndElement (); // test-case } - static void GenerateNUnitV2Failure (XmlWriter writer, string title, string message, StreamReader stderr) + static void GenerateNUnitV2Failure (XmlWriter writer, string title, string message, TextReader stderr) { writer.WriteStartElement ("test-results"); WriteAttributes (writer, @@ -832,7 +886,7 @@ static void WriteNUnitV3TestSuiteAttributes (XmlWriter writer, string title) => ("skipped", "0"), ("asserts", "0")); - static void WriteFailure (XmlWriter writer, string message, StreamReader? stderr = null) + static void WriteFailure (XmlWriter writer, string message, TextReader? stderr = null) { writer.WriteStartElement ("failure"); writer.WriteStartElement ("message"); @@ -846,7 +900,7 @@ static void WriteFailure (XmlWriter writer, string message, StreamReader? stderr writer.WriteEndElement (); // failure } - static void GenerateNUnitV3Failure (XmlWriter writer, string title, string message, StreamReader stderr) + static void GenerateNUnitV3Failure (XmlWriter writer, string title, string message, TextReader stderr) { var date = DateTime.Now; writer.WriteStartElement ("test-run"); @@ -898,7 +952,7 @@ static void GenerateNUnitV3Failure (XmlWriter writer, string title, string messa writer.WriteEndElement (); // test-run } - static void GeneratexUnitFailure (XmlWriter writer, string title, string message, StreamReader stderr) + static void GeneratexUnitFailure (XmlWriter writer, string title, string message, TextReader stderr) { writer.WriteStartElement ("assemblies"); writer.WriteStartElement ("assembly"); @@ -935,7 +989,7 @@ static void GeneratexUnitFailure (XmlWriter writer, string title, string message writer.WriteEndElement (); // assemblies } - static void GenerateFailureXml (string destination, string title, string message, StreamReader stderrReader, XmlResultJargon jargon) + static void GenerateFailureXml (string destination, string title, string message, TextReader stderrReader, XmlResultJargon jargon) { XmlWriterSettings settings = new XmlWriterSettings { Indent = true }; using (var stream = File.CreateText (destination)) @@ -957,7 +1011,7 @@ static void GenerateFailureXml (string destination, string title, string message } public void GenerateFailure (ILogs logs, string source, string appName, string variation, string title, - string message, StreamReader stderr, XmlResultJargon jargon) + string message, TextReader stderr, XmlResultJargon jargon) { // VSTS does not provide a nice way to report build errors, create a fake // test result with a failure in the case the build did not work diff --git a/tests/xtro-sharpie/Filter.cs b/tests/xtro-sharpie/Filter.cs index 81e84b452d21..084c72282078 100644 --- a/tests/xtro-sharpie/Filter.cs +++ b/tests/xtro-sharpie/Filter.cs @@ -47,8 +47,11 @@ public static bool Filter (string fx) case "IOBluetoothUI": case "IOKit": case "JavaFrameEmbedding": + case "JavaNativeFoundation": + case "JavaRuntimeSupport": case "JavaVM": case "Kerberos": + case "KernelManagement": case "LatentSemanticMapping": case "LaunchServices": case "Metadata": @@ -59,6 +62,8 @@ public static bool Filter (string fx) case "OpenScripting": case "OSAKit": case "OSServices": + case "ParavirtualizedGraphics": + case "PCSC": case "PreferencePanes": case "Python": case "QD": @@ -75,15 +80,17 @@ public static bool Filter (string fx) case "SpeechRecognition": case "SpeechSynthesis": case "SyncServices": + case "SystemExtensions": case "Tcl": case "TWAIN": + case "Virtualization": case "vmnet": // other non-supported frameworks case "GSS": // iOS and macOS case "vecLib": // all return true; default: - return false; + return fx.EndsWith ("_SwiftUI", StringComparison.Ordinal); } } } diff --git a/tests/xtro-sharpie/Helpers.cs b/tests/xtro-sharpie/Helpers.cs index effff467246c..7dd431a1b044 100644 --- a/tests/xtro-sharpie/Helpers.cs +++ b/tests/xtro-sharpie/Helpers.cs @@ -36,6 +36,8 @@ public static partial class Helpers { { "NEVPNIKEv2DiffieHellmanGroup", "NEVpnIke2DiffieHellman" }, { "NEVPNIKEv2EncryptionAlgorithm", "NEVpnIke2EncryptionAlgorithm" }, { "NEVPNIKEv2IntegrityAlgorithm", "NEVpnIke2IntegrityAlgorithm" }, + { "NEDNSProtocol", "NEDnsProtocol"}, + { "NEDNSSettingsManagerError", "NEDnsSettingsManagerError"}, { "NSAttributedStringEnumerationOptions", "NSAttributedStringEnumeration" }, { "NSFileProviderErrorCode", "NSFileProviderError" }, { "NSUbiquitousKeyValueStoreChangeReason", "NSUbiquitousKeyValueStore" }, @@ -53,6 +55,17 @@ public static partial class Helpers { { "UITableViewCellAccessoryType", "UITableViewCellAccessory" }, { "UITableViewCellStateMask", "UITableViewCellState" }, { "WatchKitErrorCode", "WKErrorCode" }, // WebKit already had that name + { "MIDIProtocolID", "MidiProtocolId" }, + { "MIDICVStatus", "MidiCVStatus" }, + { "MIDIMessageType", "MidiMessageType" }, + { "MIDISysExStatus", "MidiSysExStatus" }, + { "MIDISystemStatus", "MidiSystemStatus" }, + { "NFCFeliCaEncryptionId", "EncryptionId" }, + { "NFCFeliCaPollingRequestCode", "PollingRequestCode" }, + { "NFCFeliCaPollingTimeSlot", "PollingTimeSlot" }, + { "NFCVASErrorCode", "VasErrorCode" }, + { "NFCVASMode", "VasMode" }, + { "NFCISO15693RequestFlag", "RequestFlag" }, // not enums }; diff --git a/tests/xtro-sharpie/Makefile b/tests/xtro-sharpie/Makefile index 01fadcc9bd66..5827892eb5e1 100644 --- a/tests/xtro-sharpie/Makefile +++ b/tests/xtro-sharpie/Makefile @@ -24,7 +24,7 @@ XIOS_ARCH = arm64 XIOS_PCH = iphoneos$(IOS_SDK_VERSION)-$(XIOS_ARCH).pch $(XIOS_PCH): .stamp-check-sharpie - sharpie sdk-db --xcode $(XCODE) -s iphoneos$(IOS_SDK_VERSION) -a $(XIOS_ARCH) + sharpie sdk-db --xcode $(XCODE) -s iphoneos$(IOS_SDK_VERSION) -a $(XIOS_ARCH) -exclude OSLog XWATCHOS ?= $(TOP)/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/32bits/Xamarin.WatchOS.dll @@ -32,7 +32,7 @@ XWATCHOS_ARCH = armv7 XWATCHOS_PCH = watchos$(WATCH_SDK_VERSION)-$(XWATCHOS_ARCH).pch $(XWATCHOS_PCH): .stamp-check-sharpie - sharpie sdk-db --xcode $(XCODE) -s watchos$(WATCH_SDK_VERSION) -a $(XWATCHOS_ARCH) + sharpie sdk-db --xcode $(XCODE) -s watchos$(WATCH_SDK_VERSION) -a $(XWATCHOS_ARCH) -exclude OSLog XTVOS ?= $(TOP)/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.TVOS/Xamarin.TVOS.dll XTVOS_GL ?= $(TOP)/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.TVOS/OpenTK-1.0.dll @@ -40,7 +40,7 @@ XTVOS_ARCH = arm64 XTVOS_PCH = appletvos$(TVOS_SDK_VERSION)-$(XTVOS_ARCH).pch $(XTVOS_PCH): .stamp-check-sharpie - sharpie sdk-db --xcode $(XCODE) -s appletvos$(TVOS_SDK_VERSION) -a $(XTVOS_ARCH) + sharpie sdk-db --xcode $(XCODE) -s appletvos$(TVOS_SDK_VERSION) -a $(XTVOS_ARCH) -exclude OSLog XMAC ?= $(TOP)/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/$(XMAC_ARCH)/mobile/Xamarin.Mac.dll @@ -48,29 +48,45 @@ XMAC_ARCH = x86_64 XMAC_PCH = macosx$(OSX_SDK_VERSION)-$(XMAC_ARCH).pch $(XMAC_PCH): .stamp-check-sharpie - sharpie sdk-db --xcode $(XCODE) -s macosx$(OSX_SDK_VERSION) -a $(XMAC_ARCH) + sharpie sdk-db --xcode $(XCODE) -s macosx$(OSX_SDK_VERSION) -a $(XMAC_ARCH) -exclude ClockKit -exclude JavaNativeFoundation ios-$(IOS_SDK_VERSION).g.cs: $(XIOS_PCH) +ifdef INCLUDE_IOS gen-ios: ios-$(IOS_SDK_VERSION).g.cs .stamp-check-sharpie sharpie query -bind $(XIOS_PCH) > ios-$(IOS_SDK_VERSION).g.cs +else +gen-ios: ; @true +endif tvos-$(TVOS_SDK_VERSION).g.cs: $(XTVOS_PCH) +ifdef INCLUDE_TVOS gen-tvos: tvos-$(TVOS_SDK_VERSION).g.cs .stamp-check-sharpie sharpie query -bind $(XTVOS_PCH) > tvos-$(TVOS_SDK_VERSION).g.cs +else +gen-tvos: ; @true +endif watchos-$(WATCH_SDK_VERSION).g.cs: $(XWATCHOS_PCH) +ifdef INCLUDE_WATCH gen-watchos: watchos-$(WATCH_SDK_VERSION).g.cs .stamp-check-sharpie sharpie query -bind $(XWATCHOS_PCH) > watchos-$(WATCH_SDK_VERSION).g.cs +else +gen-watchos: ; @true +endif macos-$(OSX_SDK_VERSION).g.cs: $(XMAC_PCH) +ifdef INCLUDE_MAC gen-macos: macos-$(OSX_SDK_VERSION).g.cs .stamp-check-sharpie sharpie query -bind $(XMAC_PCH) > macos-$(OSX_SDK_VERSION).g.cs +else +gen-macos: ; @true +endif gen-all: gen-ios gen-tvos gen-watchos gen-macos @@ -84,17 +100,33 @@ report: build report-short: JENKINS_SERVER_COOKIE=1 make report +ifdef INCLUDE_IOS classify-ios: $(MONO) bin/Debug/xtro-sharpie.exe $(XIOS_PCH) $(XIOS) $(XIOS_GL) +else +classify-ios: ; @true +endif +ifdef INCLUDE_TVOS classify-tvos: $(MONO) bin/Debug/xtro-sharpie.exe $(XTVOS_PCH) $(XTVOS) $(XTVOS_GL) +else +classify-tvos: ; @true +endif +ifdef INCLUDE_WATCH classify-watchos: $(MONO) bin/Debug/xtro-sharpie.exe $(XWATCHOS_PCH) $(XWATCHOS) +else +classify-watchos: ; @true +endif +ifdef INCLUDE_MAC classify-macos: $(MONO) bin/Debug/xtro-sharpie.exe $(XMAC_PCH) $(XMAC) +else +classify-macos: ; @true +endif classify: build $(XIOS_PCH) $(XWATCHOS_PCH) $(XTVOS_PCH) $(XMAC_PCH) rm -f *.unclassified diff --git a/tests/xtro-sharpie/SimdCheck.cs b/tests/xtro-sharpie/SimdCheck.cs index 3cfcd8143a8a..7562bde46901 100644 --- a/tests/xtro-sharpie/SimdCheck.cs +++ b/tests/xtro-sharpie/SimdCheck.cs @@ -255,6 +255,10 @@ string Undecorate (string native_name) if (native_name.StartsWith (_nsrefinedforswift, StringComparison.Ordinal)) return Undecorate (native_name.Substring (_nsrefinedforswift.Length)); + const string _nsreturnsinnerpointer = "NS_RETURNS_INNER_POINTER "; + if (native_name.StartsWith (_nsreturnsinnerpointer, StringComparison.Ordinal)) + return Undecorate (native_name.Substring (_nsreturnsinnerpointer.Length)); + const string _Nonnull = " _Nonnull"; if (native_name.EndsWith (_Nonnull, StringComparison.Ordinal)) return Undecorate (native_name.Substring (0, native_name.Length - _Nonnull.Length)); diff --git a/tests/xtro-sharpie/common-AVFoundation.ignore b/tests/xtro-sharpie/common-AVFoundation.ignore index 32512881696d..35a8d0bacc92 100644 --- a/tests/xtro-sharpie/common-AVFoundation.ignore +++ b/tests/xtro-sharpie/common-AVFoundation.ignore @@ -72,3 +72,7 @@ # Initial result from new rule missing-null-allowed !missing-null-allowed! 'System.Boolean AVFoundation.AVPlayerItem::Seek(Foundation.NSDate,AVFoundation.AVCompletion)' is missing an [NullAllowed] on parameter #1 + +# intro says that this is not true +!missing-protocol-conformance! AVURLAsset should conform to NSItemProviderReading (defined in 'AVURLAssetNSItemProvider' category) +!missing-protocol-conformance! AVURLAsset should conform to NSItemProviderWriting (defined in 'AVURLAssetNSItemProvider' category) diff --git a/tests/xtro-sharpie/common-Accelerate.ignore b/tests/xtro-sharpie/common-Accelerate.ignore index 3df44698fc72..575256b59f17 100644 --- a/tests/xtro-sharpie/common-Accelerate.ignore +++ b/tests/xtro-sharpie/common-Accelerate.ignore @@ -509,3 +509,8 @@ !missing-pinvoke! vImageVerticalShearD_ARGBFFFF is not bound !missing-pinvoke! vImageVerticalShearD_Planar8 is not bound !missing-pinvoke! vImageVerticalShearD_PlanarF is not bound +!missing-pinvoke! vImageConverter_CreateWithCGColorConversionInfo is not bound +!missing-pinvoke! vImageSepConvolve_Planar16U is not bound +!missing-pinvoke! vImageSepConvolve_Planar8 is not bound +!missing-pinvoke! vImageSepConvolve_Planar8to16U is not bound +!missing-pinvoke! vImageSepConvolve_PlanarF is not bound diff --git a/tests/xtro-sharpie/common-AppTrackingTransparency.ignore b/tests/xtro-sharpie/common-AppTrackingTransparency.ignore new file mode 100644 index 000000000000..15f4ff8648e2 --- /dev/null +++ b/tests/xtro-sharpie/common-AppTrackingTransparency.ignore @@ -0,0 +1,3 @@ +## not exposed by our API (better use the OS version) +!missing-field! AppTrackingTransparencyVersionNumber not bound +!missing-field! AppTrackingTransparencyVersionString not bound diff --git a/tests/xtro-sharpie/common-AudioToolbox.ignore b/tests/xtro-sharpie/common-AudioToolbox.ignore index b0bdbb9c4182..7e9b79cdfede 100644 --- a/tests/xtro-sharpie/common-AudioToolbox.ignore +++ b/tests/xtro-sharpie/common-AudioToolbox.ignore @@ -67,4 +67,9 @@ !missing-pinvoke! AudioCodecProduceOutputPackets is not bound !missing-pinvoke! AudioCodecReset is not bound !missing-pinvoke! AudioCodecSetProperty is not bound -!missing-pinvoke! AudioCodecUninitialize is not bound \ No newline at end of file +!missing-pinvoke! AudioCodecUninitialize is not bound + +# ignored due to the Workgroups API missing: https://github.com/xamarin/xamarin-macios/issues/9602 +!missing-pinvoke! AudioWorkIntervalCreate is not bound +!missing-selector! AUAudioUnit::osWorkgroup not bound +!missing-selector! AUAudioUnit::renderContextObserver not bound diff --git a/tests/xtro-sharpie/common-CloudKit.ignore b/tests/xtro-sharpie/common-CloudKit.ignore index e72c9c63119c..a83bbff3e843 100644 --- a/tests/xtro-sharpie/common-CloudKit.ignore +++ b/tests/xtro-sharpie/common-CloudKit.ignore @@ -5,10 +5,6 @@ !missing-selector! CKRecord::objectForKeyedSubscript: not bound !missing-selector! CKRecord::setObject:forKeyedSubscript: not bound -## auto-generated attribute (but deprecated API where Apple removed it) -!extra-designated-initializer! CKSubscription::initWithCoder: is incorrectly decorated with an [DesignatedInitializer] attribute -!deprecated-attribute-missing! CKSubscription::initWithCoder: missing a [Deprecated] attribute - ## Formalizes a protocol for getting and setting keys on a CKRecord. ## Not intended to be used directly by client code !missing-protocol! CKRecordKeyValueSetting not bound @@ -16,3 +12,8 @@ ## NSInvalidArgumentException Reason: You must call -[CKMarkNotificationsReadOperation initWithNotificationIDsToMarkRead:] !missing-selector! CKMarkNotificationsReadOperation::init not bound + +# all of them deprecated and marked with the [Obsoleted] attr. +!unknown-native-enum! CKSubscriptionOptions bound +!unknown-type! CKDiscoverAllContactsOperation bound +!unknown-type! CKDiscoveredUserInfo bound diff --git a/tests/xtro-sharpie/common-CoreFoundation.ignore b/tests/xtro-sharpie/common-CoreFoundation.ignore index ee1d3a96ee1d..1f32d047651c 100644 --- a/tests/xtro-sharpie/common-CoreFoundation.ignore +++ b/tests/xtro-sharpie/common-CoreFoundation.ignore @@ -4,6 +4,8 @@ !missing-field! kCFURLFileProtectionCompleteUntilFirstUserAuthentication not bound !missing-field! kCFURLFileProtectionKey not bound !missing-field! kCFURLFileProtectionNone not bound +!missing-field! kCFURLVolumeSupportsFileProtectionKey not bound + ## unsorted @@ -202,6 +204,11 @@ !missing-field! kCFTypeSetCallBacks not bound !missing-field! kCFURLAddedToDirectoryDateKey not bound !missing-field! kCFURLAttributeModificationDateKey not bound +!missing-field! kCFURLFileContentIdentifierKey not bound +!missing-field! kCFURLIsPurgeableKey not bound +!missing-field! kCFURLIsSparseKey not bound +!missing-field! kCFURLMayHaveExtendedAttributesKey not bound +!missing-field! kCFURLMayShareFileContentKey not bound !missing-field! kCFURLCanonicalPathKey not bound !missing-field! kCFURLContentAccessDateKey not bound !missing-field! kCFURLContentModificationDateKey not bound @@ -416,7 +423,6 @@ !missing-pinvoke! CFBitVectorSetBitAtIndex is not bound !missing-pinvoke! CFBitVectorSetBits is not bound !missing-pinvoke! CFBitVectorSetCount is not bound -!missing-pinvoke! CFBundleCloseBundleResourceMap is not bound !missing-pinvoke! CFBundleCopyBundleLocalizations is not bound !missing-pinvoke! CFBundleCopyExecutableArchitecturesForURL is not bound !missing-pinvoke! CFBundleCopyInfoDictionaryInDirectory is not bound @@ -430,8 +436,6 @@ !missing-pinvoke! CFBundleGetValueForInfoDictionaryKey is not bound !missing-pinvoke! CFBundleGetVersionNumber is not bound !missing-pinvoke! CFBundleLoadExecutable is not bound -!missing-pinvoke! CFBundleOpenBundleResourceFiles is not bound -!missing-pinvoke! CFBundleOpenBundleResourceMap is not bound !missing-pinvoke! CFCalendarAddComponents is not bound !missing-pinvoke! CFCalendarComposeAbsoluteTime is not bound !missing-pinvoke! CFCalendarCopyCurrent is not bound diff --git a/tests/xtro-sharpie/common-CoreGraphics.ignore b/tests/xtro-sharpie/common-CoreGraphics.ignore index d19c70a49d74..4a62e7a6200d 100644 --- a/tests/xtro-sharpie/common-CoreGraphics.ignore +++ b/tests/xtro-sharpie/common-CoreGraphics.ignore @@ -19,6 +19,14 @@ !missing-field! kCGFontVariationAxisMaxValue not bound !missing-field! kCGFontVariationAxisMinValue not bound !missing-field! kCGFontVariationAxisName not bound +!missing-field! kCGPDFContextOutputIntent not bound +!missing-field! kCGPDFContextOutputIntents not bound +!missing-field! kCGPDFXDestinationOutputProfile not bound +!missing-field! kCGPDFXInfo not bound +!missing-field! kCGPDFXOutputCondition not bound +!missing-field! kCGPDFXOutputConditionIdentifier not bound +!missing-field! kCGPDFXOutputIntentSubtype not bound +!missing-field! kCGPDFXRegistryName not bound !missing-pinvoke! CGAffineTransformConcat is not bound !missing-pinvoke! CGAffineTransformEqualToTransform is not bound !missing-pinvoke! CGAffineTransformIsIdentity is not bound diff --git a/tests/xtro-sharpie/common-CoreImage.ignore b/tests/xtro-sharpie/common-CoreImage.ignore index f67e10b63bea..9e4a9241d835 100644 --- a/tests/xtro-sharpie/common-CoreImage.ignore +++ b/tests/xtro-sharpie/common-CoreImage.ignore @@ -200,3 +200,36 @@ !missing-selector! +CIFilter::whitePointAdjustFilter not bound !missing-selector! +CIFilter::xRayFilter not bound !missing-selector! +CIFilter::zoomBlurFilter not bound +## xcode 12 +!missing-selector! +CIFilter::areaAverageFilter not bound +!missing-selector! +CIFilter::areaHistogramFilter not bound +!missing-selector! +CIFilter::areaMaximumAlphaFilter not bound +!missing-selector! +CIFilter::areaMaximumFilter not bound +!missing-selector! +CIFilter::areaMinimumAlphaFilter not bound +!missing-selector! +CIFilter::areaMinimumFilter not bound +!missing-selector! +CIFilter::areaMinMaxFilter not bound +!missing-selector! +CIFilter::areaMinMaxRedFilter not bound +!missing-selector! +CIFilter::bumpDistortionFilter not bound +!missing-selector! +CIFilter::bumpDistortionLinearFilter not bound +!missing-selector! +CIFilter::circleSplashDistortionFilter not bound +!missing-selector! +CIFilter::circularWrapFilter not bound +!missing-selector! +CIFilter::colorAbsoluteDifferenceFilter not bound +!missing-selector! +CIFilter::colorThresholdFilter not bound +!missing-selector! +CIFilter::colorThresholdOtsuFilter not bound +!missing-selector! +CIFilter::columnAverageFilter not bound +!missing-selector! +CIFilter::displacementDistortionFilter not bound +!missing-selector! +CIFilter::drosteFilter not bound +!missing-selector! +CIFilter::glassDistortionFilter not bound +!missing-selector! +CIFilter::glassLozengeFilter not bound +!missing-selector! +CIFilter::histogramDisplayFilter not bound +!missing-selector! +CIFilter::holeDistortionFilter not bound +!missing-selector! +CIFilter::KMeansFilter not bound +!missing-selector! +CIFilter::lightTunnelFilter not bound +!missing-selector! +CIFilter::ninePartStretchedFilter not bound +!missing-selector! +CIFilter::ninePartTiledFilter not bound +!missing-selector! +CIFilter::pinchDistortionFilter not bound +!missing-selector! +CIFilter::rowAverageFilter not bound +!missing-selector! +CIFilter::stretchCropFilter not bound +!missing-selector! +CIFilter::torusLensDistortionFilter not bound +!missing-selector! +CIFilter::twirlDistortionFilter not bound +!missing-selector! +CIFilter::vortexDistortionFilter not bound diff --git a/tests/xtro-sharpie/common-CoreLocation.ignore b/tests/xtro-sharpie/common-CoreLocation.ignore index a890e4135588..f837c64e188c 100644 --- a/tests/xtro-sharpie/common-CoreLocation.ignore +++ b/tests/xtro-sharpie/common-CoreLocation.ignore @@ -1,6 +1,10 @@ # We have our own managed ctor !missing-pinvoke! CLLocationCoordinate2DMake is not bound +# xtro is confused because objc has two properties with the same name on objc, one static and the other one an instance one. +# we did add the deprecation in the correct one. Reported issue: https://github.com/xamarin/xamarin-macios/issues/9026 +!deprecated-attribute-missing! CLLocationManager::authorizationStatus missing a [Deprecated] attribute + ## unsorted diff --git a/tests/xtro-sharpie/common-CoreMIDI.ignore b/tests/xtro-sharpie/common-CoreMIDI.ignore index 339b9ad2df59..9e654dcb538a 100644 --- a/tests/xtro-sharpie/common-CoreMIDI.ignore +++ b/tests/xtro-sharpie/common-CoreMIDI.ignore @@ -44,6 +44,7 @@ !missing-field! kMIDIPropertyTransmitsProgramChanges not bound !missing-field! kMIDIPropertyUniqueID not bound !missing-field! kMIDIPropertyNameConfigurationDictionary not bound +!missing-field! kMIDIPropertyProtocolID not bound # no known use !missing-pinvoke! MIDIEndpointGetRefCons is not bound @@ -55,7 +56,6 @@ !missing-pinvoke! MIDIDeviceCreate is not bound !missing-pinvoke! MIDIDeviceDispose is not bound !missing-pinvoke! MIDIDeviceRemoveEntity is not bound -!missing-pinvoke! MIDIDriverEnableMonitoring is not bound !missing-pinvoke! MIDIEntityAddOrRemoveEndpoints is not bound !missing-pinvoke! MIDIExternalDeviceCreate is not bound !missing-pinvoke! MIDIGetDriverDeviceList is not bound @@ -67,4 +67,15 @@ !missing-pinvoke! MIDISetupAddDevice is not bound !missing-pinvoke! MIDISetupAddExternalDevice is not bound !missing-pinvoke! MIDISetupRemoveDevice is not bound -!missing-pinvoke! MIDISetupRemoveExternalDevice is not bound \ No newline at end of file +!missing-pinvoke! MIDISetupRemoveExternalDevice is not bound + +# same as the above, we should bind all of them, these have been added on Xcode 12 beta 2 +# https://github.com/xamarin/xamarin-macios/issues/4452#issuecomment-660220392 +!missing-pinvoke! MIDIDestinationCreateWithProtocol is not bound +!missing-pinvoke! MIDIDeviceNewEntity is not bound +!missing-pinvoke! MIDIEventListAdd is not bound +!missing-pinvoke! MIDIEventListInit is not bound +!missing-pinvoke! MIDIInputPortCreateWithProtocol is not bound +!missing-pinvoke! MIDIReceivedEventList is not bound +!missing-pinvoke! MIDISendEventList is not bound +!missing-pinvoke! MIDISourceCreateWithProtocol is not bound diff --git a/tests/xtro-sharpie/common-CoreMedia.ignore b/tests/xtro-sharpie/common-CoreMedia.ignore index fadd545dcadc..f14fd2e8b975 100644 --- a/tests/xtro-sharpie/common-CoreMedia.ignore +++ b/tests/xtro-sharpie/common-CoreMedia.ignore @@ -45,6 +45,7 @@ !missing-field! kCMFormatDescriptionExtension_AlphaChannelMode not bound !missing-field! kCMFormatDescriptionExtension_AuxiliaryTypeInfo not bound !missing-field! kCMFormatDescriptionExtension_ContainsAlphaChannel not bound +!missing-field! kCMFormatDescriptionExtension_ProtectedContentOriginalFormat not bound !missing-field! kCMFormatDescriptionExtensionKey_MetadataKeyTable not bound !missing-field! kCMFormatDescriptionFieldDetail_SpatialFirstLineEarly not bound !missing-field! kCMFormatDescriptionFieldDetail_SpatialFirstLineLate not bound diff --git a/tests/xtro-sharpie/common-CoreText.ignore b/tests/xtro-sharpie/common-CoreText.ignore index 9b229823ac8f..8ff0116f12ee 100644 --- a/tests/xtro-sharpie/common-CoreText.ignore +++ b/tests/xtro-sharpie/common-CoreText.ignore @@ -101,6 +101,8 @@ !missing-field! kCTUnderlineStyleAttributeName not bound !missing-field! kCTVerticalFormsAttributeName not bound !missing-field! kCTWritingDirectionAttributeName not bound +!missing-field! kCTFontOpticalSizeAttribute not bound +!missing-field! kCTFontVariationAxesAttribute not bound !missing-pinvoke! CTFontCollectionGetTypeID is not bound !missing-pinvoke! CTFontDescriptorCreateCopyWithFamily is not bound !missing-pinvoke! CTFontDescriptorCreateCopyWithSymbolicTraits is not bound diff --git a/tests/xtro-sharpie/common-ExposureNotification.ignore b/tests/xtro-sharpie/common-ExposureNotification.ignore new file mode 100644 index 000000000000..257acbc8e6b9 --- /dev/null +++ b/tests/xtro-sharpie/common-ExposureNotification.ignore @@ -0,0 +1,4 @@ +## enum are not decorated so they _seem_ available to tvOS +!missing-enum! ENAuthorizationStatus not bound +!missing-enum! ENErrorCode not bound +!missing-enum! ENStatus not bound diff --git a/tests/xtro-sharpie/common-Foundation.ignore b/tests/xtro-sharpie/common-Foundation.ignore index 060330116060..3a08e0006f65 100644 --- a/tests/xtro-sharpie/common-Foundation.ignore +++ b/tests/xtro-sharpie/common-Foundation.ignore @@ -749,8 +749,10 @@ !missing-selector! NSString::getFileSystemRepresentation:maxLength: not bound !missing-selector! NSString::hash not bound !missing-selector! NSString::initWithBytes:length:encoding: not bound +!missing-selector! NSString::initWithBytesNoCopy:length:encoding:deallocator: not bound !missing-selector! NSString::initWithBytesNoCopy:length:encoding:freeWhenDone: not bound !missing-selector! NSString::initWithCharacters:length: not bound +!missing-selector! NSString::initWithCharactersNoCopy:length:deallocator: not bound !missing-selector! NSString::initWithCharactersNoCopy:length:freeWhenDone: not bound !missing-selector! NSString::initWithContentsOfFile:encoding:error: not bound !missing-selector! NSString::initWithContentsOfFile:usedEncoding:error: not bound diff --git a/tests/xtro-sharpie/common-GameKit.ignore b/tests/xtro-sharpie/common-GameKit.ignore index 0dad453d5d74..ed18de13cae9 100644 --- a/tests/xtro-sharpie/common-GameKit.ignore +++ b/tests/xtro-sharpie/common-GameKit.ignore @@ -10,6 +10,14 @@ ## enum size declared after the enum, e.g. `typedef NSInteger GKInviteeResponse;`, so we miss the metadata !unknown-native-enum! GKInviteeResponse bound +# Xcode 12 beta 3 - these API are missing +# https://github.com/xamarin/maccore/issues/2269 +!missing-selector! GKLeaderboardEntry::context not bound +!missing-selector! GKLeaderboardEntry::date not bound +!missing-selector! GKLeaderboardEntry::formattedScore not bound +!missing-selector! GKLeaderboardEntry::rank not bound +!missing-selector! GKLeaderboardEntry::score not bound + ## unsorted diff --git a/tests/xtro-sharpie/common-Intents.ignore b/tests/xtro-sharpie/common-Intents.ignore index 22139bfb9aef..d26c3193603e 100644 --- a/tests/xtro-sharpie/common-Intents.ignore +++ b/tests/xtro-sharpie/common-Intents.ignore @@ -41,7 +41,6 @@ ## NS_DEPRECATED(13_0, 13_0, 6_0, 6_0) !missing-selector! INMediaSearch::activityNames not bound -!missing-selector! INMediaSearch::initWithMediaType:sortOrder:mediaName:artistName:albumName:genreNames:moodNames:activityNames:releaseDate:reference:mediaIdentifier: not bound ## unsorted @@ -49,6 +48,8 @@ ## Deprecated so no need to be bound !missing-selector! INRequestRideIntent::initWithPickupLocation:dropOffLocation:rideOptionName:partySize:paymentMethod: not bound +!missing-selector! INReservation::url not bound +!missing-selector! INSendMessageIntent::initWithRecipients:outgoingMessageType:content:speakableGroupName:conversationIdentifier:serviceName:sender: not bound ## Research required before we can bind the following ones !missing-selector! +NSString::deferredLocalizedNSStringStringWithFormat: not bound diff --git a/tests/xtro-sharpie/common-MLCompute.ignore b/tests/xtro-sharpie/common-MLCompute.ignore new file mode 100644 index 000000000000..d0241bc6dcf8 --- /dev/null +++ b/tests/xtro-sharpie/common-MLCompute.ignore @@ -0,0 +1,6 @@ +## already deprecated (and replaced) +!missing-selector! +MLCSGDOptimizer::optimizerWithDescriptor:momentumScale:usesNestrovMomentum: not bound +!missing-selector! MLCTensor::optimizerData: not bound + +## sharpie skip empty types - but they can be used +!unknown-type! MLCTensorOptimizerDeviceData bound diff --git a/tests/xtro-sharpie/common-MediaPlayer.ignore b/tests/xtro-sharpie/common-MediaPlayer.ignore index a33585b90ecb..0e6e5cc1e805 100644 --- a/tests/xtro-sharpie/common-MediaPlayer.ignore +++ b/tests/xtro-sharpie/common-MediaPlayer.ignore @@ -1,3 +1,44 @@ +## the API are present but from calling the underlying collections +## the selectors are newer but they were already bound that way + +!missing-selector! MPMediaItem::albumArtist not bound +!missing-selector! MPMediaItem::albumArtistPersistentID not bound +!missing-selector! MPMediaItem::albumPersistentID not bound +!missing-selector! MPMediaItem::albumTitle not bound +!missing-selector! MPMediaItem::albumTrackCount not bound +!missing-selector! MPMediaItem::albumTrackNumber not bound +!missing-selector! MPMediaItem::artist not bound +!missing-selector! MPMediaItem::artistPersistentID not bound +!missing-selector! MPMediaItem::artwork not bound +!missing-selector! MPMediaItem::assetURL not bound +!missing-selector! MPMediaItem::beatsPerMinute not bound +!missing-selector! MPMediaItem::bookmarkTime not bound +!missing-selector! MPMediaItem::comments not bound +!missing-selector! MPMediaItem::composer not bound +!missing-selector! MPMediaItem::composerPersistentID not bound +!missing-selector! MPMediaItem::dateAdded not bound +!missing-selector! MPMediaItem::discCount not bound +!missing-selector! MPMediaItem::discNumber not bound +!missing-selector! MPMediaItem::genre not bound +!missing-selector! MPMediaItem::genrePersistentID not bound +!missing-selector! MPMediaItem::hasProtectedAsset not bound +!missing-selector! MPMediaItem::isCloudItem not bound +!missing-selector! MPMediaItem::isCompilation not bound +!missing-selector! MPMediaItem::isExplicitItem not bound +!missing-selector! MPMediaItem::lastPlayedDate not bound +!missing-selector! MPMediaItem::lyrics not bound +!missing-selector! MPMediaItem::mediaType not bound +!missing-selector! MPMediaItem::persistentID not bound +!missing-selector! MPMediaItem::playbackDuration not bound +!missing-selector! MPMediaItem::playbackStoreID not bound +!missing-selector! MPMediaItem::playCount not bound +!missing-selector! MPMediaItem::podcastPersistentID not bound +!missing-selector! MPMediaItem::podcastTitle not bound +!missing-selector! MPMediaItem::rating not bound +!missing-selector! MPMediaItem::releaseDate not bound +!missing-selector! MPMediaItem::skipCount not bound +!missing-selector! MPMediaItem::title not bound +!missing-selector! MPMediaItem::userGrouping not bound # Initial result from new rule extra-null-allowed !extra-null-allowed! 'System.Void MediaPlayer.MPRemoteCommand::RemoveTarget(Foundation.NSObject,ObjCRuntime.Selector)' has a extraneous [NullAllowed] on parameter #0 diff --git a/tests/xtro-sharpie/common-Metal.ignore b/tests/xtro-sharpie/common-Metal.ignore index b18f8299d3d9..62e6453d588f 100644 --- a/tests/xtro-sharpie/common-Metal.ignore +++ b/tests/xtro-sharpie/common-Metal.ignore @@ -36,7 +36,6 @@ !incorrect-protocol-member! MTLDevice::getDefaultSamplePositions:count: is REQUIRED and should be abstract !incorrect-protocol-member! MTLDevice::heapBufferSizeAndAlignWithLength:options: is REQUIRED and should be abstract !incorrect-protocol-member! MTLDevice::heapTextureSizeAndAlignWithDescriptor: is REQUIRED and should be abstract -!incorrect-protocol-member! MTLDevice::isRemovable is REQUIRED and should be abstract !incorrect-protocol-member! MTLDevice::maxThreadgroupMemoryLength is REQUIRED and should be abstract !incorrect-protocol-member! MTLDevice::minimumLinearTextureAlignmentForPixelFormat: is REQUIRED and should be abstract !incorrect-protocol-member! MTLDevice::newArgumentEncoderWithArguments: is REQUIRED and should be abstract diff --git a/tests/xtro-sharpie/common-PDFKit.ignore b/tests/xtro-sharpie/common-PDFKit.ignore index ed448e9437ac..0dccdd989811 100644 --- a/tests/xtro-sharpie/common-PDFKit.ignore +++ b/tests/xtro-sharpie/common-PDFKit.ignore @@ -1,41 +1,2 @@ # Field used in an EventArg based structure that are in documentation but not in headers !unknown-field! PDFAnnotationHit bound - -# Deprecated -!missing-selector! PDFAnnotation::initWithDictionary:forPage: not bound -!missing-field! kPDFAnnotationKey_Action not bound -!missing-field! kPDFAnnotationKey_AdditionalActions not bound -!missing-field! kPDFAnnotationKey_AppearanceDictionary not bound -!missing-field! kPDFAnnotationKey_AppearanceState not bound -!missing-field! kPDFAnnotationKey_Border not bound -!missing-field! kPDFAnnotationKey_BorderStyle not bound -!missing-field! kPDFAnnotationKey_Color not bound -!missing-field! kPDFAnnotationKey_Contents not bound -!missing-field! kPDFAnnotationKey_Date not bound -!missing-field! kPDFAnnotationKey_DefaultAppearance not bound -!missing-field! kPDFAnnotationKey_Destination not bound -!missing-field! kPDFAnnotationKey_Flags not bound -!missing-field! kPDFAnnotationKey_HighlightingMode not bound -!missing-field! kPDFAnnotationKey_IconName not bound -!missing-field! kPDFAnnotationKey_Inklist not bound -!missing-field! kPDFAnnotationKey_InteriorColor not bound -!missing-field! kPDFAnnotationKey_LineEndingStyles not bound -!missing-field! kPDFAnnotationKey_LinePoints not bound -!missing-field! kPDFAnnotationKey_Name not bound -!missing-field! kPDFAnnotationKey_Open not bound -!missing-field! kPDFAnnotationKey_Page not bound -!missing-field! kPDFAnnotationKey_Parent not bound -!missing-field! kPDFAnnotationKey_Popup not bound -!missing-field! kPDFAnnotationKey_Quadding not bound -!missing-field! kPDFAnnotationKey_QuadPoints not bound -!missing-field! kPDFAnnotationKey_Rect not bound -!missing-field! kPDFAnnotationKey_Subtype not bound -!missing-field! kPDFAnnotationKey_TextLabel not bound -!missing-field! kPDFAnnotationKey_WidgetAppearanceDictionary not bound -!missing-field! kPDFAnnotationKey_WidgetDefaultValue not bound -!missing-field! kPDFAnnotationKey_WidgetFieldFlags not bound -!missing-field! kPDFAnnotationKey_WidgetFieldType not bound -!missing-field! kPDFAnnotationKey_WidgetMaxLen not bound -!missing-field! kPDFAnnotationKey_WidgetOptions not bound -!missing-field! kPDFAnnotationKey_WidgetTextLabelUI not bound -!missing-field! kPDFAnnotationKey_WidgetValue not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/common-PassKit.ignore b/tests/xtro-sharpie/common-PassKit.ignore index e2a1855c14bf..2761392625bf 100644 --- a/tests/xtro-sharpie/common-PassKit.ignore +++ b/tests/xtro-sharpie/common-PassKit.ignore @@ -1,2 +1,30 @@ ## made optional in xcode9 beta 3 since it was replaced with newer API +!incorrect-protocol-member! PKPaymentAuthorizationViewControllerDelegate::paymentAuthorizationViewController:didAuthorizePayment:completion: is OPTIONAL and should NOT be abstract + +## made optional in xcode12 beta 3 since it was replaced with newer API !incorrect-protocol-member! PKPaymentAuthorizationControllerDelegate::paymentAuthorizationController:didAuthorizePayment:completion: is OPTIONAL and should NOT be abstract +!incorrect-protocol-member! PKPaymentAuthorizationViewControllerDelegate::paymentAuthorizationViewControllerWillAuthorizePayment: is OPTIONAL and should NOT be abstract + +# Initial result from new rule extra-null-allowed +!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_CountryCode(System.String)' has a extraneous [NullAllowed] on parameter #0 +!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_CurrencyCode(System.String)' has a extraneous [NullAllowed] on parameter #0 +!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_MerchantIdentifier(System.String)' has a extraneous [NullAllowed] on parameter #0 +!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_PaymentSummaryItems(PassKit.PKPaymentSummaryItem[])' has a extraneous [NullAllowed] on parameter #0 +!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_SupportedNetworks(Foundation.NSString[])' has a extraneous [NullAllowed] on parameter #0 +!extra-null-allowed! 'System.Void PassKit.PKPaymentSummaryItem::set_Amount(Foundation.NSDecimalNumber)' has a extraneous [NullAllowed] on parameter #0 +!extra-null-allowed! 'System.Void PassKit.PKPaymentSummaryItem::set_Label(System.String)' has a extraneous [NullAllowed] on parameter #0 + +# Initial result from new rule missing-null-allowed +!missing-null-allowed! 'AddressBook.ABRecord PassKit.PKPayment::get_BillingAddress()' is missing an [NullAllowed] on return type +!missing-null-allowed! 'AddressBook.ABRecord PassKit.PKPayment::get_ShippingAddress()' is missing an [NullAllowed] on return type +!missing-null-allowed! 'Foundation.NSDate PassKit.PKPass::get_RelevantDate()' is missing an [NullAllowed] on return type +!missing-null-allowed! 'Foundation.NSDictionary PassKit.PKPass::get_UserInfo()' is missing an [NullAllowed] on return type +!missing-null-allowed! 'Foundation.NSObject PassKit.PKPass::GetLocalizedValue(Foundation.NSString)' is missing an [NullAllowed] on return type +!missing-null-allowed! 'Foundation.NSUrl PassKit.PKPass::get_WebServiceUrl()' is missing an [NullAllowed] on return type +!missing-null-allowed! 'PassKit.PKPass PassKit.PKPassLibrary::GetPass(System.String,System.String)' is missing an [NullAllowed] on return type +!missing-null-allowed! 'PassKit.PKPaymentPass PassKit.PKPass::get_PaymentPass()' is missing an [NullAllowed] on return type +!missing-null-allowed! 'PassKit.PKShippingMethod PassKit.PKPayment::get_ShippingMethod()' is missing an [NullAllowed] on return type +!missing-null-allowed! 'System.String PassKit.PKPass::get_AuthenticationToken()' is missing an [NullAllowed] on return type +!missing-null-allowed! 'System.Void PassKit.PKPaymentAuthorizationResult::set_Errors(Foundation.NSError[])' is missing an [NullAllowed] on parameter #0 +!missing-null-allowed! 'System.Void PassKit.PKPaymentRequestPaymentMethodUpdate::set_Errors(Foundation.NSError[])' is missing an [NullAllowed] on parameter #0 +!missing-null-allowed! 'System.Void PassKit.PKPaymentRequestShippingContactUpdate::set_Errors(Foundation.NSError[])' is missing an [NullAllowed] on parameter #0 diff --git a/tests/xtro-sharpie/common-Photos.ignore b/tests/xtro-sharpie/common-Photos.ignore index be52f9a3a956..5e9fab1e57a2 100644 --- a/tests/xtro-sharpie/common-Photos.ignore +++ b/tests/xtro-sharpie/common-Photos.ignore @@ -1,4 +1 @@ !missing-protocol-conformance! PHFetchResult should conform to NSFastEnumeration - -# Enum is named PHPhotosErrorDomain and is clashing with domain name https://feedbackassistant.apple.com/feedback/6556635 -!unknown-native-enum! PHPhotosError bound diff --git a/tests/xtro-sharpie/common-SceneKit.ignore b/tests/xtro-sharpie/common-SceneKit.ignore index 51522c7e3f09..002d92814fda 100644 --- a/tests/xtro-sharpie/common-SceneKit.ignore +++ b/tests/xtro-sharpie/common-SceneKit.ignore @@ -24,6 +24,7 @@ !incorrect-protocol-member! SCNSceneRenderer::setTemporalAntialiasingEnabled: is REQUIRED and should be abstract !incorrect-protocol-member! SCNSceneRenderer::setUsesReverseZ: is REQUIRED and should be abstract !incorrect-protocol-member! SCNSceneRenderer::usesReverseZ is REQUIRED and should be abstract +!incorrect-protocol-member! SCNSceneRenderer::currentRenderPassDescriptor is REQUIRED and should be abstract ## same for SCNActionable, it is required member of a protocol added to XAMCORE_4_0 !incorrect-protocol-member! SCNActionable::actionKeys is REQUIRED and should be abstract diff --git a/tests/xtro-sharpie/common-Vision.ignore b/tests/xtro-sharpie/common-Vision.ignore index 29031fae7f4d..9de5a891ef6b 100644 --- a/tests/xtro-sharpie/common-Vision.ignore +++ b/tests/xtro-sharpie/common-Vision.ignore @@ -35,6 +35,12 @@ !unknown-native-enum! VNGenerateObjectnessBasedSaliencyImageRequestRevision bound !unknown-native-enum! VNRecognizeAnimalsRequestRevision bound !unknown-native-enum! VNRecognizeTextRequestRevision bound +!unknown-native-enum! VNDetectContourRequestRevision bound +!unknown-native-enum! VNDetectHumanBodyPoseRequestRevision bound +!unknown-native-enum! VNDetectHumanHandPoseRequestRevision bound +!unknown-native-enum! VNDetectTrajectoriesRequestRevision bound +!unknown-native-enum! VNGenerateOpticalFlowRequestRevision bound +!unknown-native-enum! VNStatefulRequestRevision bound ## VNRequest is an abstract class so this will be bound in subclasses ## matching the return type to the above defined custom enums @@ -46,6 +52,77 @@ ## init is available but it's abstract (type) and not a designated initializer (so we don't bind it) !missing-selector! VNRequest::init not bound -## Will be removed in future xcode11 beta -!missing-field! VNAnimalDetectorCat not bound -!missing-field! VNAnimalDetectorDog not bound +# Not really needed anymore, this old(?) unbound APIs got replaced +!missing-field! VNVideoProcessingOptionFrameCadence not bound +!missing-field! VNVideoProcessingOptionTimeInterval not bound + +# API introduced and deprecated at the same time in Xcode 12 +!missing-field! VNBodyLandmarkKeyLeftAnkle not bound +!missing-field! VNBodyLandmarkKeyLeftEar not bound +!missing-field! VNBodyLandmarkKeyLeftElbow not bound +!missing-field! VNBodyLandmarkKeyLeftEye not bound +!missing-field! VNBodyLandmarkKeyLeftHip not bound +!missing-field! VNBodyLandmarkKeyLeftKnee not bound +!missing-field! VNBodyLandmarkKeyLeftShoulder not bound +!missing-field! VNBodyLandmarkKeyLeftWrist not bound +!missing-field! VNBodyLandmarkKeyNeck not bound +!missing-field! VNBodyLandmarkKeyNose not bound +!missing-field! VNBodyLandmarkKeyRightAnkle not bound +!missing-field! VNBodyLandmarkKeyRightEar not bound +!missing-field! VNBodyLandmarkKeyRightElbow not bound +!missing-field! VNBodyLandmarkKeyRightEye not bound +!missing-field! VNBodyLandmarkKeyRightHip not bound +!missing-field! VNBodyLandmarkKeyRightKnee not bound +!missing-field! VNBodyLandmarkKeyRightShoulder not bound +!missing-field! VNBodyLandmarkKeyRightWrist not bound +!missing-field! VNBodyLandmarkKeyRoot not bound +!missing-field! VNBodyLandmarkRegionKeyFace not bound +!missing-field! VNBodyLandmarkRegionKeyLeftArm not bound +!missing-field! VNBodyLandmarkRegionKeyLeftLeg not bound +!missing-field! VNBodyLandmarkRegionKeyRightArm not bound +!missing-field! VNBodyLandmarkRegionKeyRightLeg not bound +!missing-field! VNBodyLandmarkRegionKeyTorso not bound +!missing-field! VNHandLandmarkKeyIndexDIP not bound +!missing-field! VNHandLandmarkKeyIndexMCP not bound +!missing-field! VNHandLandmarkKeyIndexPIP not bound +!missing-field! VNHandLandmarkKeyIndexTIP not bound +!missing-field! VNHandLandmarkKeyLittleDIP not bound +!missing-field! VNHandLandmarkKeyLittleMCP not bound +!missing-field! VNHandLandmarkKeyLittlePIP not bound +!missing-field! VNHandLandmarkKeyLittleTIP not bound +!missing-field! VNHandLandmarkKeyMiddleDIP not bound +!missing-field! VNHandLandmarkKeyMiddleMCP not bound +!missing-field! VNHandLandmarkKeyMiddlePIP not bound +!missing-field! VNHandLandmarkKeyMiddleTIP not bound +!missing-field! VNHandLandmarkKeyRingDIP not bound +!missing-field! VNHandLandmarkKeyRingMCP not bound +!missing-field! VNHandLandmarkKeyRingPIP not bound +!missing-field! VNHandLandmarkKeyRingTIP not bound +!missing-field! VNHandLandmarkKeyThumbCMC not bound +!missing-field! VNHandLandmarkKeyThumbIP not bound +!missing-field! VNHandLandmarkKeyThumbMP not bound +!missing-field! VNHandLandmarkKeyThumbTIP not bound +!missing-field! VNHandLandmarkKeyWrist not bound +!missing-field! VNHandLandmarkRegionKeyIndexFinger not bound +!missing-field! VNHandLandmarkRegionKeyLittleFinger not bound +!missing-field! VNHandLandmarkRegionKeyMiddleFinger not bound +!missing-field! VNHandLandmarkRegionKeyRingFinger not bound +!missing-field! VNHandLandmarkRegionKeyThumb not bound +!missing-selector! +VNDetectHumanBodyPoseRequest::supportedIdentifiedPointGroupKeysForRevision:error: not bound +!missing-selector! +VNDetectHumanBodyPoseRequest::supportedIdentifiedPointKeysForRevision:error: not bound +!missing-selector! +VNDetectHumanBodyPoseRequest::supportedRecognizedPointGroupKeysForRevision:error: not bound +!missing-selector! +VNDetectHumanBodyPoseRequest::supportedRecognizedPointKeysForRevision:error: not bound +!missing-selector! +VNDetectHumanHandPoseRequest::supportedIdentifiedPointGroupKeysForRevision:error: not bound +!missing-selector! +VNDetectHumanHandPoseRequest::supportedIdentifiedPointKeysForRevision:error: not bound +!missing-selector! +VNDetectHumanHandPoseRequest::supportedRecognizedPointGroupKeysForRevision:error: not bound +!missing-selector! +VNDetectHumanHandPoseRequest::supportedRecognizedPointKeysForRevision:error: not bound +!missing-selector! +VNPoint::distanceBetweenPoint:point: not bound +!missing-selector! VNDetectContoursRequest::detectDarkOnLight not bound +!missing-selector! VNDetectContoursRequest::setDetectDarkOnLight: not bound +!missing-selector! VNDetectTrajectoriesRequest::maximumObjectSize not bound +!missing-selector! VNDetectTrajectoriesRequest::minimumObjectSize not bound +!missing-selector! VNDetectTrajectoriesRequest::setMaximumObjectSize: not bound +!missing-selector! VNDetectTrajectoriesRequest::setMinimumObjectSize: not bound +!missing-selector! VNStatefulRequest::requestFrameAnalysisSpacing not bound +!missing-selector! VNVideoProcessor::addRequest:withProcessingOptions:error: not bound +!missing-selector! VNVideoProcessor::analyzeWithTimeRange:error: not bound diff --git a/tests/xtro-sharpie/common-WidgetKit.ignore b/tests/xtro-sharpie/common-WidgetKit.ignore new file mode 100644 index 000000000000..dffc55e8bf3d --- /dev/null +++ b/tests/xtro-sharpie/common-WidgetKit.ignore @@ -0,0 +1,3 @@ +## https://github.com/xamarin/xamarin-macios/issues/8931 +!missing-field! WGWidgetUserInfoKeyFamily not bound +!missing-field! WGWidgetUserInfoKeyKind not bound diff --git a/tests/xtro-sharpie/iOS-AuthenticationServices.todo b/tests/xtro-sharpie/iOS-AuthenticationServices.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-AutomaticAssessmentConfiguration.todo b/tests/xtro-sharpie/iOS-AutomaticAssessmentConfiguration.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-CallKit.todo b/tests/xtro-sharpie/iOS-CallKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-CarPlay.ignore b/tests/xtro-sharpie/iOS-CarPlay.ignore index 342dd0329fac..8b961901a48f 100644 --- a/tests/xtro-sharpie/iOS-CarPlay.ignore +++ b/tests/xtro-sharpie/iOS-CarPlay.ignore @@ -1,3 +1,16 @@ !incorrect-protocol-member! CPBarButtonProviding::backButton is REQUIRED and should be abstract !incorrect-protocol-member! CPBarButtonProviding::setBackButton: is REQUIRED and should be abstract !incorrect-protocol-member! CPSessionConfigurationDelegate::sessionConfiguration:limitedUserInterfacesChanged: is OPTIONAL and should NOT be abstract + +# introduced iOS 14, deprecated iOS 14 +!missing-selector! CPListItem::showsExplicitLabel not bound +!missing-selector! CPListItem::setShowsExplicitLabel: not bound + +# Removed in iOS 14 +!unknown-field! CPMaximumListItemImageSize bound + +# As of Xcode 12 beta 6 the CarPlay framework does not have an error enum +!missing-field! CarPlayErrorDomain not bound + +# Exposed as read/write but not writeable, likely should be read-only. Xcode 12 Beta 6 +!missing-selector! +CPNowPlayingTemplate::setSharedTemplate: not bound diff --git a/tests/xtro-sharpie/iOS-CarPlay.todo b/tests/xtro-sharpie/iOS-CarPlay.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-ClassKit.todo b/tests/xtro-sharpie/iOS-ClassKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-ClockKit.ignore b/tests/xtro-sharpie/iOS-ClockKit.ignore new file mode 100644 index 000000000000..277a5cae0edd --- /dev/null +++ b/tests/xtro-sharpie/iOS-ClockKit.ignore @@ -0,0 +1,5 @@ +# was added in iOS but it should have not, issue: https://github.com/xamarin/maccore/issues/2300 +!missing-enum! CLKWatchFaceLibraryErrorCode not bound +!missing-field! CLKWatchFaceLibraryErrorDomain not bound +!missing-selector! CLKWatchFaceLibrary::addWatchFaceAtURL:completionHandler: not bound +!missing-type! CLKWatchFaceLibrary not bound diff --git a/tests/xtro-sharpie/iOS-CloudKit.ignore b/tests/xtro-sharpie/iOS-CloudKit.ignore deleted file mode 100644 index 114b474d478c..000000000000 --- a/tests/xtro-sharpie/iOS-CloudKit.ignore +++ /dev/null @@ -1,20 +0,0 @@ -# deperecated and give issues with submissions. -!missing-selector! CKContainer::discoverAllContactUserInfosWithCompletionHandler: not bound -!missing-selector! CKContainer::discoverUserInfoWithEmailAddress:completionHandler: not bound -!missing-selector! CKContainer::discoverUserInfoWithUserRecordID:completionHandler: not bound -!missing-selector! CKDiscoverAllContactsOperation::discoverAllContactsCompletionBlock not bound -!missing-selector! CKDiscoverAllContactsOperation::setDiscoverAllContactsCompletionBlock: not bound -!missing-selector! CKDiscoveredUserInfo::displayContact not bound -!missing-selector! CKDiscoverUserInfosOperation::discoverUserInfosCompletionBlock not bound -!missing-selector! CKDiscoverUserInfosOperation::emailAddresses not bound -!missing-selector! CKDiscoverUserInfosOperation::init not bound -!missing-selector! CKDiscoverUserInfosOperation::initWithEmailAddresses:userRecordIDs: not bound -!missing-selector! CKDiscoverUserInfosOperation::setDiscoverUserInfosCompletionBlock: not bound -!missing-selector! CKDiscoverUserInfosOperation::setEmailAddresses: not bound -!missing-selector! CKDiscoverUserInfosOperation::setUserRecordIDs: not bound -!missing-selector! CKDiscoverUserInfosOperation::userRecordIDs not bound -!missing-selector! CKQueryNotification::isPublicDatabase not bound -!missing-selector! CKSubscription::initWithZoneID:options: not bound -!missing-selector! CKSubscription::initWithZoneID:subscriptionID:options: not bound -!missing-selector! CKSubscription::subscriptionOptions not bound -!missing-type! CKDiscoverUserInfosOperation not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/iOS-CoreGraphics.ignore b/tests/xtro-sharpie/iOS-CoreGraphics.ignore deleted file mode 100644 index ebe04a4f60ae..000000000000 --- a/tests/xtro-sharpie/iOS-CoreGraphics.ignore +++ /dev/null @@ -1,6 +0,0 @@ -## OSX-only functions - fixed in maccore/main a0ab1a7027fb2afdd240d2bc54ca2bb048d98da4 -## they are physically in iOS but declared as N/A (so private) -## fixed in XAMCORE_3_0 so it's not part of the tvOS and watchOS profiles -!unknown-pinvoke! CGColorCreateGenericGray bound -!unknown-pinvoke! CGColorCreateGenericRGB bound -!unknown-pinvoke! CGColorGetConstantColor bound diff --git a/tests/xtro-sharpie/iOS-CoreGraphics.todo b/tests/xtro-sharpie/iOS-CoreGraphics.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-CoreLocation.todo b/tests/xtro-sharpie/iOS-CoreLocation.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-CoreMIDI.ignore b/tests/xtro-sharpie/iOS-CoreMIDI.ignore deleted file mode 100644 index 28567d1356fb..000000000000 --- a/tests/xtro-sharpie/iOS-CoreMIDI.ignore +++ /dev/null @@ -1,5 +0,0 @@ -!missing-selector! MIDICISession::getProperty:onChannel:responseHandler: not bound -!missing-selector! MIDICISession::hasProperty:onChannel:responseHandler: not bound -!missing-selector! MIDICISession::propertyChangedCallback not bound -!missing-selector! MIDICISession::setProperty:onChannel:responseHandler: not bound -!missing-selector! MIDICISession::setPropertyChangedCallback: not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/iOS-CoreML.todo b/tests/xtro-sharpie/iOS-CoreML.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-CoreNFC.ignore b/tests/xtro-sharpie/iOS-CoreNFC.ignore index 18254f356fb5..dcbb0a700947 100644 --- a/tests/xtro-sharpie/iOS-CoreNFC.ignore +++ b/tests/xtro-sharpie/iOS-CoreNFC.ignore @@ -28,3 +28,14 @@ !incorrect-protocol-member! NFCTag::asNFCISO15693Tag is REQUIRED and should be abstract !incorrect-protocol-member! NFCTag::asNFCISO7816Tag is REQUIRED and should be abstract !incorrect-protocol-member! NFCTag::asNFCMiFareTag is REQUIRED and should be abstract +!incorrect-protocol-member! NFCISO15693Tag::authenticateWithRequestFlags:cryptoSuiteIdentifier:message:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! NFCISO15693Tag::challengeWithRequestFlags:cryptoSuiteIdentifier:message:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! NFCISO15693Tag::extendedFastReadMultipleBlocksWithRequestFlag:blockRange:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! NFCISO15693Tag::extendedGetMultipleBlockSecurityStatusWithRequestFlag:blockRange:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! NFCISO15693Tag::extendedWriteMultipleBlocksWithRequestFlags:blockRange:dataBlocks:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! NFCISO15693Tag::keyUpdateWithRequestFlags:keyIdentifier:message:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! NFCISO15693Tag::readBufferWithRequestFlags:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! NFCISO15693Tag::sendRequestWithFlag:commandCode:data:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! NFCISO15693Tag::fastReadMultipleBlocksWithRequestFlag:blockRange:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! NFCISO15693Tag::getSystemInfoAndUIDWithRequestFlag:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! NFCISO15693Tag::lockDSFIDWithRequestFlag:completionHandler: is REQUIRED and should be abstract \ No newline at end of file diff --git a/tests/xtro-sharpie/iOS-CoreTelephony.ignore b/tests/xtro-sharpie/iOS-CoreTelephony.ignore index cea1c33615c3..bc51135b6360 100644 --- a/tests/xtro-sharpie/iOS-CoreTelephony.ignore +++ b/tests/xtro-sharpie/iOS-CoreTelephony.ignore @@ -1,7 +1,26 @@ -## deprecated in iOS 10 (in favor of CallKit) -!missing-field! CTCallStateConnected not bound -!missing-field! CTCallStateDialing not bound -!missing-field! CTCallStateDisconnected not bound -!missing-field! CTCallStateIncoming not bound -!missing-field! CTRadioAccessTechnologyDidChangeNotification not bound -!missing-field! CTSubscriberTokenRefreshed not bound +# the following have been removed from xcode 12: +!unknown-field! CTRadioAccessTechnologyCDMA1x bound +!unknown-field! CTRadioAccessTechnologyCDMAEVDORev0 bound +!unknown-field! CTRadioAccessTechnologyCDMAEVDORevA bound +!unknown-field! CTRadioAccessTechnologyCDMAEVDORevB bound +!unknown-field! CTRadioAccessTechnologyEdge bound +!unknown-field! CTRadioAccessTechnologyeHRPD bound +!unknown-field! CTRadioAccessTechnologyGPRS bound +!unknown-field! CTRadioAccessTechnologyHSDPA bound +!unknown-field! CTRadioAccessTechnologyHSUPA bound +!unknown-field! CTRadioAccessTechnologyLTE bound +!unknown-field! CTRadioAccessTechnologyWCDMA bound +!unknown-field! CTServiceRadioAccessTechnologyDidChangeNotification bound +!unknown-native-enum! CTCellularDataRestrictedState bound +!unknown-native-enum! CTCellularPlanProvisioningAddPlanResult bound +!unknown-protocol! CTSubscriberDelegate bound +!unknown-protocol! CTTelephonyNetworkInfoDelegate bound +!unknown-type! CTCall bound +!unknown-type! CTCallCenter bound +!unknown-type! CTCarrier bound +!unknown-type! CTCellularData bound +!unknown-type! CTCellularPlanProvisioning bound +!unknown-type! CTCellularPlanProvisioningRequest bound +!unknown-type! CTSubscriber bound +!unknown-type! CTSubscriberInfo bound +!unknown-type! CTTelephonyNetworkInfo bound diff --git a/tests/xtro-sharpie/iOS-CryptoTokenKit.todo b/tests/xtro-sharpie/iOS-CryptoTokenKit.todo deleted file mode 100644 index 9e4941a324bb..000000000000 --- a/tests/xtro-sharpie/iOS-CryptoTokenKit.todo +++ /dev/null @@ -1,220 +0,0 @@ -!missing-enum! TKErrorCode not bound -!missing-enum! TKSmartCardPINCharset not bound -!missing-enum! TKSmartCardPINCompletion not bound -!missing-enum! TKSmartCardPINConfirmation not bound -!missing-enum! TKSmartCardPINEncoding not bound -!missing-enum! TKSmartCardPINJustification not bound -!missing-enum! TKSmartCardProtocol not bound -!missing-enum! TKSmartCardSlotState not bound -!missing-enum! TKTokenOperation not bound -!missing-field! TKErrorDomain not bound -!missing-protocol! TKSmartCardTokenDriverDelegate not bound -!missing-protocol! TKSmartCardUserInteractionDelegate not bound -!missing-protocol! TKTokenDelegate not bound -!missing-protocol! TKTokenDriverDelegate not bound -!missing-protocol! TKTokenSessionDelegate not bound -!missing-selector! +TKBERTLVRecord::dataForTag: not bound -!missing-selector! +TKSmartCardSlotManager::defaultManager not bound -!missing-selector! +TKTLVRecord::recordFromData: not bound -!missing-selector! +TKTLVRecord::sequenceOfRecordsFromData: not bound -!missing-selector! +TKTokenDriverConfiguration::driverConfigurations not bound -!missing-selector! TKBERTLVRecord::initWithTag:records: not bound -!missing-selector! TKBERTLVRecord::initWithTag:value: not bound -!missing-selector! TKCompactTLVRecord::initWithTag:value: not bound -!missing-selector! TKSimpleTLVRecord::initWithTag:value: not bound -!missing-selector! TKSmartCard::allowedProtocols not bound -!missing-selector! TKSmartCard::beginSessionWithReply: not bound -!missing-selector! TKSmartCard::cla not bound -!missing-selector! TKSmartCard::context not bound -!missing-selector! TKSmartCard::currentProtocol not bound -!missing-selector! TKSmartCard::endSession not bound -!missing-selector! TKSmartCard::inSessionWithError:executeBlock: not bound -!missing-selector! TKSmartCard::sendIns:p1:p2:data:le:reply: not bound -!missing-selector! TKSmartCard::sendIns:p1:p2:data:le:sw:error: not bound -!missing-selector! TKSmartCard::sensitive not bound -!missing-selector! TKSmartCard::setAllowedProtocols: not bound -!missing-selector! TKSmartCard::setCla: not bound -!missing-selector! TKSmartCard::setContext: not bound -!missing-selector! TKSmartCard::setSensitive: not bound -!missing-selector! TKSmartCard::setUseCommandChaining: not bound -!missing-selector! TKSmartCard::setUseExtendedLength: not bound -!missing-selector! TKSmartCard::slot not bound -!missing-selector! TKSmartCard::transmitRequest:reply: not bound -!missing-selector! TKSmartCard::useCommandChaining not bound -!missing-selector! TKSmartCard::useExtendedLength not bound -!missing-selector! TKSmartCard::userInteractionForSecurePINChangeWithPINFormat:APDU:currentPINByteOffset:newPINByteOffset: not bound -!missing-selector! TKSmartCard::userInteractionForSecurePINVerificationWithPINFormat:APDU:PINByteOffset: not bound -!missing-selector! TKSmartCard::valid not bound -!missing-selector! TKSmartCardATR::bytes not bound -!missing-selector! TKSmartCardATR::historicalBytes not bound -!missing-selector! TKSmartCardATR::historicalRecords not bound -!missing-selector! TKSmartCardATR::initWithBytes: not bound -!missing-selector! TKSmartCardATR::initWithSource: not bound -!missing-selector! TKSmartCardATR::interfaceGroupAtIndex: not bound -!missing-selector! TKSmartCardATR::interfaceGroupForProtocol: not bound -!missing-selector! TKSmartCardATR::protocols not bound -!missing-selector! TKSmartCardATRInterfaceGroup::protocol not bound -!missing-selector! TKSmartCardATRInterfaceGroup::TA not bound -!missing-selector! TKSmartCardATRInterfaceGroup::TB not bound -!missing-selector! TKSmartCardATRInterfaceGroup::TC not bound -!missing-selector! TKSmartCardPINFormat::charset not bound -!missing-selector! TKSmartCardPINFormat::encoding not bound -!missing-selector! TKSmartCardPINFormat::maxPINLength not bound -!missing-selector! TKSmartCardPINFormat::minPINLength not bound -!missing-selector! TKSmartCardPINFormat::PINBitOffset not bound -!missing-selector! TKSmartCardPINFormat::PINBlockByteLength not bound -!missing-selector! TKSmartCardPINFormat::PINJustification not bound -!missing-selector! TKSmartCardPINFormat::PINLengthBitOffset not bound -!missing-selector! TKSmartCardPINFormat::PINLengthBitSize not bound -!missing-selector! TKSmartCardPINFormat::setCharset: not bound -!missing-selector! TKSmartCardPINFormat::setEncoding: not bound -!missing-selector! TKSmartCardPINFormat::setMaxPINLength: not bound -!missing-selector! TKSmartCardPINFormat::setMinPINLength: not bound -!missing-selector! TKSmartCardPINFormat::setPINBitOffset: not bound -!missing-selector! TKSmartCardPINFormat::setPINBlockByteLength: not bound -!missing-selector! TKSmartCardPINFormat::setPINJustification: not bound -!missing-selector! TKSmartCardPINFormat::setPINLengthBitOffset: not bound -!missing-selector! TKSmartCardPINFormat::setPINLengthBitSize: not bound -!missing-selector! TKSmartCardSlot::ATR not bound -!missing-selector! TKSmartCardSlot::makeSmartCard not bound -!missing-selector! TKSmartCardSlot::maxInputLength not bound -!missing-selector! TKSmartCardSlot::maxOutputLength not bound -!missing-selector! TKSmartCardSlot::name not bound -!missing-selector! TKSmartCardSlot::state not bound -!missing-selector! TKSmartCardSlotManager::getSlotWithName:reply: not bound -!missing-selector! TKSmartCardSlotManager::slotNamed: not bound -!missing-selector! TKSmartCardSlotManager::slotNames not bound -!missing-selector! TKSmartCardToken::AID not bound -!missing-selector! TKSmartCardToken::initWithSmartCard:AID:instanceID:tokenDriver: not bound -!missing-selector! TKSmartCardTokenSession::smartCard not bound -!missing-selector! TKSmartCardUserInteraction::cancel not bound -!missing-selector! TKSmartCardUserInteraction::delegate not bound -!missing-selector! TKSmartCardUserInteraction::initialTimeout not bound -!missing-selector! TKSmartCardUserInteraction::interactionTimeout not bound -!missing-selector! TKSmartCardUserInteraction::runWithReply: not bound -!missing-selector! TKSmartCardUserInteraction::setDelegate: not bound -!missing-selector! TKSmartCardUserInteraction::setInitialTimeout: not bound -!missing-selector! TKSmartCardUserInteraction::setInteractionTimeout: not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::locale not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::PINCompletion not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::PINMessageIndices not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::resultData not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::resultSW not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::setLocale: not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::setPINCompletion: not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::setPINMessageIndices: not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::setResultData: not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::setResultSW: not bound -!missing-selector! TKSmartCardUserInteractionForSecurePINChange::PINConfirmation not bound -!missing-selector! TKSmartCardUserInteractionForSecurePINChange::setPINConfirmation: not bound -!missing-selector! TKTLVRecord::data not bound -!missing-selector! TKTLVRecord::tag not bound -!missing-selector! TKTLVRecord::value not bound -!missing-selector! TKToken::configuration not bound -!missing-selector! TKToken::delegate not bound -!missing-selector! TKToken::initWithTokenDriver:instanceID: not bound -!missing-selector! TKToken::keychainContents not bound -!missing-selector! TKToken::setDelegate: not bound -!missing-selector! TKToken::tokenDriver not bound -!missing-selector! TKTokenAuthOperation::finishWithError: not bound -!missing-selector! TKTokenConfiguration::certificateForObjectID:error: not bound -!missing-selector! TKTokenConfiguration::configurationData not bound -!missing-selector! TKTokenConfiguration::instanceID not bound -!missing-selector! TKTokenConfiguration::keychainItems not bound -!missing-selector! TKTokenConfiguration::keyForObjectID:error: not bound -!missing-selector! TKTokenConfiguration::setConfigurationData: not bound -!missing-selector! TKTokenConfiguration::setKeychainItems: not bound -!missing-selector! TKTokenDriver::delegate not bound -!missing-selector! TKTokenDriver::setDelegate: not bound -!missing-selector! TKTokenDriverConfiguration::addTokenConfigurationForTokenInstanceID: not bound -!missing-selector! TKTokenDriverConfiguration::classID not bound -!missing-selector! TKTokenDriverConfiguration::removeTokenConfigurationForTokenInstanceID: not bound -!missing-selector! TKTokenDriverConfiguration::tokenConfigurations not bound -!missing-selector! TKTokenKeyAlgorithm::isAlgorithm: not bound -!missing-selector! TKTokenKeyAlgorithm::supportsAlgorithm: not bound -!missing-selector! TKTokenKeychainCertificate::data not bound -!missing-selector! TKTokenKeychainCertificate::initWithCertificate:objectID: not bound -!missing-selector! TKTokenKeychainContents::certificateForObjectID:error: not bound -!missing-selector! TKTokenKeychainContents::fillWithItems: not bound -!missing-selector! TKTokenKeychainContents::items not bound -!missing-selector! TKTokenKeychainContents::keyForObjectID:error: not bound -!missing-selector! TKTokenKeychainItem::constraints not bound -!missing-selector! TKTokenKeychainItem::initWithObjectID: not bound -!missing-selector! TKTokenKeychainItem::label not bound -!missing-selector! TKTokenKeychainItem::objectID not bound -!missing-selector! TKTokenKeychainItem::setConstraints: not bound -!missing-selector! TKTokenKeychainItem::setLabel: not bound -!missing-selector! TKTokenKeychainKey::applicationTag not bound -!missing-selector! TKTokenKeychainKey::canDecrypt not bound -!missing-selector! TKTokenKeychainKey::canPerformKeyExchange not bound -!missing-selector! TKTokenKeychainKey::canSign not bound -!missing-selector! TKTokenKeychainKey::initWithCertificate:objectID: not bound -!missing-selector! TKTokenKeychainKey::isSuitableForLogin not bound -!missing-selector! TKTokenKeychainKey::keySizeInBits not bound -!missing-selector! TKTokenKeychainKey::keyType not bound -!missing-selector! TKTokenKeychainKey::publicKeyData not bound -!missing-selector! TKTokenKeychainKey::publicKeyHash not bound -!missing-selector! TKTokenKeychainKey::setApplicationTag: not bound -!missing-selector! TKTokenKeychainKey::setCanDecrypt: not bound -!missing-selector! TKTokenKeychainKey::setCanPerformKeyExchange: not bound -!missing-selector! TKTokenKeychainKey::setCanSign: not bound -!missing-selector! TKTokenKeychainKey::setKeySizeInBits: not bound -!missing-selector! TKTokenKeychainKey::setKeyType: not bound -!missing-selector! TKTokenKeychainKey::setPublicKeyData: not bound -!missing-selector! TKTokenKeychainKey::setPublicKeyHash: not bound -!missing-selector! TKTokenKeychainKey::setSuitableForLogin: not bound -!missing-selector! TKTokenKeyExchangeParameters::requestedSize not bound -!missing-selector! TKTokenKeyExchangeParameters::sharedInfo not bound -!missing-selector! TKTokenPasswordAuthOperation::password not bound -!missing-selector! TKTokenPasswordAuthOperation::setPassword: not bound -!missing-selector! TKTokenSession::delegate not bound -!missing-selector! TKTokenSession::initWithToken: not bound -!missing-selector! TKTokenSession::setDelegate: not bound -!missing-selector! TKTokenSession::token not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::APDUTemplate not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::PIN not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::PINByteOffset not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::PINFormat not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::setAPDUTemplate: not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::setPIN: not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::setPINByteOffset: not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::setPINFormat: not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::setSmartCard: not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::smartCard not bound -!missing-selector! TKTokenWatcher::addRemovalHandler:forTokenID: not bound -!missing-selector! TKTokenWatcher::init not bound -!missing-selector! TKTokenWatcher::initWithInsertionHandler: not bound -!missing-selector! TKTokenWatcher::setInsertionHandler: not bound -!missing-selector! TKTokenWatcher::tokenIDs not bound -!missing-type! TKBERTLVRecord not bound -!missing-type! TKCompactTLVRecord not bound -!missing-type! TKSimpleTLVRecord not bound -!missing-type! TKSmartCard not bound -!missing-type! TKSmartCardATR not bound -!missing-type! TKSmartCardATRInterfaceGroup not bound -!missing-type! TKSmartCardPINFormat not bound -!missing-type! TKSmartCardSlot not bound -!missing-type! TKSmartCardSlotManager not bound -!missing-type! TKSmartCardToken not bound -!missing-type! TKSmartCardTokenDriver not bound -!missing-type! TKSmartCardTokenSession not bound -!missing-type! TKSmartCardUserInteraction not bound -!missing-type! TKSmartCardUserInteractionForPINOperation not bound -!missing-type! TKSmartCardUserInteractionForSecurePINChange not bound -!missing-type! TKSmartCardUserInteractionForSecurePINVerification not bound -!missing-type! TKTLVRecord not bound -!missing-type! TKToken not bound -!missing-type! TKTokenAuthOperation not bound -!missing-type! TKTokenConfiguration not bound -!missing-type! TKTokenDriver not bound -!missing-type! TKTokenDriverConfiguration not bound -!missing-type! TKTokenKeyAlgorithm not bound -!missing-type! TKTokenKeychainCertificate not bound -!missing-type! TKTokenKeychainContents not bound -!missing-type! TKTokenKeychainItem not bound -!missing-type! TKTokenKeychainKey not bound -!missing-type! TKTokenKeyExchangeParameters not bound -!missing-type! TKTokenPasswordAuthOperation not bound -!missing-type! TKTokenSession not bound -!missing-type! TKTokenSmartCardPINAuthOperation not bound -!missing-type! TKTokenWatcher not bound diff --git a/tests/xtro-sharpie/iOS-ExposureNotification.ignore b/tests/xtro-sharpie/iOS-ExposureNotification.ignore index bb1999028ed0..326df0987277 100644 --- a/tests/xtro-sharpie/iOS-ExposureNotification.ignore +++ b/tests/xtro-sharpie/iOS-ExposureNotification.ignore @@ -1,36 +1,72 @@ -!missing-enum! ENAuthorizationStatus not bound !missing-enum! ENCalibrationConfidence not bound !missing-enum! ENDiagnosisReportType not bound -!missing-enum! ENErrorCode not bound -!missing-enum! ENExposureFlags not bound !missing-enum! ENInfectiousness not bound -!missing-enum! ENStatus not bound !missing-field! ENErrorDomain not bound -!missing-selector! +ENManager::authorizationStatus not bound +!missing-type! ENExposureConfiguration not bound +!missing-type! ENExposureDaySummary not bound +!missing-type! ENExposureDetectionSummary not bound +!missing-type! ENExposureInfo not bound +!missing-type! ENExposureSummaryItem not bound +!missing-type! ENExposureWindow not bound +!missing-type! ENScanInstance not bound +!missing-type! ENTemporaryExposureKey not bound +!missing-type! ENManager not bound +!missing-selector! ENExposureConfiguration::immediateDurationWeight not bound +!missing-selector! ENExposureConfiguration::setImmediateDurationWeight: not bound +!missing-selector! ENExposureConfiguration::nearDurationWeight not bound +!missing-selector! ENExposureConfiguration::setNearDurationWeight: not bound +!missing-selector! ENExposureConfiguration::mediumDurationWeight not bound +!missing-selector! ENExposureConfiguration::setMediumDurationWeight: not bound +!missing-selector! ENExposureConfiguration::otherDurationWeight not bound +!missing-selector! ENExposureConfiguration::setOtherDurationWeight: not bound +!missing-selector! ENExposureConfiguration::infectiousnessForDaysSinceOnsetOfSymptoms not bound +!missing-selector! ENExposureConfiguration::setInfectiousnessForDaysSinceOnsetOfSymptoms: not bound +!missing-selector! ENExposureConfiguration::infectiousnessStandardWeight not bound +!missing-selector! ENExposureConfiguration::setInfectiousnessStandardWeight: not bound +!missing-selector! ENExposureConfiguration::infectiousnessHighWeight not bound +!missing-selector! ENExposureConfiguration::setInfectiousnessHighWeight: not bound +!missing-selector! ENExposureConfiguration::reportTypeConfirmedTestWeight not bound +!missing-selector! ENExposureConfiguration::setReportTypeConfirmedTestWeight: not bound +!missing-selector! ENExposureConfiguration::reportTypeConfirmedClinicalDiagnosisWeight not bound +!missing-selector! ENExposureConfiguration::setReportTypeConfirmedClinicalDiagnosisWeight: not bound +!missing-selector! ENExposureConfiguration::reportTypeSelfReportedWeight not bound +!missing-selector! ENExposureConfiguration::setReportTypeSelfReportedWeight: not bound +!missing-selector! ENExposureConfiguration::reportTypeRecursiveWeight not bound +!missing-selector! ENExposureConfiguration::setReportTypeRecursiveWeight: not bound +!missing-selector! ENExposureConfiguration::reportTypeNoneMap not bound +!missing-selector! ENExposureConfiguration::setReportTypeNoneMap: not bound !missing-selector! ENExposureConfiguration::attenuationDurationThresholds not bound -!missing-selector! ENExposureConfiguration::attenuationLevelValues not bound -!missing-selector! ENExposureConfiguration::attenuationWeight not bound -!missing-selector! ENExposureConfiguration::daysSinceLastExposureLevelValues not bound -!missing-selector! ENExposureConfiguration::daysSinceLastExposureWeight not bound -!missing-selector! ENExposureConfiguration::durationLevelValues not bound -!missing-selector! ENExposureConfiguration::durationWeight not bound -!missing-selector! ENExposureConfiguration::metadata not bound -!missing-selector! ENExposureConfiguration::minimumRiskScore not bound -!missing-selector! ENExposureConfiguration::minimumRiskScoreFullRange not bound !missing-selector! ENExposureConfiguration::setAttenuationDurationThresholds: not bound +!missing-selector! ENExposureConfiguration::daysSinceLastExposureThreshold not bound +!missing-selector! ENExposureConfiguration::setDaysSinceLastExposureThreshold: not bound +!missing-selector! ENExposureConfiguration::minimumRiskScoreFullRange not bound +!missing-selector! ENExposureConfiguration::setMinimumRiskScoreFullRange: not bound +!missing-selector! ENExposureConfiguration::attenuationLevelValues not bound !missing-selector! ENExposureConfiguration::setAttenuationLevelValues: not bound +!missing-selector! ENExposureConfiguration::attenuationWeight not bound !missing-selector! ENExposureConfiguration::setAttenuationWeight: not bound +!missing-selector! ENExposureConfiguration::daysSinceLastExposureLevelValues not bound !missing-selector! ENExposureConfiguration::setDaysSinceLastExposureLevelValues: not bound +!missing-selector! ENExposureConfiguration::daysSinceLastExposureWeight not bound !missing-selector! ENExposureConfiguration::setDaysSinceLastExposureWeight: not bound +!missing-selector! ENExposureConfiguration::durationLevelValues not bound !missing-selector! ENExposureConfiguration::setDurationLevelValues: not bound +!missing-selector! ENExposureConfiguration::durationWeight not bound !missing-selector! ENExposureConfiguration::setDurationWeight: not bound +!missing-selector! ENExposureConfiguration::metadata not bound !missing-selector! ENExposureConfiguration::setMetadata: not bound +!missing-selector! ENExposureConfiguration::minimumRiskScore not bound !missing-selector! ENExposureConfiguration::setMinimumRiskScore: not bound -!missing-selector! ENExposureConfiguration::setMinimumRiskScoreFullRange: not bound -!missing-selector! ENExposureConfiguration::setTransmissionRiskLevelValues: not bound -!missing-selector! ENExposureConfiguration::setTransmissionRiskWeight: not bound !missing-selector! ENExposureConfiguration::transmissionRiskLevelValues not bound +!missing-selector! ENExposureConfiguration::setTransmissionRiskLevelValues: not bound !missing-selector! ENExposureConfiguration::transmissionRiskWeight not bound +!missing-selector! ENExposureConfiguration::setTransmissionRiskWeight: not bound +!missing-selector! ENExposureDaySummary::date not bound +!missing-selector! ENExposureDaySummary::confirmedTestSummary not bound +!missing-selector! ENExposureDaySummary::confirmedClinicalDiagnosisSummary not bound +!missing-selector! ENExposureDaySummary::recursiveSummary not bound +!missing-selector! ENExposureDaySummary::selfReportedSummary not bound +!missing-selector! ENExposureDaySummary::daySummary not bound !missing-selector! ENExposureDetectionSummary::attenuationDurations not bound !missing-selector! ENExposureDetectionSummary::daysSinceLastExposure not bound !missing-selector! ENExposureDetectionSummary::matchedKeyCount not bound @@ -38,37 +74,50 @@ !missing-selector! ENExposureDetectionSummary::maximumRiskScoreFullRange not bound !missing-selector! ENExposureDetectionSummary::metadata not bound !missing-selector! ENExposureDetectionSummary::riskScoreSumFullRange not bound +!missing-selector! ENExposureDetectionSummary::daySummaries not bound !missing-selector! ENExposureInfo::attenuationDurations not bound !missing-selector! ENExposureInfo::attenuationValue not bound !missing-selector! ENExposureInfo::date not bound +!missing-selector! ENExposureInfo::daysSinceOnsetOfSymptoms not bound +!missing-selector! ENExposureInfo::diagnosisReportType not bound !missing-selector! ENExposureInfo::duration not bound !missing-selector! ENExposureInfo::metadata not bound !missing-selector! ENExposureInfo::totalRiskScore not bound !missing-selector! ENExposureInfo::totalRiskScoreFullRange not bound !missing-selector! ENExposureInfo::transmissionRiskLevel not bound +!missing-selector! ENExposureSummaryItem::maximumScore not bound +!missing-selector! ENExposureSummaryItem::scoreSum not bound +!missing-selector! ENExposureSummaryItem::weightedDurationSum not bound +!missing-selector! ENExposureWindow::calibrationConfidence not bound +!missing-selector! ENExposureWindow::date not bound +!missing-selector! ENExposureWindow::diagnosisReportType not bound +!missing-selector! ENExposureWindow::infectiousness not bound +!missing-selector! ENExposureWindow::scanInstances not bound +!missing-selector! ENScanInstance::minimumAttenuation not bound +!missing-selector! ENScanInstance::typicalAttenuation not bound +!missing-selector! ENScanInstance::secondsSinceLastScan not bound +!missing-selector! ENTemporaryExposureKey::keyData not bound +!missing-selector! ENTemporaryExposureKey::setKeyData: not bound +!missing-selector! ENTemporaryExposureKey::rollingPeriod not bound +!missing-selector! ENTemporaryExposureKey::setRollingPeriod: not bound +!missing-selector! ENTemporaryExposureKey::rollingStartNumber not bound +!missing-selector! ENTemporaryExposureKey::setRollingStartNumber: not bound +!missing-selector! ENTemporaryExposureKey::transmissionRiskLevel not bound +!missing-selector! ENTemporaryExposureKey::setTransmissionRiskLevel: not bound !missing-selector! ENManager::activateWithCompletionHandler: not bound +!missing-selector! ENManager::invalidate not bound +!missing-selector! ENManager::getUserTraveledWithCompletionHandler: not bound +!missing-selector! ENManager::setExposureNotificationEnabled:completionHandler: not bound +!missing-selector! ENManager::detectExposuresWithConfiguration:completionHandler: not bound !missing-selector! ENManager::detectExposuresWithConfiguration:diagnosisKeyURLs:completionHandler: not bound -!missing-selector! ENManager::dispatchQueue not bound -!missing-selector! ENManager::exposureNotificationEnabled not bound -!missing-selector! ENManager::exposureNotificationStatus not bound -!missing-selector! ENManager::getDiagnosisKeysWithCompletionHandler: not bound !missing-selector! ENManager::getExposureInfoFromSummary:userExplanation:completionHandler: not bound +!missing-selector! ENManager::getExposureWindowsFromSummary:completionHandler: not bound +!missing-selector! ENManager::getDiagnosisKeysWithCompletionHandler: not bound !missing-selector! ENManager::getTestDiagnosisKeysWithCompletionHandler: not bound -!missing-selector! ENManager::invalidate not bound -!missing-selector! ENManager::invalidationHandler not bound +!missing-selector! ENManager::dispatchQueue not bound !missing-selector! ENManager::setDispatchQueue: not bound -!missing-selector! ENManager::setExposureNotificationEnabled:completionHandler: not bound +!missing-selector! ENManager::exposureNotificationStatus not bound +!missing-selector! ENManager::invalidationHandler not bound !missing-selector! ENManager::setInvalidationHandler: not bound -!missing-selector! ENTemporaryExposureKey::keyData not bound -!missing-selector! ENTemporaryExposureKey::rollingPeriod not bound -!missing-selector! ENTemporaryExposureKey::rollingStartNumber not bound -!missing-selector! ENTemporaryExposureKey::setKeyData: not bound -!missing-selector! ENTemporaryExposureKey::setRollingPeriod: not bound -!missing-selector! ENTemporaryExposureKey::setRollingStartNumber: not bound -!missing-selector! ENTemporaryExposureKey::setTransmissionRiskLevel: not bound -!missing-selector! ENTemporaryExposureKey::transmissionRiskLevel not bound -!missing-type! ENExposureConfiguration not bound -!missing-type! ENExposureDetectionSummary not bound -!missing-type! ENExposureInfo not bound -!missing-type! ENManager not bound -!missing-type! ENTemporaryExposureKey not bound +!missing-selector! +ENManager::authorizationStatus not bound +!missing-selector! ENManager::exposureNotificationEnabled not bound diff --git a/tests/xtro-sharpie/iOS-FileProvider.ignore b/tests/xtro-sharpie/iOS-FileProvider.ignore new file mode 100644 index 000000000000..34bd6d0bc207 --- /dev/null +++ b/tests/xtro-sharpie/iOS-FileProvider.ignore @@ -0,0 +1,2 @@ +## this was _demoted_ to `@optional` when the property was deprecated in iOS 14 SDK +!incorrect-protocol-member! NSFileProviderItem::typeIdentifier is OPTIONAL and should NOT be abstract diff --git a/tests/xtro-sharpie/iOS-GameKit.ignore b/tests/xtro-sharpie/iOS-GameKit.ignore index 76c6f22914c5..ac872b988a23 100644 --- a/tests/xtro-sharpie/iOS-GameKit.ignore +++ b/tests/xtro-sharpie/iOS-GameKit.ignore @@ -8,7 +8,6 @@ !extra-null-allowed! 'System.Void GameKit.GKAchievement::ReportAchievements(GameKit.GKAchievement[],GameKit.GKChallenge[],System.Action`1)' has a extraneous [NullAllowed] on parameter #1 !extra-null-allowed! 'System.Void GameKit.GKFriendRequestComposeViewController::AddRecipientPlayers(GameKit.GKPlayer[])' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.Void GameKit.GKScore::ReportScores(GameKit.GKScore[],GameKit.GKChallenge[],System.Action`1)' has a extraneous [NullAllowed] on parameter #1 -!extra-null-allowed! 'System.Void GameKit.GKTurnBasedEventHandler::set_WeakDelegate(Foundation.NSObject)' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.Void GameKit.GKVoiceChat::set_PlayerStateUpdateHandler(GameKit.GKPlayerStateUpdateHandler)' has a extraneous [NullAllowed] on parameter #0 # Initial result from new rule missing-null-allowed @@ -33,3 +32,6 @@ !missing-null-allowed! 'UIKit.UIViewController GameKit.GKAchievement::ChallengeComposeController(GameKit.GKPlayer[],System.String,GameKit.GKChallengeComposeHandler)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'UIKit.UIViewController GameKit.GKAchievement::ChallengeComposeController(GameKit.GKPlayer[],System.String,GameKit.GKChallengeComposeHandler)' is missing an [NullAllowed] on return type !missing-null-allowed! 'UIKit.UIViewController GameKit.GKScore::ChallengeComposeController(System.String[],System.String,GameKit.GKChallengeComposeHandler)' is missing an [NullAllowed] on return type + +# API removed by Apple, marked as deprecated +!unknown-native-enum! GKAuthenticationType bound diff --git a/tests/xtro-sharpie/iOS-GameKit.todo b/tests/xtro-sharpie/iOS-GameKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-HomeKit.todo b/tests/xtro-sharpie/iOS-HomeKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-ImageCaptureCore.todo b/tests/xtro-sharpie/iOS-ImageCaptureCore.todo deleted file mode 100644 index 9087ebb748e8..000000000000 --- a/tests/xtro-sharpie/iOS-ImageCaptureCore.todo +++ /dev/null @@ -1,139 +0,0 @@ -!missing-enum! ICDeviceType not bound -!missing-enum! ICEXIFOrientationType not bound -!missing-enum! ICLegacyReturnCode not bound -!missing-enum! ICReturnCode not bound -!missing-enum! ICReturnConnectionErrorCode not bound -!missing-enum! ICReturnMetadataErrorCode not bound -!missing-enum! ICReturnThumbnailErrorCode not bound -!missing-field! ICCameraDeviceCanAcceptPTPCommands not bound -!missing-field! ICCameraDeviceCanDeleteAllFiles not bound -!missing-field! ICCameraDeviceCanDeleteOneFile not bound -!missing-field! ICCameraDeviceCanReceiveFile not bound -!missing-field! ICCameraDeviceCanSyncClock not bound -!missing-field! ICCameraDeviceCanTakePicture not bound -!missing-field! ICCameraDeviceCanTakePictureUsingShutterReleaseOnCamera not bound -!missing-field! ICDeleteAfterSuccessfulDownload not bound -!missing-field! ICDeleteCanceled not bound -!missing-field! ICDeleteErrorCanceled not bound -!missing-field! ICDeleteErrorDeviceMissing not bound -!missing-field! ICDeleteErrorFileMissing not bound -!missing-field! ICDeleteErrorReadOnly not bound -!missing-field! ICDeleteFailed not bound -!missing-field! ICDeleteSuccessful not bound -!missing-field! ICDeviceCanEjectOrDisconnect not bound -!missing-field! ICDownloadsDirectoryURL not bound -!missing-field! ICDownloadSidecarFiles not bound -!missing-field! ICEnumerationChronologicalOrder not bound -!missing-field! ICErrorDomain not bound -!missing-field! ICImageSourceShouldCache not bound -!missing-field! ICImageSourceThumbnailMaxPixelSize not bound -!missing-field! ICOverwrite not bound -!missing-field! ICSaveAsFilename not bound -!missing-field! ICSavedAncillaryFiles not bound -!missing-field! ICSavedFilename not bound -!missing-field! ICStatusNotificationKey not bound -!missing-field! ICTransportTypeExFAT not bound -!missing-field! ICTransportTypeMassStorage not bound -!missing-field! ICTransportTypeTCPIP not bound -!missing-field! ICTransportTypeUSB not bound -!missing-protocol! ICCameraDeviceDelegate not bound -!missing-protocol! ICCameraDeviceDownloadDelegate not bound -!missing-protocol! ICDeviceBrowserDelegate not bound -!missing-protocol! ICDeviceDelegate not bound -!missing-selector! ICCameraDevice::batteryLevel not bound -!missing-selector! ICCameraDevice::batteryLevelAvailable not bound -!missing-selector! ICCameraDevice::contentCatalogPercentCompleted not bound -!missing-selector! ICCameraDevice::contents not bound -!missing-selector! ICCameraDevice::filesOfType: not bound -!missing-selector! ICCameraDevice::iCloudPhotosEnabled not bound -!missing-selector! ICCameraDevice::isAccessRestrictedAppleDevice not bound -!missing-selector! ICCameraDevice::isEjectable not bound -!missing-selector! ICCameraDevice::isLocked not bound -!missing-selector! ICCameraDevice::mediaFiles not bound -!missing-selector! ICCameraDevice::requestDeleteFiles: not bound -!missing-selector! ICCameraDevice::requestDeleteFiles:deleteFailed:completion: not bound -!missing-selector! ICCameraDevice::requestDownloadFile:options:downloadDelegate:didDownloadSelector:contextInfo: not bound -!missing-selector! ICCameraDevice::tetheredCaptureEnabled not bound -!missing-selector! ICCameraDevice::timeOffset not bound -!missing-selector! ICCameraFile::burstFavorite not bound -!missing-selector! ICCameraFile::burstPicked not bound -!missing-selector! ICCameraFile::burstUUID not bound -!missing-selector! ICCameraFile::createdFilename not bound -!missing-selector! ICCameraFile::duration not bound -!missing-selector! ICCameraFile::exifCreationDate not bound -!missing-selector! ICCameraFile::exifModificationDate not bound -!missing-selector! ICCameraFile::fileCreationDate not bound -!missing-selector! ICCameraFile::fileModificationDate not bound -!missing-selector! ICCameraFile::fileSize not bound -!missing-selector! ICCameraFile::firstPicked not bound -!missing-selector! ICCameraFile::gpsString not bound -!missing-selector! ICCameraFile::groupUUID not bound -!missing-selector! ICCameraFile::height not bound -!missing-selector! ICCameraFile::highFramerate not bound -!missing-selector! ICCameraFile::orientation not bound -!missing-selector! ICCameraFile::originalFilename not bound -!missing-selector! ICCameraFile::originatingAssetID not bound -!missing-selector! ICCameraFile::pairedRawImage not bound -!missing-selector! ICCameraFile::relatedUUID not bound -!missing-selector! ICCameraFile::requestDownloadWithOptions:completion: not bound -!missing-selector! ICCameraFile::requestMetadataDictionaryWithOptions:completion: not bound -!missing-selector! ICCameraFile::requestThumbnailDataWithOptions:completion: not bound -!missing-selector! ICCameraFile::setOrientation: not bound -!missing-selector! ICCameraFile::sidecarFiles not bound -!missing-selector! ICCameraFile::timeLapse not bound -!missing-selector! ICCameraFile::width not bound -!missing-selector! ICCameraFolder::contents not bound -!missing-selector! ICCameraItem::creationDate not bound -!missing-selector! ICCameraItem::device not bound -!missing-selector! ICCameraItem::flushMetadataCache not bound -!missing-selector! ICCameraItem::flushThumbnailCache not bound -!missing-selector! ICCameraItem::isInTemporaryStore not bound -!missing-selector! ICCameraItem::isLocked not bound -!missing-selector! ICCameraItem::isRaw not bound -!missing-selector! ICCameraItem::largeThumbnailIfAvailable not bound -!missing-selector! ICCameraItem::metadata not bound -!missing-selector! ICCameraItem::metadataIfAvailable not bound -!missing-selector! ICCameraItem::modificationDate not bound -!missing-selector! ICCameraItem::name not bound -!missing-selector! ICCameraItem::parentFolder not bound -!missing-selector! ICCameraItem::ptpObjectHandle not bound -!missing-selector! ICCameraItem::requestMetadata not bound -!missing-selector! ICCameraItem::requestThumbnail not bound -!missing-selector! ICCameraItem::thumbnail not bound -!missing-selector! ICCameraItem::thumbnailIfAvailable not bound -!missing-selector! ICCameraItem::userData not bound -!missing-selector! ICCameraItem::UTI not bound -!missing-selector! ICCameraItem::wasAddedAfterContentCatalogCompleted not bound -!missing-selector! ICDevice::capabilities not bound -!missing-selector! ICDevice::delegate not bound -!missing-selector! ICDevice::hasOpenSession not bound -!missing-selector! ICDevice::icon not bound -!missing-selector! ICDevice::name not bound -!missing-selector! ICDevice::productKind not bound -!missing-selector! ICDevice::requestCloseSession not bound -!missing-selector! ICDevice::requestCloseSessionWithOptions:completion: not bound -!missing-selector! ICDevice::requestEject not bound -!missing-selector! ICDevice::requestEjectWithCompletion: not bound -!missing-selector! ICDevice::requestOpenSession not bound -!missing-selector! ICDevice::requestOpenSessionWithOptions:completion: not bound -!missing-selector! ICDevice::setDelegate: not bound -!missing-selector! ICDevice::transportType not bound -!missing-selector! ICDevice::type not bound -!missing-selector! ICDevice::usbLocationID not bound -!missing-selector! ICDevice::usbProductID not bound -!missing-selector! ICDevice::usbVendorID not bound -!missing-selector! ICDevice::userData not bound -!missing-selector! ICDevice::UUIDString not bound -!missing-selector! ICDeviceBrowser::delegate not bound -!missing-selector! ICDeviceBrowser::devices not bound -!missing-selector! ICDeviceBrowser::init not bound -!missing-selector! ICDeviceBrowser::isBrowsing not bound -!missing-selector! ICDeviceBrowser::setDelegate: not bound -!missing-selector! ICDeviceBrowser::start not bound -!missing-selector! ICDeviceBrowser::stop not bound -!missing-type! ICCameraDevice not bound -!missing-type! ICCameraFile not bound -!missing-type! ICCameraFolder not bound -!missing-type! ICCameraItem not bound -!missing-type! ICDevice not bound -!missing-type! ICDeviceBrowser not bound diff --git a/tests/xtro-sharpie/iOS-Intents.todo b/tests/xtro-sharpie/iOS-Intents.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-MediaPlayer.ignore b/tests/xtro-sharpie/iOS-MediaPlayer.ignore index df3252eac012..d6582bb8424c 100644 --- a/tests/xtro-sharpie/iOS-MediaPlayer.ignore +++ b/tests/xtro-sharpie/iOS-MediaPlayer.ignore @@ -7,53 +7,8 @@ # so current code works better (before 7.0) but can't be overridden (likely a good thing) !missing-selector! MPMediaEntity::persistentID not bound - -## unsorted - -!missing-selector! MPMediaItem::albumArtist not bound -!missing-selector! MPMediaItem::albumArtistPersistentID not bound -!missing-selector! MPMediaItem::albumPersistentID not bound -!missing-selector! MPMediaItem::albumTitle not bound -!missing-selector! MPMediaItem::albumTrackCount not bound -!missing-selector! MPMediaItem::albumTrackNumber not bound -!missing-selector! MPMediaItem::artist not bound -!missing-selector! MPMediaItem::artistPersistentID not bound -!missing-selector! MPMediaItem::artwork not bound -!missing-selector! MPMediaItem::assetURL not bound -!missing-selector! MPMediaItem::beatsPerMinute not bound -!missing-selector! MPMediaItem::bookmarkTime not bound -!missing-selector! MPMediaItem::comments not bound -!missing-selector! MPMediaItem::composer not bound -!missing-selector! MPMediaItem::composerPersistentID not bound -!missing-selector! MPMediaItem::dateAdded not bound -!missing-selector! MPMediaItem::discCount not bound -!missing-selector! MPMediaItem::discNumber not bound -!missing-selector! MPMediaItem::genre not bound -!missing-selector! MPMediaItem::genrePersistentID not bound -!missing-selector! MPMediaItem::hasProtectedAsset not bound -!missing-selector! MPMediaItem::isCloudItem not bound -!missing-selector! MPMediaItem::isCompilation not bound -!missing-selector! MPMediaItem::isExplicitItem not bound -!missing-selector! MPMediaItem::lastPlayedDate not bound -!missing-selector! MPMediaItem::lyrics not bound -!missing-selector! MPMediaItem::mediaType not bound -!missing-selector! MPMediaItem::persistentID not bound -!missing-selector! MPMediaItem::playbackDuration not bound -!missing-selector! MPMediaItem::playbackStoreID not bound -!missing-selector! MPMediaItem::playCount not bound -!missing-selector! MPMediaItem::podcastPersistentID not bound -!missing-selector! MPMediaItem::podcastTitle not bound -!missing-selector! MPMediaItem::rating not bound -!missing-selector! MPMediaItem::releaseDate not bound -!missing-selector! MPMediaItem::skipCount not bound -!missing-selector! MPMediaItem::title not bound -!missing-selector! MPMediaItem::userGrouping not bound - # Initial result from new rule missing-null-allowed -!missing-null-allowed! 'Foundation.NSObject MediaPlayer.MPMediaEntity::GetObject(Foundation.NSObject)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject MediaPlayer.MPMediaEntity::ValueForProperty(Foundation.NSString)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject MediaPlayer.MPMediaPropertyPredicate::get_Value()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString MediaPlayer.NSUserActivity_MediaPlayerAdditions::GetExternalMediaContentIdentifier(Foundation.NSUserActivity)' is missing an [NullAllowed] on return type !missing-null-allowed! 'MediaPlayer.MPContentItem MediaPlayer.MPPlayableContentDataSource::ContentItem(Foundation.NSIndexPath)' is missing an [NullAllowed] on return type !missing-null-allowed! 'MediaPlayer.MPMediaItem MediaPlayer.MPMediaItemCollection::get_RepresentativeItem()' is missing an [NullAllowed] on return type !missing-null-allowed! 'MediaPlayer.MPMediaItem[] MediaPlayer.MPMediaPlaylist::get_SeedItems()' is missing an [NullAllowed] on return type @@ -62,10 +17,3 @@ !missing-null-allowed! 'MediaPlayer.MPMediaQuerySection[] MediaPlayer.MPMediaQuery::get_CollectionSections()' is missing an [NullAllowed] on return type !missing-null-allowed! 'MediaPlayer.MPMediaQuerySection[] MediaPlayer.MPMediaQuery::get_ItemSections()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String MediaPlayer.MPMediaPlaylist::get_Name()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.Void MediaPlayer.MPContentItem::set_Artwork(MediaPlayer.MPMediaItemArtwork)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void MediaPlayer.MPContentItem::set_Subtitle(System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void MediaPlayer.MPContentItem::set_Title(System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'UIKit.UIImage MediaPlayer.MPVolumeView::GetMaximumVolumeSliderImage(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'UIKit.UIImage MediaPlayer.MPVolumeView::GetMinimumVolumeSliderImage(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'UIKit.UIImage MediaPlayer.MPVolumeView::GetRouteButtonImage(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'UIKit.UIImage MediaPlayer.MPVolumeView::GetVolumeThumbImage(UIKit.UIControlState)' is missing an [NullAllowed] on return type diff --git a/tests/xtro-sharpie/iOS-MediaSetup.ignore b/tests/xtro-sharpie/iOS-MediaSetup.ignore new file mode 100644 index 000000000000..8936278ff27d --- /dev/null +++ b/tests/xtro-sharpie/iOS-MediaSetup.ignore @@ -0,0 +1,2 @@ +!missing-field! MediaSetupVersionNumber not bound +!missing-field! MediaSetupVersionString not bound diff --git a/tests/xtro-sharpie/iOS-Metal.ignore b/tests/xtro-sharpie/iOS-Metal.ignore index 61b93af068d9..5320b0cdd1f6 100644 --- a/tests/xtro-sharpie/iOS-Metal.ignore +++ b/tests/xtro-sharpie/iOS-Metal.ignore @@ -1,7 +1,3 @@ -## only on macOS (but removing would be a breaking change) -!unknown-native-enum! MTLSamplerBorderColor bound - - ## unsorted !incorrect-protocol-member! MTLComputeCommandEncoder::setImageblockWidth:height: is REQUIRED and should be abstract @@ -86,10 +82,6 @@ !missing-selector! MTLHeapDescriptor::setType: not bound !missing-selector! MTLHeapDescriptor::type not bound -# Fails instrospection issue: https://github.com/xamarin/maccore/issues/1979 -!missing-selector! MTLIndirectCommandBufferDescriptor::maxKernelBufferBindCount not bound -!missing-selector! MTLIndirectCommandBufferDescriptor::setMaxKernelBufferBindCount: not bound - # Selectors reported as not working by instrospection: https://github.com/xamarin/maccore/issues/1976 !missing-selector! MTLRasterizationRateLayerDescriptor::horizontal not bound !missing-selector! MTLRasterizationRateLayerDescriptor::horizontalSampleStorage not bound @@ -128,5 +120,55 @@ !missing-null-allowed! 'System.Void Metal.MTLRenderPipelineDescriptor::set_Label(System.String)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void Metal.MTLRenderPipelineDescriptor::set_VertexDescriptor(Metal.MTLVertexDescriptor)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void Metal.MTLSamplerDescriptor::set_Label(System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void Metal.MTLTileRenderPipelineDescriptor::set_Label(System.String)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void Metal.MTLVertexBufferLayoutDescriptorArray::SetObject(Metal.MTLVertexBufferLayoutDescriptor,System.nuint)' is missing an [NullAllowed] on parameter #0 + +# new methods added to a protocol, they will be abstract in XAMCORE_4 +!incorrect-protocol-member! MTLArgumentEncoder::setAccelerationStructure:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setIntersectionFunctionTable:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setIntersectionFunctionTables:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setVisibleFunctionTable:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setVisibleFunctionTables:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::setAccelerationStructure:atBufferIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::setIntersectionFunctionTable:atBufferIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::setIntersectionFunctionTables:withBufferRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::setVisibleFunctionTable:atBufferIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::setVisibleFunctionTables:withBufferRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::accelerationStructureSizesWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::counterSets is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newAccelerationStructureWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newAccelerationStructureWithSize: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newBinaryArchiveWithDescriptor:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newCounterSampleBufferWithDescriptor:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newDynamicLibrary:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newDynamicLibraryWithURL:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::sampleTimestamps:gpuTimestamp: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsCounterSampling: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsDynamicLibraries is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsFunctionPointers is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsPullModelInterpolation is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsRaytracing is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::installName is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::newFunctionWithDescriptor:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::newFunctionWithDescriptor:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::newIntersectionFunctionWithDescriptor:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::newIntersectionFunctionWithDescriptor:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::type is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBlitCommandEncoder::resolveCounters:inRange:destinationBuffer:destinationOffset: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBlitCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::accelerationStructureCommandEncoder is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::blitCommandEncoderWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::computeCommandEncoderWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::errorOptions is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::logs is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::resourceStateCommandEncoderWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandQueue::commandBufferWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::functionHandleWithFunction: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::newComputePipelineStateWithAdditionalBinaryFunctions:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::newIntersectionFunctionTableWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::newVisibleFunctionTableWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLFunction::options is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLIndirectComputeCommand::setImageblockWidth:height: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::areBarycentricCoordsSupported is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsShaderBarycentricCoordinates is REQUIRED and should be abstract diff --git a/tests/xtro-sharpie/iOS-MetalPerformanceShaders.todo b/tests/xtro-sharpie/iOS-MetalPerformanceShaders.todo index 64d1f1e46ea9..78c7e8a6b203 100644 --- a/tests/xtro-sharpie/iOS-MetalPerformanceShaders.todo +++ b/tests/xtro-sharpie/iOS-MetalPerformanceShaders.todo @@ -8,6 +8,7 @@ !missing-protocol-conformance! MPSCNNBatchNormalizationNode should conform to MPSNNTrainableNode !missing-protocol-conformance! MPSCNNConvolutionNode should conform to MPSNNTrainableNode !missing-protocol-conformance! MPSCNNInstanceNormalizationNode should conform to MPSNNTrainableNode +!missing-protocol-member! MPSCNNConvolutionDataSource::kernelWeightsDataType not found !missing-protocol-member! MPSCNNConvolutionDataSource::weightsLayout not found !missing-protocol-member! MPSCNNInstanceNormalizationDataSource::load not found !missing-protocol-member! MPSCNNInstanceNormalizationDataSource::purge not found @@ -16,6 +17,8 @@ !missing-selector! +MPSCNNGroupNormalizationGradientNode::nodeWithSourceGradient:sourceImage:gradientState: not bound !missing-selector! +MPSCNNGroupNormalizationNode::nodeWithSource:dataSource: not bound !missing-selector! +MPSCNNNeuronGeLUNode::nodeWithSource: not bound +!missing-selector! +MPSMatrixRandomDistributionDescriptor::normalDistributionDescriptorWithMean:standardDeviation: not bound +!missing-selector! +MPSMatrixRandomDistributionDescriptor::normalDistributionDescriptorWithMean:standardDeviation:minimum:maximum: not bound !missing-selector! +MPSNDArrayDescriptor::descriptorWithDataType:dimensionSizes: not bound !missing-selector! +MPSNNGramMatrixCalculationGradientNode::nodeWithSourceGradient:sourceImage:gradientState: not bound !missing-selector! +MPSNNGramMatrixCalculationGradientNode::nodeWithSourceGradient:sourceImage:gradientState:alpha: not bound @@ -81,6 +84,9 @@ !missing-selector! MPSCNNInstanceNormalizationNode::trainingStyle not bound !missing-selector! MPSCNNKernel::batchEncodingStorageSizeForSourceImage:sourceStates:destinationImage: not bound !missing-selector! MPSCNNKernel::encodingStorageSizeForSourceImage:sourceStates:destinationImage: not bound +!missing-selector! MPSCNNLoss::reduceAcrossBatch not bound +!missing-selector! MPSCNNLossDescriptor::reduceAcrossBatch not bound +!missing-selector! MPSCNNLossDescriptor::setReduceAcrossBatch: not bound !missing-selector! MPSCNNLossLabels::initWithDevice:lossImageSize:labelsImage:weightsImage: not bound !missing-selector! MPSCNNMultiaryKernel::appendBatchBarrier not bound !missing-selector! MPSCNNMultiaryKernel::clipRect not bound @@ -129,6 +135,42 @@ !missing-selector! MPSCNNMultiaryKernel::temporaryResultStateBatchForCommandBuffer:sourceImages:sourceStates:destinationImage: not bound !missing-selector! MPSCNNMultiaryKernel::temporaryResultStateForCommandBuffer:sourceImages:sourceStates:destinationImage: not bound !missing-selector! MPSCNNNeuronGeLUNode::initWithSource: not bound +!missing-selector! MPSCNNYOLOLoss::reduceAcrossBatch not bound +!missing-selector! MPSCNNYOLOLossDescriptor::reduceAcrossBatch not bound +!missing-selector! MPSCNNYOLOLossDescriptor::setReduceAcrossBatch: not bound +!missing-selector! MPSImageCanny::colorTransform not bound +!missing-selector! MPSImageCanny::highThreshold not bound +!missing-selector! MPSImageCanny::initWithCoder:device: not bound +!missing-selector! MPSImageCanny::initWithDevice: not bound +!missing-selector! MPSImageCanny::initWithDevice:linearToGrayScaleTransform:sigma: not bound +!missing-selector! MPSImageCanny::lowThreshold not bound +!missing-selector! MPSImageCanny::setHighThreshold: not bound +!missing-selector! MPSImageCanny::setLowThreshold: not bound +!missing-selector! MPSImageCanny::setUseFastMode: not bound +!missing-selector! MPSImageCanny::sigma not bound +!missing-selector! MPSImageCanny::useFastMode not bound +!missing-selector! MPSImageEDLines::clipRectSource not bound +!missing-selector! MPSImageEDLines::detailRatio not bound +!missing-selector! MPSImageEDLines::encodeToCommandBuffer:sourceTexture:destinationTexture:endpointBuffer:endpointOffset: not bound +!missing-selector! MPSImageEDLines::gaussianSigma not bound +!missing-selector! MPSImageEDLines::gradientThreshold not bound +!missing-selector! MPSImageEDLines::initWithCoder:device: not bound +!missing-selector! MPSImageEDLines::initWithDevice:gaussianSigma:minLineLength:maxLines:detailRatio:gradientThreshold:lineErrorThreshold:mergeLocalityThreshold: not bound +!missing-selector! MPSImageEDLines::lineErrorThreshold not bound +!missing-selector! MPSImageEDLines::maxLines not bound +!missing-selector! MPSImageEDLines::mergeLocalityThreshold not bound +!missing-selector! MPSImageEDLines::minLineLength not bound +!missing-selector! MPSImageEDLines::setClipRectSource: not bound +!missing-selector! MPSImageEDLines::setDetailRatio: not bound +!missing-selector! MPSImageEDLines::setGradientThreshold: not bound +!missing-selector! MPSImageEDLines::setLineErrorThreshold: not bound +!missing-selector! MPSImageEDLines::setMaxLines: not bound +!missing-selector! MPSImageEDLines::setMergeLocalityThreshold: not bound +!missing-selector! MPSImageEDLines::setMinLineLength: not bound +!missing-selector! MPSImageEuclideanDistanceTransform::searchLimitRadius not bound +!missing-selector! MPSImageEuclideanDistanceTransform::setSearchLimitRadius: not bound +!missing-selector! MPSImageGuidedFilter::encodeReconstructionToCommandBuffer:guidanceTexture:coefficientsTextureA:coefficientsTextureB:destinationTexture: not bound +!missing-selector! MPSImageGuidedFilter::encodeRegressionToCommandBuffer:sourceTexture:guidanceTexture:weightsTexture:destinationCoefficientsTextureA:destinationCoefficientsTextureB: not bound !missing-selector! MPSMatrixSum::resultMatrixOrigin not bound !missing-selector! MPSMatrixSum::setResultMatrixOrigin: not bound !missing-selector! MPSNDArrayBinaryKernel::encodeToCommandBuffer:primarySourceArray:secondarySourceArray: not bound @@ -211,12 +253,14 @@ !missing-selector! MPSNNForwardLoss::labelSmoothing not bound !missing-selector! MPSNNForwardLoss::lossType not bound !missing-selector! MPSNNForwardLoss::numberOfClasses not bound +!missing-selector! MPSNNForwardLoss::reduceAcrossBatch not bound !missing-selector! MPSNNForwardLoss::reductionType not bound !missing-selector! MPSNNForwardLoss::setDelta: not bound !missing-selector! MPSNNForwardLoss::setEpsilon: not bound !missing-selector! MPSNNForwardLoss::setLabelSmoothing: not bound !missing-selector! MPSNNForwardLoss::setWeight: not bound !missing-selector! MPSNNForwardLoss::weight not bound +!missing-selector! MPSNNForwardLossNode::reduceAcrossBatch not bound !missing-selector! MPSNNGramMatrixCalculation::alpha not bound !missing-selector! MPSNNGramMatrixCalculation::initWithCoder:device: not bound !missing-selector! MPSNNGramMatrixCalculation::initWithDevice: not bound @@ -261,6 +305,7 @@ !missing-selector! MPSNNLossGradient::labelSmoothing not bound !missing-selector! MPSNNLossGradient::lossType not bound !missing-selector! MPSNNLossGradient::numberOfClasses not bound +!missing-selector! MPSNNLossGradient::reduceAcrossBatch not bound !missing-selector! MPSNNLossGradient::reductionType not bound !missing-selector! MPSNNLossGradient::setComputeLabelGradients: not bound !missing-selector! MPSNNLossGradient::setDelta: not bound @@ -268,6 +313,7 @@ !missing-selector! MPSNNLossGradient::setLabelSmoothing: not bound !missing-selector! MPSNNLossGradient::setWeight: not bound !missing-selector! MPSNNLossGradient::weight not bound +!missing-selector! MPSNNLossGradientNode::reduceAcrossBatch not bound !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:batchNormalizationGradientState:batchNormalizationSourceState:inputMomentumVectors:inputVelocityVectors:maximumVelocityVectors:resultState: not bound !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:batchNormalizationState:inputMomentumVectors:inputVelocityVectors:maximumVelocityVectors:resultState: not bound !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:convolutionGradientState:convolutionSourceState:inputMomentumVectors:inputVelocityVectors:maximumVelocityVectors:resultState: not bound @@ -276,6 +322,8 @@ !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:inputGradientVector:inputValuesVector:inputMomentumVector:inputVelocityVector:maximumVelocityVector:resultValuesVector: not bound !missing-selector! MPSNNOptimizerRMSProp::encodeToCommandBuffer:inputGradientMatrix:inputValuesMatrix:inputSumOfSquaresMatrix:resultValuesMatrix: not bound !missing-selector! MPSNNOptimizerStochasticGradientDescent::encodeToCommandBuffer:inputGradientMatrix:inputValuesMatrix:inputMomentumMatrix:resultValuesMatrix: not bound +!missing-selector! MPSNNOptimizerStochasticGradientDescent::initWithDevice:momentumScale:useNesterovMomentum:optimizerDescriptor: not bound +!missing-selector! MPSNNOptimizerStochasticGradientDescent::useNesterovMomentum not bound !missing-selector! MPSNNReduceColumnMax::initWithCoder:device: not bound !missing-selector! MPSNNReduceColumnMean::initWithCoder:device: not bound !missing-selector! MPSNNReduceColumnMin::initWithCoder:device: not bound @@ -292,6 +340,10 @@ !missing-selector! MPSNNReduceRowMean::initWithCoder:device: not bound !missing-selector! MPSNNReduceRowMin::initWithCoder:device: not bound !missing-selector! MPSNNReduceRowSum::initWithCoder:device: not bound +!missing-selector! MPSNNReshape::encodeBatchToCommandBuffer:sourceImages:destinationStates:destinationStateIsTemporary:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound +!missing-selector! MPSNNReshape::encodeBatchToCommandBuffer:sourceImages:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound +!missing-selector! MPSNNReshape::encodeToCommandBuffer:sourceImage:destinationState:destinationStateIsTemporary:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound +!missing-selector! MPSNNReshape::encodeToCommandBuffer:sourceImage:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound !missing-selector! MPSPolygonAccelerationStructure::indexBuffer not bound !missing-selector! MPSPolygonAccelerationStructure::indexBufferOffset not bound !missing-selector! MPSPolygonAccelerationStructure::indexType not bound @@ -417,6 +469,8 @@ !missing-type! MPSCNNGroupNormalizationNode not bound !missing-type! MPSCNNMultiaryKernel not bound !missing-type! MPSCNNNeuronGeLUNode not bound +!missing-type! MPSImageCanny not bound +!missing-type! MPSImageEDLines not bound !missing-type! MPSNDArrayBinaryKernel not bound !missing-type! MPSNDArrayBinaryPrimaryGradientKernel not bound !missing-type! MPSNDArrayBinarySecondaryGradientKernel not bound @@ -452,8 +506,3 @@ !missing-type! MPSTemporalAA not bound !unknown-simd-type-mapping! The Simd type vector_uchar16 does not have a mapping to a managed type. Please add one in SimdCheck.cs !wrong-base-type! MPSTriangleAccelerationStructure expected MPSPolygonAccelerationStructure actual MPSAccelerationStructure - -## Xcode 11.4 b1 -!missing-selector! MPSImageGuidedFilter::encodeReconstructionToCommandBuffer:guidanceTexture:coefficientsTextureA:coefficientsTextureB:destinationTexture: not bound -!missing-selector! MPSImageGuidedFilter::encodeRegressionToCommandBuffer:sourceTexture:guidanceTexture:weightsTexture:destinationCoefficientsTextureA:destinationCoefficientsTextureB: not bound - diff --git a/tests/xtro-sharpie/iOS-MetalPerformanceShadersGraph.todo b/tests/xtro-sharpie/iOS-MetalPerformanceShadersGraph.todo new file mode 100644 index 000000000000..68f4c392809b --- /dev/null +++ b/tests/xtro-sharpie/iOS-MetalPerformanceShadersGraph.todo @@ -0,0 +1,276 @@ +!missing-enum! MPSGraphDeviceType not bound +!missing-enum! MPSGraphLossReductionType not bound +!missing-enum! MPSGraphOptions not bound +!missing-enum! MPSGraphPaddingMode not bound +!missing-enum! MPSGraphPaddingStyle not bound +!missing-enum! MPSGraphResizeMode not bound +!missing-enum! MPSGraphTensorNamedDataLayout not bound +!missing-selector! +MPSGraphConvolution2DOpDescriptor::descriptorWithStrideInX:strideInY:dilationRateInX:dilationRateInY:groups:paddingLeft:paddingRight:paddingTop:paddingBottom:paddingStyle:dataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphConvolution2DOpDescriptor::descriptorWithStrideInX:strideInY:dilationRateInX:dilationRateInY:groups:paddingStyle:dataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphDepthwiseConvolution2DOpDescriptor::descriptorWithDataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphDepthwiseConvolution2DOpDescriptor::descriptorWithStrideInX:strideInY:dilationRateInX:dilationRateInY:paddingLeft:paddingRight:paddingTop:paddingBottom:paddingStyle:dataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphDevice::deviceWithMTLDevice: not bound +!missing-selector! +MPSGraphPooling2DOpDescriptor::descriptorWithKernelWidth:kernelHeight:strideInX:strideInY:dilationRateInX:dilationRateInY:paddingLeft:paddingRight:paddingTop:paddingBottom:paddingStyle:dataLayout: not bound +!missing-selector! +MPSGraphPooling2DOpDescriptor::descriptorWithKernelWidth:kernelHeight:strideInX:strideInY:paddingStyle:dataLayout: not bound +!missing-selector! MPSGraph::absoluteWithTensor:name: not bound +!missing-selector! MPSGraph::acoshWithTensor:name: not bound +!missing-selector! MPSGraph::acosWithTensor:name: not bound +!missing-selector! MPSGraph::additionWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::applyStochasticGradientDescentWithLearningRateTensor:variable:gradientTensor:name: not bound +!missing-selector! MPSGraph::asinhWithTensor:name: not bound +!missing-selector! MPSGraph::asinWithTensor:name: not bound +!missing-selector! MPSGraph::assignVariable:withValueOfTensor:name: not bound +!missing-selector! MPSGraph::atan2WithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::atanhWithTensor:name: not bound +!missing-selector! MPSGraph::atanWithTensor:name: not bound +!missing-selector! MPSGraph::avgPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::avgPooling2DWithSourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::ceilWithTensor:name: not bound +!missing-selector! MPSGraph::clampWithTensor:minValueTensor:maxValueTensor:name: not bound +!missing-selector! MPSGraph::concatTensor:withTensor:dimension:name: not bound +!missing-selector! MPSGraph::concatTensors:dimension:name: not bound +!missing-selector! MPSGraph::constantWithData:shape:dataType: not bound +!missing-selector! MPSGraph::constantWithScalar:shape:dataType: not bound +!missing-selector! MPSGraph::convolution2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolution2DWeightsGradientWithIncomingGradientTensor:sourceTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolution2DWithSourceTensor:weightsTensor:descriptor:name: not bound +!missing-selector! MPSGraph::convolutionTranspose2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolutionTranspose2DWeightsGradientWithIncomingGradientTensor:sourceTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolutionTranspose2DWithSourceTensor:weightsTensor:outputShape:descriptor:name: not bound +!missing-selector! MPSGraph::coshWithTensor:name: not bound +!missing-selector! MPSGraph::cosWithTensor:name: not bound +!missing-selector! MPSGraph::depthwiseConvolution2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:descriptor:name: not bound +!missing-selector! MPSGraph::depthwiseConvolution2DWeightsGradientWithIncomingGradientTensor:sourceTensor:outputShape:descriptor:name: not bound +!missing-selector! MPSGraph::depthwiseConvolution2DWithSourceTensor:weightsTensor:descriptor:name: not bound +!missing-selector! MPSGraph::divisionNoNaNWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::divisionWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::dropoutTensor:rate:name: not bound +!missing-selector! MPSGraph::dropoutTensor:rateTensor:name: not bound +!missing-selector! MPSGraph::encodeToCommandBuffer:feeds:targetOperations:resultsDictionary:executionDescriptor: not bound +!missing-selector! MPSGraph::encodeToCommandBuffer:feeds:targetTensors:targetOperations:executionDescriptor: not bound +!missing-selector! MPSGraph::equalWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::erfWithTensor:name: not bound +!missing-selector! MPSGraph::exponentBase10WithTensor:name: not bound +!missing-selector! MPSGraph::exponentBase2WithTensor:name: not bound +!missing-selector! MPSGraph::exponentWithTensor:name: not bound +!missing-selector! MPSGraph::floorModuloWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::floorWithTensor:name: not bound +!missing-selector! MPSGraph::gatherNDWithUpdatesTensor:indicesTensor:batchDimensions:name: not bound +!missing-selector! MPSGraph::gatherWithUpdatesTensor:indicesTensor:axis:batchDimensions:name: not bound +!missing-selector! MPSGraph::gradientForPrimaryTensor:withTensors:name: not bound +!missing-selector! MPSGraph::greaterThanOrEqualToWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::greaterThanWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::identityWithTensor:name: not bound +!missing-selector! MPSGraph::init not bound +!missing-selector! MPSGraph::isFiniteWithTensor:name: not bound +!missing-selector! MPSGraph::isInfiniteWithTensor:name: not bound +!missing-selector! MPSGraph::isNaNWithTensor:name: not bound +!missing-selector! MPSGraph::lessThanOrEqualToWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::lessThanWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logarithmBase10WithTensor:name: not bound +!missing-selector! MPSGraph::logarithmBase2WithTensor:name: not bound +!missing-selector! MPSGraph::logarithmWithTensor:name: not bound +!missing-selector! MPSGraph::logicalANDWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalNANDWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalNORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalXNORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalXORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::matrixMultiplicationWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::maximumWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::maxPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::maxPooling2DWithSourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::meanOfTensor:axes:name: not bound +!missing-selector! MPSGraph::minimumWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::moduloWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::multiplicationWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::negativeWithTensor:name: not bound +!missing-selector! MPSGraph::normalizationBetaGradientWithIncomingGradientTensor:sourceTensor:reductionAxes:name: not bound +!missing-selector! MPSGraph::normalizationGammaGradientWithIncomingGradientTensor:sourceTensor:meanTensor:varianceTensor:reductionAxes:epsilon:name: not bound +!missing-selector! MPSGraph::normalizationGradientWithIncomingGradientTensor:sourceTensor:meanTensor:varianceTensor:gammaTensor:gammaGradientTensor:betaGradientTensor:reductionAxes:epsilon:name: not bound +!missing-selector! MPSGraph::normalizationWithTensor:meanTensor:varianceTensor:gammaTensor:betaTensor:epsilon:name: not bound +!missing-selector! MPSGraph::notEqualWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::notWithTensor:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:axis:dataType:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:axis:dataType:onValue:offValue:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:axis:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:dataType:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:dataType:onValue:offValue:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:name: not bound +!missing-selector! MPSGraph::options not bound +!missing-selector! MPSGraph::padGradientWithIncomingGradientTensor:sourceTensor:paddingMode:leftPadding:rightPadding:name: not bound +!missing-selector! MPSGraph::padTensor:withPaddingMode:leftPadding:rightPadding:constantValue:name: not bound +!missing-selector! MPSGraph::placeholderTensors not bound +!missing-selector! MPSGraph::placeholderWithShape:dataType:name: not bound +!missing-selector! MPSGraph::placeholderWithShape:name: not bound +!missing-selector! MPSGraph::powerWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::readVariable:name: not bound +!missing-selector! MPSGraph::reciprocalWithTensor:name: not bound +!missing-selector! MPSGraph::reductionMaximumWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionMaximumWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reductionMinimumWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionMinimumWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reductionProductWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionProductWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reductionSumWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionSumWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reLUGradientWithIncomingGradient:sourceTensor:name: not bound +!missing-selector! MPSGraph::reLUWithTensor:name: not bound +!missing-selector! MPSGraph::reshapeTensor:withShape:name: not bound +!missing-selector! MPSGraph::resizeTensor:size:mode:centerResult:alignCorners:layout:name: not bound +!missing-selector! MPSGraph::resizeWithGradientTensor:input:mode:centerResult:alignCorners:layout:name: not bound +!missing-selector! MPSGraph::reverseSquareRootWithTensor:name: not bound +!missing-selector! MPSGraph::rintWithTensor:name: not bound +!missing-selector! MPSGraph::roundWithTensor:name: not bound +!missing-selector! MPSGraph::runAsyncWithFeeds:targetTensors:targetOperations:executionDescriptor: not bound +!missing-selector! MPSGraph::runAsyncWithMTLCommandQueue:feeds:targetOperations:resultsDictionary:executionDescriptor: not bound +!missing-selector! MPSGraph::runAsyncWithMTLCommandQueue:feeds:targetTensors:targetOperations:executionDescriptor: not bound +!missing-selector! MPSGraph::runWithFeeds:targetTensors:targetOperations: not bound +!missing-selector! MPSGraph::runWithMTLCommandQueue:feeds:targetOperations:resultsDictionary: not bound +!missing-selector! MPSGraph::runWithMTLCommandQueue:feeds:targetTensors:targetOperations: not bound +!missing-selector! MPSGraph::scatterNDWithUpdatesTensor:indicesTensor:shape:batchDimensions:name: not bound +!missing-selector! MPSGraph::selectWithPredicateTensor:truePredicateTensor:falsePredicateTensor:name: not bound +!missing-selector! MPSGraph::setOptions: not bound +!missing-selector! MPSGraph::sigmoidGradientWithIncomingGradient:sourceTensor:name: not bound +!missing-selector! MPSGraph::sigmoidWithTensor:name: not bound +!missing-selector! MPSGraph::signbitWithTensor:name: not bound +!missing-selector! MPSGraph::signWithTensor:name: not bound +!missing-selector! MPSGraph::sinhWithTensor:name: not bound +!missing-selector! MPSGraph::sinWithTensor:name: not bound +!missing-selector! MPSGraph::sliceTensor:dimension:start:length:name: not bound +!missing-selector! MPSGraph::softMaxCrossEntropyGradientWithIncomingGradientTensor:sourceTensor:labelsTensor:axis:reductionType:name: not bound +!missing-selector! MPSGraph::softMaxCrossEntropyWithSourceTensor:labelsTensor:axis:reductionType:name: not bound +!missing-selector! MPSGraph::softMaxGradientWithIncomingGradient:sourceTensor:axis:name: not bound +!missing-selector! MPSGraph::softMaxWithTensor:axis:name: not bound +!missing-selector! MPSGraph::squareRootWithTensor:name: not bound +!missing-selector! MPSGraph::squareWithTensor:name: not bound +!missing-selector! MPSGraph::stochasticGradientDescentWithLearningRateTensor:valuesTensor:gradientTensor:name: not bound +!missing-selector! MPSGraph::subtractionWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::tanhWithTensor:name: not bound +!missing-selector! MPSGraph::tanWithTensor:name: not bound +!missing-selector! MPSGraph::tileGradientWithIncomingGradientTensor:sourceTensor:withMultiplier:name: not bound +!missing-selector! MPSGraph::tileTensor:withMultiplier:name: not bound +!missing-selector! MPSGraph::transposeTensor:dimension:withDimension:name: not bound +!missing-selector! MPSGraph::variableWithData:shape:dataType:name: not bound +!missing-selector! MPSGraph::varianceOfTensor:axes:name: not bound +!missing-selector! MPSGraph::varianceOfTensor:meanTensor:axes:name: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::dataLayout not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::dilationRateInX not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::dilationRateInY not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::groups not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingBottom not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingLeft not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingRight not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingStyle not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingTop not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setDataLayout: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setDilationRateInX: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setDilationRateInY: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setExplicitPaddingWithPaddingLeft:paddingRight:paddingTop:paddingBottom: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setGroups: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingBottom: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingLeft: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingRight: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingStyle: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingTop: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setStrideInX: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setStrideInY: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setWeightsLayout: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::strideInX not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::strideInY not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::weightsLayout not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::dataLayout not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::dilationRateInX not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::dilationRateInY not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingBottom not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingLeft not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingRight not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingStyle not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingTop not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setDataLayout: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setDilationRateInX: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setDilationRateInY: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setExplicitPaddingWithPaddingLeft:paddingRight:paddingTop:paddingBottom: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingBottom: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingLeft: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingRight: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingStyle: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingTop: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setStrideInX: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setStrideInY: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setWeightsLayout: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::strideInX not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::strideInY not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::weightsLayout not bound +!missing-selector! MPSGraphDevice::metalDevice not bound +!missing-selector! MPSGraphDevice::type not bound +!missing-selector! MPSGraphExecutionDescriptor::completionHandler not bound +!missing-selector! MPSGraphExecutionDescriptor::scheduledHandler not bound +!missing-selector! MPSGraphExecutionDescriptor::setCompletionHandler: not bound +!missing-selector! MPSGraphExecutionDescriptor::setScheduledHandler: not bound +!missing-selector! MPSGraphExecutionDescriptor::setWaitUntilCompleted: not bound +!missing-selector! MPSGraphExecutionDescriptor::waitUntilCompleted not bound +!missing-selector! MPSGraphOperation::controlDependencies not bound +!missing-selector! MPSGraphOperation::graph not bound +!missing-selector! MPSGraphOperation::inputTensors not bound +!missing-selector! MPSGraphOperation::name not bound +!missing-selector! MPSGraphOperation::outputTensors not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::dataLayout not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::dilationRateInX not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::dilationRateInY not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::kernelHeight not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::kernelWidth not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingBottom not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingLeft not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingRight not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingStyle not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingTop not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setDataLayout: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setDilationRateInX: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setDilationRateInY: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setExplicitPaddingWithPaddingLeft:paddingRight:paddingTop:paddingBottom: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setKernelHeight: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setKernelWidth: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingBottom: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingLeft: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingRight: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingStyle: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingTop: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setStrideInX: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setStrideInY: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::strideInX not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::strideInY not bound +!missing-selector! MPSGraphShapedType::dataType not bound +!missing-selector! MPSGraphShapedType::initWithShape:dataType: not bound +!missing-selector! MPSGraphShapedType::isEqualTo: not bound +!missing-selector! MPSGraphShapedType::setDataType: not bound +!missing-selector! MPSGraphShapedType::setShape: not bound +!missing-selector! MPSGraphShapedType::shape not bound +!missing-selector! MPSGraphTensor::dataType not bound +!missing-selector! MPSGraphTensor::operation not bound +!missing-selector! MPSGraphTensor::shape not bound +!missing-selector! MPSGraphTensorData::dataType not bound +!missing-selector! MPSGraphTensorData::device not bound +!missing-selector! MPSGraphTensorData::initWithDevice:data:shape:dataType: not bound +!missing-selector! MPSGraphTensorData::initWithMPSImageBatch: not bound +!missing-selector! MPSGraphTensorData::initWithMPSMatrix: not bound +!missing-selector! MPSGraphTensorData::initWithMPSMatrix:rank: not bound +!missing-selector! MPSGraphTensorData::initWithMPSNDArray: not bound +!missing-selector! MPSGraphTensorData::initWithMPSVector: not bound +!missing-selector! MPSGraphTensorData::initWithMPSVector:rank: not bound +!missing-selector! MPSGraphTensorData::initWithMTLBuffer:shape:dataType: not bound +!missing-selector! MPSGraphTensorData::mpsndarray not bound +!missing-selector! MPSGraphTensorData::shape not bound +!missing-selector! MPSGraphVariableOp::dataType not bound +!missing-selector! MPSGraphVariableOp::shape not bound +!missing-type! MPSGraph not bound +!missing-type! MPSGraphConvolution2DOpDescriptor not bound +!missing-type! MPSGraphDepthwiseConvolution2DOpDescriptor not bound +!missing-type! MPSGraphDevice not bound +!missing-type! MPSGraphExecutionDescriptor not bound +!missing-type! MPSGraphOperation not bound +!missing-type! MPSGraphPooling2DOpDescriptor not bound +!missing-type! MPSGraphShapedType not bound +!missing-type! MPSGraphTensor not bound +!missing-type! MPSGraphTensorData not bound +!missing-type! MPSGraphVariableOp not bound diff --git a/tests/xtro-sharpie/iOS-Network.todo b/tests/xtro-sharpie/iOS-Network.todo new file mode 100644 index 000000000000..37648521d390 --- /dev/null +++ b/tests/xtro-sharpie/iOS-Network.todo @@ -0,0 +1,43 @@ +!missing-field! _nw_privacy_context_default_context not bound +!missing-pinvoke! nw_connection_group_cancel is not bound +!missing-pinvoke! nw_connection_group_copy_descriptor is not bound +!missing-pinvoke! nw_connection_group_copy_local_endpoint_for_message is not bound +!missing-pinvoke! nw_connection_group_copy_parameters is not bound +!missing-pinvoke! nw_connection_group_copy_path_for_message is not bound +!missing-pinvoke! nw_connection_group_copy_remote_endpoint_for_message is not bound +!missing-pinvoke! nw_connection_group_create is not bound +!missing-pinvoke! nw_connection_group_extract_connection_for_message is not bound +!missing-pinvoke! nw_connection_group_reply is not bound +!missing-pinvoke! nw_connection_group_send_message is not bound +!missing-pinvoke! nw_connection_group_set_queue is not bound +!missing-pinvoke! nw_connection_group_set_receive_handler is not bound +!missing-pinvoke! nw_connection_group_set_state_changed_handler is not bound +!missing-pinvoke! nw_connection_group_start is not bound +!missing-pinvoke! nw_establishment_report_enumerate_resolution_reports is not bound +!missing-pinvoke! nw_group_descriptor_add_endpoint is not bound +!missing-pinvoke! nw_group_descriptor_create_multicast is not bound +!missing-pinvoke! nw_group_descriptor_enumerate_endpoints is not bound +!missing-pinvoke! nw_ip_options_set_disable_multicast_loopback is not bound +!missing-pinvoke! nw_multicast_group_descriptor_get_disable_unicast_traffic is not bound +!missing-pinvoke! nw_multicast_group_descriptor_set_disable_unicast_traffic is not bound +!missing-pinvoke! nw_multicast_group_descriptor_set_specific_source is not bound +!missing-pinvoke! nw_parameters_set_privacy_context is not bound +!missing-pinvoke! nw_path_monitor_prohibit_interface_type is not bound +!missing-pinvoke! nw_privacy_context_create is not bound +!missing-pinvoke! nw_privacy_context_disable_logging is not bound +!missing-pinvoke! nw_privacy_context_flush_cache is not bound +!missing-pinvoke! nw_privacy_context_require_encrypted_name_resolution is not bound +!missing-pinvoke! nw_resolution_report_copy_preferred_endpoint is not bound +!missing-pinvoke! nw_resolution_report_copy_successful_endpoint is not bound +!missing-pinvoke! nw_resolution_report_get_endpoint_count is not bound +!missing-pinvoke! nw_resolution_report_get_milliseconds is not bound +!missing-pinvoke! nw_resolution_report_get_protocol is not bound +!missing-pinvoke! nw_resolution_report_get_source is not bound +!missing-pinvoke! nw_resolver_config_add_server_address is not bound +!missing-pinvoke! nw_resolver_config_create_https is not bound +!missing-pinvoke! nw_resolver_config_create_tls is not bound +!missing-protocol! OS_nw_connection_group not bound +!missing-protocol! OS_nw_group_descriptor not bound +!missing-protocol! OS_nw_privacy_context not bound +!missing-protocol! OS_nw_resolution_report not bound +!missing-protocol! OS_nw_resolver_config not bound diff --git a/tests/xtro-sharpie/iOS-NetworkExtension.todo b/tests/xtro-sharpie/iOS-NetworkExtension.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-PassKit.ignore b/tests/xtro-sharpie/iOS-PassKit.ignore deleted file mode 100644 index a8b6e3a300e0..000000000000 --- a/tests/xtro-sharpie/iOS-PassKit.ignore +++ /dev/null @@ -1,30 +0,0 @@ -## made optional in xcode9 beta 3 since it was replaced with newer API -!incorrect-protocol-member! PKPaymentAuthorizationViewControllerDelegate::paymentAuthorizationViewController:didAuthorizePayment:completion: is OPTIONAL and should NOT be abstract - -## fixed in XAMCORE_4_0 - API break -!incorrect-protocol-member! PKPaymentAuthorizationViewControllerDelegate::paymentAuthorizationViewControllerWillAuthorizePayment: is OPTIONAL and should NOT be abstract - -# Initial result from new rule extra-null-allowed -!extra-null-allowed! 'Foundation.NSObject PassKit.PKDisbursementAuthorizationController::get_WeakDelegate()' has a extraneous [NullAllowed] on return type -!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_CountryCode(System.String)' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_CurrencyCode(System.String)' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_MerchantIdentifier(System.String)' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_PaymentSummaryItems(PassKit.PKPaymentSummaryItem[])' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_SupportedNetworks(Foundation.NSString[])' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentSummaryItem::set_Amount(Foundation.NSDecimalNumber)' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentSummaryItem::set_Label(System.String)' has a extraneous [NullAllowed] on parameter #0 - -# Initial result from new rule missing-null-allowed -!missing-null-allowed! 'AddressBook.ABRecord PassKit.PKPayment::get_BillingAddress()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'AddressBook.ABRecord PassKit.PKPayment::get_ShippingAddress()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDate PassKit.PKPass::get_RelevantDate()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary PassKit.PKPass::get_UserInfo()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject PassKit.PKPass::GetLocalizedValue(Foundation.NSString)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl PassKit.PKPass::get_WebServiceUrl()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'PassKit.PKPass PassKit.PKPassLibrary::GetPass(System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'PassKit.PKPaymentPass PassKit.PKPass::get_PaymentPass()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'PassKit.PKShippingMethod PassKit.PKPayment::get_ShippingMethod()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String PassKit.PKPass::get_AuthenticationToken()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.Void PassKit.PKPaymentAuthorizationResult::set_Errors(Foundation.NSError[])' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void PassKit.PKPaymentRequestPaymentMethodUpdate::set_Errors(Foundation.NSError[])' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void PassKit.PKPaymentRequestShippingContactUpdate::set_Errors(Foundation.NSError[])' is missing an [NullAllowed] on parameter #0 diff --git a/tests/xtro-sharpie/iOS-PassKit.todo b/tests/xtro-sharpie/iOS-PassKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-ReplayKit.ignore b/tests/xtro-sharpie/iOS-ReplayKit.ignore deleted file mode 100644 index 5559c9e9e508..000000000000 --- a/tests/xtro-sharpie/iOS-ReplayKit.ignore +++ /dev/null @@ -1,2 +0,0 @@ -## only used on tvOS but exposed in iOS 10 SDK -!missing-enum! RPPreviewViewControllerMode not bound diff --git a/tests/xtro-sharpie/iOS-UIKit.ignore b/tests/xtro-sharpie/iOS-UIKit.ignore index 89e75178f4a5..0197245024b8 100644 --- a/tests/xtro-sharpie/iOS-UIKit.ignore +++ b/tests/xtro-sharpie/iOS-UIKit.ignore @@ -513,3 +513,7 @@ !missing-null-allowed! 'UIKit.UIWindow UIKit.UIApplication::get_KeyWindow()' is missing an [NullAllowed] on return type !missing-null-allowed! 'UIKit.UIWindow UIKit.UITouch::get_Window()' is missing an [NullAllowed] on return type !missing-null-allowed! 'UIKit.UIWindow UIKit.UIView::get_Window()' is missing an [NullAllowed] on return type + +## These are inlined by protocol adoption so you can't really add such decoration +!missing-requires-super! UIControl::contextMenuInteraction:willDisplayMenuForConfiguration:animator: is missing an [RequiresSuper] attribute +!missing-requires-super! UIControl::contextMenuInteraction:willEndForConfiguration:animator: is missing an [RequiresSuper] attribute diff --git a/tests/xtro-sharpie/iOS-UIKit.todo b/tests/xtro-sharpie/iOS-UIKit.todo index e69de29bb2d1..4b7894a0771c 100644 --- a/tests/xtro-sharpie/iOS-UIKit.todo +++ b/tests/xtro-sharpie/iOS-UIKit.todo @@ -0,0 +1,18 @@ +!missing-selector! NSDiffableDataSourceSectionTransaction::difference not bound +!missing-selector! NSDiffableDataSourceTransaction::difference not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::canReorderItemHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::didReorderHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::setCanReorderItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::setDidReorderHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::setWillReorderHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::willReorderHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::setShouldCollapseItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::setShouldExpandItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::setSnapshotForExpandingParentItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::setWillCollapseItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::setWillExpandItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::shouldCollapseItemHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::shouldExpandItemHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::snapshotForExpandingParentItemHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::willCollapseItemHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::willExpandItemHandler not bound diff --git a/tests/xtro-sharpie/iOS-VisionKit.todo b/tests/xtro-sharpie/iOS-VisionKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/iOS-WebKit.ignore b/tests/xtro-sharpie/iOS-WebKit.ignore index 89654aedef3f..be203deb6371 100644 --- a/tests/xtro-sharpie/iOS-WebKit.ignore +++ b/tests/xtro-sharpie/iOS-WebKit.ignore @@ -1,9 +1,3 @@ -# Moved into a *deprecated* category that is now visible from iOS (but were only on macOS before) -!missing-selector! WKPreferences::javaEnabled not bound -!missing-selector! WKPreferences::plugInsEnabled not bound -!missing-selector! WKPreferences::setJavaEnabled: not bound -!missing-selector! WKPreferences::setPlugInsEnabled: not bound - # Initial result from new rule missing-null-allowed !missing-null-allowed! 'Foundation.NSNumber WebKit.WKWindowFeatures::get_allowsResizing()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSNumber WebKit.WKWindowFeatures::get_height()' is missing an [NullAllowed] on return type diff --git a/tests/xtro-sharpie/macOS-AVFoundation.ignore b/tests/xtro-sharpie/macOS-AVFoundation.ignore index 19507878f030..ceb6c754a587 100644 --- a/tests/xtro-sharpie/macOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/macOS-AVFoundation.ignore @@ -39,3 +39,12 @@ !missing-field! AVMetadataIdentifierQuickTimeMetadataLivePhotoVitalityScoringVersion not bound !missing-field! AVMetadataIdentifierQuickTimeMetadataSpatialOverCaptureQualityScore not bound !missing-field! AVMetadataIdentifierQuickTimeMetadataSpatialOverCaptureQualityScoringVersion not bound + + +# This fields are use for a notifications that returns a AVAudioSessionRouteDescription +# which cannot be found on macOS +!missing-field! AVAudioSessionRouteChangeNotification not bound +!missing-field! AVAudioSessionRouteChangePreviousRouteKey not bound +!missing-field! AVAudioSessionRouteChangeReasonKey not bound +!missing-field! AVAudioSessionSilenceSecondaryAudioHintNotification not bound +!missing-field! AVAudioSessionSilenceSecondaryAudioHintTypeKey not bound diff --git a/tests/xtro-sharpie/macOS-AppKit.ignore b/tests/xtro-sharpie/macOS-AppKit.ignore index 5a9b081724bc..407ff51f4945 100644 --- a/tests/xtro-sharpie/macOS-AppKit.ignore +++ b/tests/xtro-sharpie/macOS-AppKit.ignore @@ -167,7 +167,6 @@ !missing-enum! NSPDFPanelOptions not bound !missing-enum! NSSplitViewItemCollapseBehavior not bound !missing-enum! NSTableColumnResizingOptions not bound -!missing-enum! NSTableViewAnimationOptions not bound !missing-enum! NSTableViewGridLineStyle not bound !missing-enum! NSWindowStyleMask not bound !missing-enum! NSWritingDirectionFormatType not bound diff --git a/tests/xtro-sharpie/macOS-AppKit.todo b/tests/xtro-sharpie/macOS-AppKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/macOS-AuthenticationServices.todo b/tests/xtro-sharpie/macOS-AuthenticationServices.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/macOS-AutomaticAssessmentConfiguration.todo b/tests/xtro-sharpie/macOS-AutomaticAssessmentConfiguration.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/macOS-CallKit.ignore b/tests/xtro-sharpie/macOS-CallKit.ignore new file mode 100644 index 000000000000..e45bc5145764 --- /dev/null +++ b/tests/xtro-sharpie/macOS-CallKit.ignore @@ -0,0 +1,137 @@ +# was added to mac os but it does not compile due to a dependency in AVFoundation, issue: https://github.com/xamarin/maccore/issues/2301 +!missing-enum! CXCallEndedReason not bound +!missing-enum! CXErrorCode not bound +!missing-enum! CXErrorCodeCallDirectoryManagerError not bound +!missing-enum! CXErrorCodeIncomingCallError not bound +!missing-enum! CXErrorCodeRequestTransactionError not bound +!missing-enum! CXHandleType not bound +!missing-enum! CXPlayDTMFCallActionType not bound +!missing-field! CXErrorDomain not bound +!missing-field! CXErrorDomainCallDirectoryManager not bound +!missing-field! CXErrorDomainIncomingCall not bound +!missing-field! CXErrorDomainRequestTransaction not bound +!missing-protocol! CXCallObserverDelegate not bound +!missing-protocol! CXProviderDelegate not bound +!missing-selector! CXAction::fail not bound +!missing-selector! CXAction::fulfill not bound +!missing-selector! CXAction::init not bound +!missing-selector! CXAction::initWithCoder: not bound +!missing-selector! CXAction::isComplete not bound +!missing-selector! CXAction::timeoutDate not bound +!missing-selector! CXAction::UUID not bound +!missing-selector! CXAnswerCallAction::fulfillWithDateConnected: not bound +!missing-selector! CXCall::hasConnected not bound +!missing-selector! CXCall::hasEnded not bound +!missing-selector! CXCall::isEqualToCall: not bound +!missing-selector! CXCall::isOnHold not bound +!missing-selector! CXCall::isOutgoing not bound +!missing-selector! CXCall::UUID not bound +!missing-selector! CXCallAction::callUUID not bound +!missing-selector! CXCallAction::initWithCallUUID: not bound +!missing-selector! CXCallAction::initWithCoder: not bound +!missing-selector! CXCallController::callObserver not bound +!missing-selector! CXCallController::init not bound +!missing-selector! CXCallController::initWithQueue: not bound +!missing-selector! CXCallController::requestTransaction:completion: not bound +!missing-selector! CXCallController::requestTransactionWithAction:completion: not bound +!missing-selector! CXCallController::requestTransactionWithActions:completion: not bound +!missing-selector! CXCallObserver::calls not bound +!missing-selector! CXCallObserver::setDelegate:queue: not bound +!missing-selector! CXCallUpdate::hasVideo not bound +!missing-selector! CXCallUpdate::localizedCallerName not bound +!missing-selector! CXCallUpdate::remoteHandle not bound +!missing-selector! CXCallUpdate::setHasVideo: not bound +!missing-selector! CXCallUpdate::setLocalizedCallerName: not bound +!missing-selector! CXCallUpdate::setRemoteHandle: not bound +!missing-selector! CXCallUpdate::setSupportsDTMF: not bound +!missing-selector! CXCallUpdate::setSupportsGrouping: not bound +!missing-selector! CXCallUpdate::setSupportsHolding: not bound +!missing-selector! CXCallUpdate::setSupportsUngrouping: not bound +!missing-selector! CXCallUpdate::supportsDTMF not bound +!missing-selector! CXCallUpdate::supportsGrouping not bound +!missing-selector! CXCallUpdate::supportsHolding not bound +!missing-selector! CXCallUpdate::supportsUngrouping not bound +!missing-selector! CXEndCallAction::fulfillWithDateEnded: not bound +!missing-selector! CXHandle::initWithType:value: not bound +!missing-selector! CXHandle::isEqualToHandle: not bound +!missing-selector! CXHandle::type not bound +!missing-selector! CXHandle::value not bound +!missing-selector! CXPlayDTMFCallAction::digits not bound +!missing-selector! CXPlayDTMFCallAction::initWithCallUUID:digits:type: not bound +!missing-selector! CXPlayDTMFCallAction::initWithCoder: not bound +!missing-selector! CXPlayDTMFCallAction::setDigits: not bound +!missing-selector! CXPlayDTMFCallAction::setType: not bound +!missing-selector! CXPlayDTMFCallAction::type not bound +!missing-selector! CXProvider::configuration not bound +!missing-selector! CXProvider::initWithConfiguration: not bound +!missing-selector! CXProvider::invalidate not bound +!missing-selector! CXProvider::pendingCallActionsOfClass:withCallUUID: not bound +!missing-selector! CXProvider::pendingTransactions not bound +!missing-selector! CXProvider::reportCallWithUUID:endedAtDate:reason: not bound +!missing-selector! CXProvider::reportCallWithUUID:updated: not bound +!missing-selector! CXProvider::reportNewIncomingCallWithUUID:update:completion: not bound +!missing-selector! CXProvider::reportOutgoingCallWithUUID:connectedAtDate: not bound +!missing-selector! CXProvider::reportOutgoingCallWithUUID:startedConnectingAtDate: not bound +!missing-selector! CXProvider::setConfiguration: not bound +!missing-selector! CXProvider::setDelegate:queue: not bound +!missing-selector! CXProviderConfiguration::iconTemplateImageData not bound +!missing-selector! CXProviderConfiguration::includesCallsInRecents not bound +!missing-selector! CXProviderConfiguration::init not bound +!missing-selector! CXProviderConfiguration::initWithLocalizedName: not bound +!missing-selector! CXProviderConfiguration::localizedName not bound +!missing-selector! CXProviderConfiguration::maximumCallGroups not bound +!missing-selector! CXProviderConfiguration::maximumCallsPerCallGroup not bound +!missing-selector! CXProviderConfiguration::ringtoneSound not bound +!missing-selector! CXProviderConfiguration::setIconTemplateImageData: not bound +!missing-selector! CXProviderConfiguration::setIncludesCallsInRecents: not bound +!missing-selector! CXProviderConfiguration::setMaximumCallGroups: not bound +!missing-selector! CXProviderConfiguration::setMaximumCallsPerCallGroup: not bound +!missing-selector! CXProviderConfiguration::setRingtoneSound: not bound +!missing-selector! CXProviderConfiguration::setSupportedHandleTypes: not bound +!missing-selector! CXProviderConfiguration::setSupportsVideo: not bound +!missing-selector! CXProviderConfiguration::supportedHandleTypes not bound +!missing-selector! CXProviderConfiguration::supportsVideo not bound +!missing-selector! CXSetGroupCallAction::callUUIDToGroupWith not bound +!missing-selector! CXSetGroupCallAction::initWithCallUUID:callUUIDToGroupWith: not bound +!missing-selector! CXSetGroupCallAction::initWithCoder: not bound +!missing-selector! CXSetGroupCallAction::setCallUUIDToGroupWith: not bound +!missing-selector! CXSetHeldCallAction::initWithCallUUID:onHold: not bound +!missing-selector! CXSetHeldCallAction::initWithCoder: not bound +!missing-selector! CXSetHeldCallAction::isOnHold not bound +!missing-selector! CXSetHeldCallAction::setOnHold: not bound +!missing-selector! CXSetMutedCallAction::initWithCallUUID:muted: not bound +!missing-selector! CXSetMutedCallAction::initWithCoder: not bound +!missing-selector! CXSetMutedCallAction::isMuted not bound +!missing-selector! CXSetMutedCallAction::setMuted: not bound +!missing-selector! CXStartCallAction::contactIdentifier not bound +!missing-selector! CXStartCallAction::fulfillWithDateStarted: not bound +!missing-selector! CXStartCallAction::handle not bound +!missing-selector! CXStartCallAction::initWithCallUUID:handle: not bound +!missing-selector! CXStartCallAction::initWithCoder: not bound +!missing-selector! CXStartCallAction::isVideo not bound +!missing-selector! CXStartCallAction::setContactIdentifier: not bound +!missing-selector! CXStartCallAction::setHandle: not bound +!missing-selector! CXStartCallAction::setVideo: not bound +!missing-selector! CXTransaction::actions not bound +!missing-selector! CXTransaction::addAction: not bound +!missing-selector! CXTransaction::initWithAction: not bound +!missing-selector! CXTransaction::initWithActions: not bound +!missing-selector! CXTransaction::isComplete not bound +!missing-selector! CXTransaction::UUID not bound +!missing-type! CXAction not bound +!missing-type! CXAnswerCallAction not bound +!missing-type! CXCall not bound +!missing-type! CXCallAction not bound +!missing-type! CXCallController not bound +!missing-type! CXCallObserver not bound +!missing-type! CXCallUpdate not bound +!missing-type! CXEndCallAction not bound +!missing-type! CXHandle not bound +!missing-type! CXPlayDTMFCallAction not bound +!missing-type! CXProvider not bound +!missing-type! CXProviderConfiguration not bound +!missing-type! CXSetGroupCallAction not bound +!missing-type! CXSetHeldCallAction not bound +!missing-type! CXSetMutedCallAction not bound +!missing-type! CXStartCallAction not bound +!missing-type! CXTransaction not bound diff --git a/tests/xtro-sharpie/macOS-CoreFoundation.ignore b/tests/xtro-sharpie/macOS-CoreFoundation.ignore index 23e7fe2a1caa..732af966c996 100644 --- a/tests/xtro-sharpie/macOS-CoreFoundation.ignore +++ b/tests/xtro-sharpie/macOS-CoreFoundation.ignore @@ -4,6 +4,10 @@ ## dlfcn.h !unknown-pinvoke! dladdr bound +## deprecated in macOS 10.15 +!missing-pinvoke! CFBundleCloseBundleResourceMap is not bound +!missing-pinvoke! CFBundleOpenBundleResourceFiles is not bound +!missing-pinvoke! CFBundleOpenBundleResourceMap is not bound ## unsorted diff --git a/tests/xtro-sharpie/macOS-CoreFoundation.todo b/tests/xtro-sharpie/macOS-CoreFoundation.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/macOS-CoreGraphics.ignore b/tests/xtro-sharpie/macOS-CoreGraphics.ignore index 9b7ec53cca93..3f22723caa3f 100644 --- a/tests/xtro-sharpie/macOS-CoreGraphics.ignore +++ b/tests/xtro-sharpie/macOS-CoreGraphics.ignore @@ -9,9 +9,6 @@ !missing-enum! CGWindowBackingType not bound !missing-enum! CGWindowLevelKey not bound !missing-enum! CGWindowSharingType not bound -!missing-field! kCGColorBlack not bound -!missing-field! kCGColorClear not bound -!missing-field! kCGColorWhite not bound !missing-field! kCGDisplayShowDuplicateLowResolutionModes not bound !missing-field! kCGDisplayStreamColorSpace not bound !missing-field! kCGDisplayStreamDestinationRect not bound @@ -24,14 +21,6 @@ !missing-field! kCGDisplayStreamYCbCrMatrix_ITU_R_601_4 not bound !missing-field! kCGDisplayStreamYCbCrMatrix_ITU_R_709_2 not bound !missing-field! kCGDisplayStreamYCbCrMatrix_SMPTE_240M_1995 not bound -!missing-field! kCGPDFContextOutputIntent not bound -!missing-field! kCGPDFContextOutputIntents not bound -!missing-field! kCGPDFXDestinationOutputProfile not bound -!missing-field! kCGPDFXInfo not bound -!missing-field! kCGPDFXOutputCondition not bound -!missing-field! kCGPDFXOutputConditionIdentifier not bound -!missing-field! kCGPDFXOutputIntentSubtype not bound -!missing-field! kCGPDFXRegistryName not bound !missing-field! kCGWindowAlpha not bound !missing-field! kCGWindowBackingLocationVideoMemory not bound !missing-field! kCGWindowBounds not bound @@ -49,7 +38,6 @@ !missing-pinvoke! CGAssociateMouseAndMouseCursorPosition is not bound !missing-pinvoke! CGBeginDisplayConfiguration is not bound !missing-pinvoke! CGCancelDisplayConfiguration is not bound -!missing-pinvoke! CGColorCreateGenericCMYK is not bound !missing-pinvoke! CGCompleteDisplayConfiguration is not bound !missing-pinvoke! CGConfigureDisplayFadeEffect is not bound !missing-pinvoke! CGConfigureDisplayMirrorOfDisplay is not bound @@ -173,3 +161,5 @@ !missing-pinvoke! CGWindowListCreateImageFromArray is not bound !missing-pinvoke! CGWindowServerCFMachPort is not bound !missing-pinvoke! CGWindowServerCreateServerPort is not bound +!missing-pinvoke! CGPreflightScreenCaptureAccess is not bound +!missing-pinvoke! CGRequestScreenCaptureAccess is not bound diff --git a/tests/xtro-sharpie/macOS-CoreGraphics.todo b/tests/xtro-sharpie/macOS-CoreGraphics.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/macOS-CoreHaptics.todo b/tests/xtro-sharpie/macOS-CoreHaptics.ignore similarity index 98% rename from tests/xtro-sharpie/macOS-CoreHaptics.todo rename to tests/xtro-sharpie/macOS-CoreHaptics.ignore index 56a8707ead3b..bc2497ff6f6f 100644 --- a/tests/xtro-sharpie/macOS-CoreHaptics.todo +++ b/tests/xtro-sharpie/macOS-CoreHaptics.ignore @@ -1,3 +1,4 @@ +# This framework, although appers in the header, will not compile: https://github.com/xamarin/maccore/issues/2261 !missing-enum! CHHapticEngineFinishedAction not bound !missing-enum! CHHapticEngineStoppedReason not bound !missing-enum! CHHapticErrorCode not bound diff --git a/tests/xtro-sharpie/macOS-CoreLocation.ignore b/tests/xtro-sharpie/macOS-CoreLocation.ignore index eea4a0280a18..6736018bbe47 100644 --- a/tests/xtro-sharpie/macOS-CoreLocation.ignore +++ b/tests/xtro-sharpie/macOS-CoreLocation.ignore @@ -1,4 +1,19 @@ -### Fixed in XAMCORE_4_0 -!extra-protocol-member! unexpected selector CLLocationManagerDelegate::locationManagerDidPauseLocationUpdates: found -!extra-protocol-member! unexpected selector CLLocationManagerDelegate::locationManagerDidResumeLocationUpdates: found -!extra-protocol-member! unexpected selector CLLocationManagerDelegate::locationManagerShouldDisplayHeadingCalibration: found +# Added but deprecated, so there is not point to add them +!missing-protocol-member! CLLocationManagerDelegate::locationManager:didRangeBeacons:inRegion: not found +!missing-protocol-member! CLLocationManagerDelegate::locationManager:rangingBeaconsDidFailForRegion:withError: not found +!missing-selector! CLBeacon::proximityUUID not bound +!missing-selector! CLBeaconRegion::initWithProximityUUID:identifier: not bound +!missing-selector! CLBeaconRegion::initWithProximityUUID:major:identifier: not bound +!missing-selector! CLBeaconRegion::initWithProximityUUID:major:minor:identifier: not bound +!missing-selector! CLBeaconRegion::initWithUUID:identifier: not bound +!missing-selector! CLBeaconRegion::proximityUUID not bound +!missing-selector! CLLocationManager::rangedRegions not bound +!missing-selector! CLLocationManager::startRangingBeaconsInRegion: not bound +!missing-selector! CLLocationManager::stopRangingBeaconsInRegion: not bound +!missing-selector! CLLocationManager::startMonitoringForRegion:desiredAccuracy: not bound +!missing-selector! CLLocationManager::allowDeferredLocationUpdatesUntilTraveled:timeout: not bound +!missing-selector! CLLocationManager::disallowDeferredLocationUpdates not bound + +# xtro confuse the instance vs the class property +!deprecated-attribute-missing! CLLocationManager::locationServicesEnabled missing a [Deprecated] attribute +!deprecated-attribute-missing! CLLocationManager::headingAvailable missing a [Deprecated] attribute diff --git a/tests/xtro-sharpie/macOS-CoreLocation.todo b/tests/xtro-sharpie/macOS-CoreLocation.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/macOS-CoreMIDI.ignore b/tests/xtro-sharpie/macOS-CoreMIDI.ignore index bfba9adcddb9..be0133e65220 100644 --- a/tests/xtro-sharpie/macOS-CoreMIDI.ignore +++ b/tests/xtro-sharpie/macOS-CoreMIDI.ignore @@ -11,6 +11,7 @@ !missing-pinvoke! MIDISetSerialPortOwner is not bound !missing-pinvoke! MIDIGetSerialPortOwner is not bound !missing-pinvoke! MIDIGetSerialPortDrivers is not bound +!missing-pinvoke! MIDIDriverEnableMonitoring is not bound !missing-field! kMIDIDriverPropertyUsesSerial not bound !missing-field! kMIDIPropertyFactoryPatchNameFile not bound diff --git a/tests/xtro-sharpie/iOS-AVFoundation.todo b/tests/xtro-sharpie/macOS-CoreML.ignore similarity index 100% rename from tests/xtro-sharpie/iOS-AVFoundation.todo rename to tests/xtro-sharpie/macOS-CoreML.ignore diff --git a/tests/xtro-sharpie/macOS-CoreML.todo b/tests/xtro-sharpie/macOS-CoreML.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/macOS-CryptoTokenKit.todo b/tests/xtro-sharpie/macOS-CryptoTokenKit.todo deleted file mode 100644 index 9e4941a324bb..000000000000 --- a/tests/xtro-sharpie/macOS-CryptoTokenKit.todo +++ /dev/null @@ -1,220 +0,0 @@ -!missing-enum! TKErrorCode not bound -!missing-enum! TKSmartCardPINCharset not bound -!missing-enum! TKSmartCardPINCompletion not bound -!missing-enum! TKSmartCardPINConfirmation not bound -!missing-enum! TKSmartCardPINEncoding not bound -!missing-enum! TKSmartCardPINJustification not bound -!missing-enum! TKSmartCardProtocol not bound -!missing-enum! TKSmartCardSlotState not bound -!missing-enum! TKTokenOperation not bound -!missing-field! TKErrorDomain not bound -!missing-protocol! TKSmartCardTokenDriverDelegate not bound -!missing-protocol! TKSmartCardUserInteractionDelegate not bound -!missing-protocol! TKTokenDelegate not bound -!missing-protocol! TKTokenDriverDelegate not bound -!missing-protocol! TKTokenSessionDelegate not bound -!missing-selector! +TKBERTLVRecord::dataForTag: not bound -!missing-selector! +TKSmartCardSlotManager::defaultManager not bound -!missing-selector! +TKTLVRecord::recordFromData: not bound -!missing-selector! +TKTLVRecord::sequenceOfRecordsFromData: not bound -!missing-selector! +TKTokenDriverConfiguration::driverConfigurations not bound -!missing-selector! TKBERTLVRecord::initWithTag:records: not bound -!missing-selector! TKBERTLVRecord::initWithTag:value: not bound -!missing-selector! TKCompactTLVRecord::initWithTag:value: not bound -!missing-selector! TKSimpleTLVRecord::initWithTag:value: not bound -!missing-selector! TKSmartCard::allowedProtocols not bound -!missing-selector! TKSmartCard::beginSessionWithReply: not bound -!missing-selector! TKSmartCard::cla not bound -!missing-selector! TKSmartCard::context not bound -!missing-selector! TKSmartCard::currentProtocol not bound -!missing-selector! TKSmartCard::endSession not bound -!missing-selector! TKSmartCard::inSessionWithError:executeBlock: not bound -!missing-selector! TKSmartCard::sendIns:p1:p2:data:le:reply: not bound -!missing-selector! TKSmartCard::sendIns:p1:p2:data:le:sw:error: not bound -!missing-selector! TKSmartCard::sensitive not bound -!missing-selector! TKSmartCard::setAllowedProtocols: not bound -!missing-selector! TKSmartCard::setCla: not bound -!missing-selector! TKSmartCard::setContext: not bound -!missing-selector! TKSmartCard::setSensitive: not bound -!missing-selector! TKSmartCard::setUseCommandChaining: not bound -!missing-selector! TKSmartCard::setUseExtendedLength: not bound -!missing-selector! TKSmartCard::slot not bound -!missing-selector! TKSmartCard::transmitRequest:reply: not bound -!missing-selector! TKSmartCard::useCommandChaining not bound -!missing-selector! TKSmartCard::useExtendedLength not bound -!missing-selector! TKSmartCard::userInteractionForSecurePINChangeWithPINFormat:APDU:currentPINByteOffset:newPINByteOffset: not bound -!missing-selector! TKSmartCard::userInteractionForSecurePINVerificationWithPINFormat:APDU:PINByteOffset: not bound -!missing-selector! TKSmartCard::valid not bound -!missing-selector! TKSmartCardATR::bytes not bound -!missing-selector! TKSmartCardATR::historicalBytes not bound -!missing-selector! TKSmartCardATR::historicalRecords not bound -!missing-selector! TKSmartCardATR::initWithBytes: not bound -!missing-selector! TKSmartCardATR::initWithSource: not bound -!missing-selector! TKSmartCardATR::interfaceGroupAtIndex: not bound -!missing-selector! TKSmartCardATR::interfaceGroupForProtocol: not bound -!missing-selector! TKSmartCardATR::protocols not bound -!missing-selector! TKSmartCardATRInterfaceGroup::protocol not bound -!missing-selector! TKSmartCardATRInterfaceGroup::TA not bound -!missing-selector! TKSmartCardATRInterfaceGroup::TB not bound -!missing-selector! TKSmartCardATRInterfaceGroup::TC not bound -!missing-selector! TKSmartCardPINFormat::charset not bound -!missing-selector! TKSmartCardPINFormat::encoding not bound -!missing-selector! TKSmartCardPINFormat::maxPINLength not bound -!missing-selector! TKSmartCardPINFormat::minPINLength not bound -!missing-selector! TKSmartCardPINFormat::PINBitOffset not bound -!missing-selector! TKSmartCardPINFormat::PINBlockByteLength not bound -!missing-selector! TKSmartCardPINFormat::PINJustification not bound -!missing-selector! TKSmartCardPINFormat::PINLengthBitOffset not bound -!missing-selector! TKSmartCardPINFormat::PINLengthBitSize not bound -!missing-selector! TKSmartCardPINFormat::setCharset: not bound -!missing-selector! TKSmartCardPINFormat::setEncoding: not bound -!missing-selector! TKSmartCardPINFormat::setMaxPINLength: not bound -!missing-selector! TKSmartCardPINFormat::setMinPINLength: not bound -!missing-selector! TKSmartCardPINFormat::setPINBitOffset: not bound -!missing-selector! TKSmartCardPINFormat::setPINBlockByteLength: not bound -!missing-selector! TKSmartCardPINFormat::setPINJustification: not bound -!missing-selector! TKSmartCardPINFormat::setPINLengthBitOffset: not bound -!missing-selector! TKSmartCardPINFormat::setPINLengthBitSize: not bound -!missing-selector! TKSmartCardSlot::ATR not bound -!missing-selector! TKSmartCardSlot::makeSmartCard not bound -!missing-selector! TKSmartCardSlot::maxInputLength not bound -!missing-selector! TKSmartCardSlot::maxOutputLength not bound -!missing-selector! TKSmartCardSlot::name not bound -!missing-selector! TKSmartCardSlot::state not bound -!missing-selector! TKSmartCardSlotManager::getSlotWithName:reply: not bound -!missing-selector! TKSmartCardSlotManager::slotNamed: not bound -!missing-selector! TKSmartCardSlotManager::slotNames not bound -!missing-selector! TKSmartCardToken::AID not bound -!missing-selector! TKSmartCardToken::initWithSmartCard:AID:instanceID:tokenDriver: not bound -!missing-selector! TKSmartCardTokenSession::smartCard not bound -!missing-selector! TKSmartCardUserInteraction::cancel not bound -!missing-selector! TKSmartCardUserInteraction::delegate not bound -!missing-selector! TKSmartCardUserInteraction::initialTimeout not bound -!missing-selector! TKSmartCardUserInteraction::interactionTimeout not bound -!missing-selector! TKSmartCardUserInteraction::runWithReply: not bound -!missing-selector! TKSmartCardUserInteraction::setDelegate: not bound -!missing-selector! TKSmartCardUserInteraction::setInitialTimeout: not bound -!missing-selector! TKSmartCardUserInteraction::setInteractionTimeout: not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::locale not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::PINCompletion not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::PINMessageIndices not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::resultData not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::resultSW not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::setLocale: not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::setPINCompletion: not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::setPINMessageIndices: not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::setResultData: not bound -!missing-selector! TKSmartCardUserInteractionForPINOperation::setResultSW: not bound -!missing-selector! TKSmartCardUserInteractionForSecurePINChange::PINConfirmation not bound -!missing-selector! TKSmartCardUserInteractionForSecurePINChange::setPINConfirmation: not bound -!missing-selector! TKTLVRecord::data not bound -!missing-selector! TKTLVRecord::tag not bound -!missing-selector! TKTLVRecord::value not bound -!missing-selector! TKToken::configuration not bound -!missing-selector! TKToken::delegate not bound -!missing-selector! TKToken::initWithTokenDriver:instanceID: not bound -!missing-selector! TKToken::keychainContents not bound -!missing-selector! TKToken::setDelegate: not bound -!missing-selector! TKToken::tokenDriver not bound -!missing-selector! TKTokenAuthOperation::finishWithError: not bound -!missing-selector! TKTokenConfiguration::certificateForObjectID:error: not bound -!missing-selector! TKTokenConfiguration::configurationData not bound -!missing-selector! TKTokenConfiguration::instanceID not bound -!missing-selector! TKTokenConfiguration::keychainItems not bound -!missing-selector! TKTokenConfiguration::keyForObjectID:error: not bound -!missing-selector! TKTokenConfiguration::setConfigurationData: not bound -!missing-selector! TKTokenConfiguration::setKeychainItems: not bound -!missing-selector! TKTokenDriver::delegate not bound -!missing-selector! TKTokenDriver::setDelegate: not bound -!missing-selector! TKTokenDriverConfiguration::addTokenConfigurationForTokenInstanceID: not bound -!missing-selector! TKTokenDriverConfiguration::classID not bound -!missing-selector! TKTokenDriverConfiguration::removeTokenConfigurationForTokenInstanceID: not bound -!missing-selector! TKTokenDriverConfiguration::tokenConfigurations not bound -!missing-selector! TKTokenKeyAlgorithm::isAlgorithm: not bound -!missing-selector! TKTokenKeyAlgorithm::supportsAlgorithm: not bound -!missing-selector! TKTokenKeychainCertificate::data not bound -!missing-selector! TKTokenKeychainCertificate::initWithCertificate:objectID: not bound -!missing-selector! TKTokenKeychainContents::certificateForObjectID:error: not bound -!missing-selector! TKTokenKeychainContents::fillWithItems: not bound -!missing-selector! TKTokenKeychainContents::items not bound -!missing-selector! TKTokenKeychainContents::keyForObjectID:error: not bound -!missing-selector! TKTokenKeychainItem::constraints not bound -!missing-selector! TKTokenKeychainItem::initWithObjectID: not bound -!missing-selector! TKTokenKeychainItem::label not bound -!missing-selector! TKTokenKeychainItem::objectID not bound -!missing-selector! TKTokenKeychainItem::setConstraints: not bound -!missing-selector! TKTokenKeychainItem::setLabel: not bound -!missing-selector! TKTokenKeychainKey::applicationTag not bound -!missing-selector! TKTokenKeychainKey::canDecrypt not bound -!missing-selector! TKTokenKeychainKey::canPerformKeyExchange not bound -!missing-selector! TKTokenKeychainKey::canSign not bound -!missing-selector! TKTokenKeychainKey::initWithCertificate:objectID: not bound -!missing-selector! TKTokenKeychainKey::isSuitableForLogin not bound -!missing-selector! TKTokenKeychainKey::keySizeInBits not bound -!missing-selector! TKTokenKeychainKey::keyType not bound -!missing-selector! TKTokenKeychainKey::publicKeyData not bound -!missing-selector! TKTokenKeychainKey::publicKeyHash not bound -!missing-selector! TKTokenKeychainKey::setApplicationTag: not bound -!missing-selector! TKTokenKeychainKey::setCanDecrypt: not bound -!missing-selector! TKTokenKeychainKey::setCanPerformKeyExchange: not bound -!missing-selector! TKTokenKeychainKey::setCanSign: not bound -!missing-selector! TKTokenKeychainKey::setKeySizeInBits: not bound -!missing-selector! TKTokenKeychainKey::setKeyType: not bound -!missing-selector! TKTokenKeychainKey::setPublicKeyData: not bound -!missing-selector! TKTokenKeychainKey::setPublicKeyHash: not bound -!missing-selector! TKTokenKeychainKey::setSuitableForLogin: not bound -!missing-selector! TKTokenKeyExchangeParameters::requestedSize not bound -!missing-selector! TKTokenKeyExchangeParameters::sharedInfo not bound -!missing-selector! TKTokenPasswordAuthOperation::password not bound -!missing-selector! TKTokenPasswordAuthOperation::setPassword: not bound -!missing-selector! TKTokenSession::delegate not bound -!missing-selector! TKTokenSession::initWithToken: not bound -!missing-selector! TKTokenSession::setDelegate: not bound -!missing-selector! TKTokenSession::token not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::APDUTemplate not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::PIN not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::PINByteOffset not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::PINFormat not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::setAPDUTemplate: not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::setPIN: not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::setPINByteOffset: not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::setPINFormat: not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::setSmartCard: not bound -!missing-selector! TKTokenSmartCardPINAuthOperation::smartCard not bound -!missing-selector! TKTokenWatcher::addRemovalHandler:forTokenID: not bound -!missing-selector! TKTokenWatcher::init not bound -!missing-selector! TKTokenWatcher::initWithInsertionHandler: not bound -!missing-selector! TKTokenWatcher::setInsertionHandler: not bound -!missing-selector! TKTokenWatcher::tokenIDs not bound -!missing-type! TKBERTLVRecord not bound -!missing-type! TKCompactTLVRecord not bound -!missing-type! TKSimpleTLVRecord not bound -!missing-type! TKSmartCard not bound -!missing-type! TKSmartCardATR not bound -!missing-type! TKSmartCardATRInterfaceGroup not bound -!missing-type! TKSmartCardPINFormat not bound -!missing-type! TKSmartCardSlot not bound -!missing-type! TKSmartCardSlotManager not bound -!missing-type! TKSmartCardToken not bound -!missing-type! TKSmartCardTokenDriver not bound -!missing-type! TKSmartCardTokenSession not bound -!missing-type! TKSmartCardUserInteraction not bound -!missing-type! TKSmartCardUserInteractionForPINOperation not bound -!missing-type! TKSmartCardUserInteractionForSecurePINChange not bound -!missing-type! TKSmartCardUserInteractionForSecurePINVerification not bound -!missing-type! TKTLVRecord not bound -!missing-type! TKToken not bound -!missing-type! TKTokenAuthOperation not bound -!missing-type! TKTokenConfiguration not bound -!missing-type! TKTokenDriver not bound -!missing-type! TKTokenDriverConfiguration not bound -!missing-type! TKTokenKeyAlgorithm not bound -!missing-type! TKTokenKeychainCertificate not bound -!missing-type! TKTokenKeychainContents not bound -!missing-type! TKTokenKeychainItem not bound -!missing-type! TKTokenKeychainKey not bound -!missing-type! TKTokenKeyExchangeParameters not bound -!missing-type! TKTokenPasswordAuthOperation not bound -!missing-type! TKTokenSession not bound -!missing-type! TKTokenSmartCardPINAuthOperation not bound -!missing-type! TKTokenWatcher not bound diff --git a/tests/xtro-sharpie/macOS-FileProvider.ignore b/tests/xtro-sharpie/macOS-FileProvider.ignore index cf76eaab708e..4f408b001cad 100644 --- a/tests/xtro-sharpie/macOS-FileProvider.ignore +++ b/tests/xtro-sharpie/macOS-FileProvider.ignore @@ -4,3 +4,6 @@ ## This member is not available on mac ## https://developer.apple.com/documentation/fileprovider/nsfileprovideritem/2879552-trashed?language=objc !extra-protocol-member! unexpected selector NSFileProviderItem::isTrashed found + +## when deprecated (xcode12 beta 3) this member was marked as not available on macOS (but it was before) +!extra-protocol-member! unexpected selector NSFileProviderItem::typeIdentifier found diff --git a/tests/xtro-sharpie/macOS-FileProvider.todo b/tests/xtro-sharpie/macOS-FileProvider.todo deleted file mode 100644 index f3210b862f0f..000000000000 --- a/tests/xtro-sharpie/macOS-FileProvider.todo +++ /dev/null @@ -1,27 +0,0 @@ -!missing-enum! NSFileProviderErrorCode not bound -!missing-field! NSFileProviderErrorDomain not bound -!missing-field! NSFileProviderErrorItemKey not bound -!missing-field! NSFileProviderErrorNonExistentItemIdentifierKey not bound -!missing-field! NSFileProviderFavoriteRankUnranked not bound -!missing-field! NSFileProviderInitialPageSortedByDate not bound -!missing-field! NSFileProviderInitialPageSortedByName not bound -!missing-field! NSFileProviderRootContainerItemIdentifier not bound -!missing-field! NSFileProviderWorkingSetContainerItemIdentifier not bound -!missing-protocol! NSFileProviderServiceSource not bound -!missing-selector! +NSFileProviderManager::addDomain:completionHandler: not bound -!missing-selector! +NSFileProviderManager::getDomainsWithCompletionHandler: not bound -!missing-selector! +NSFileProviderManager::managerForDomain: not bound -!missing-selector! +NSFileProviderManager::placeholderURLForURL: not bound -!missing-selector! +NSFileProviderManager::removeAllDomainsWithCompletionHandler: not bound -!missing-selector! +NSFileProviderManager::removeDomain:completionHandler: not bound -!missing-selector! +NSFileProviderManager::writePlaceholderAtURL:withMetadata:error: not bound -!missing-selector! NSFileProviderDomain::displayName not bound -!missing-selector! NSFileProviderDomain::identifier not bound -!missing-selector! NSFileProviderDomain::initWithIdentifier:displayName:pathRelativeToDocumentStorage: not bound -!missing-selector! NSFileProviderDomain::pathRelativeToDocumentStorage not bound -!missing-selector! NSFileProviderManager::documentStorageURL not bound -!missing-selector! NSFileProviderManager::providerIdentifier not bound -!missing-selector! NSFileProviderManager::registerURLSessionTask:forItemWithIdentifier:completionHandler: not bound -!missing-selector! NSFileProviderManager::signalEnumeratorForContainerItemIdentifier:completionHandler: not bound -!missing-type! NSFileProviderDomain not bound -!missing-type! NSFileProviderManager not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/macOS-GameController.ignore b/tests/xtro-sharpie/macOS-GameController.ignore new file mode 100644 index 000000000000..12bc2b85dcdc --- /dev/null +++ b/tests/xtro-sharpie/macOS-GameController.ignore @@ -0,0 +1,5 @@ +# Dependency on HIDDriverKit: (BOOL)supportsHIDDevice:(IOHIDDeviceRef)device +!missing-selector! +GCController::supportsHIDDevice: not bound + +# Dependency on CoreHaptics updates for Xcode 12 beta 3 +!missing-selector! GCDeviceHaptics::createEngineWithLocality: not bound diff --git a/tests/xtro-sharpie/macOS-GameKit.ignore b/tests/xtro-sharpie/macOS-GameKit.ignore index fcd14107ca10..09ddb00748de 100644 --- a/tests/xtro-sharpie/macOS-GameKit.ignore +++ b/tests/xtro-sharpie/macOS-GameKit.ignore @@ -23,7 +23,6 @@ !extra-null-allowed! 'System.Void GameKit.GKAchievement::ReportAchievements(GameKit.GKAchievement[],GameKit.GKChallenge[],System.Action`1)' has a extraneous [NullAllowed] on parameter #1 !extra-null-allowed! 'System.Void GameKit.GKFriendRequestComposeViewController::AddRecipientPlayers(GameKit.GKPlayer[])' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.Void GameKit.GKScore::ReportScores(GameKit.GKScore[],GameKit.GKChallenge[],System.Action`1)' has a extraneous [NullAllowed] on parameter #1 -!extra-null-allowed! 'System.Void GameKit.GKTurnBasedEventHandler::set_WeakDelegate(Foundation.NSObject)' has a extraneous [NullAllowed] on parameter #0 !extra-null-allowed! 'System.Void GameKit.GKVoiceChat::set_PlayerStateUpdateHandler(GameKit.GKPlayerStateUpdateHandler)' has a extraneous [NullAllowed] on parameter #0 # Initial result from new rule missing-null-allowed @@ -46,3 +45,6 @@ !missing-null-allowed! 'System.Void GameKit.GKDialogController::set_ParentWindow(AppKit.NSWindow)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void GameKit.GKGameSession::SendMessage(System.String,System.String[],Foundation.NSData,GameKit.GKCloudPlayer[],System.Boolean,System.Action`1)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'System.Void GameKit.GKMatchmakerViewController::set_DefaultInvitationMessage(System.String)' is missing an [NullAllowed] on parameter #0 + +# API removed by Apple, marked as deprecated +!unknown-native-enum! GKAuthenticationType bound diff --git a/tests/xtro-sharpie/macOS-GameKit.todo b/tests/xtro-sharpie/macOS-GameKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/macOS-Intents.ignore b/tests/xtro-sharpie/macOS-Intents.ignore index aa613c0f12ce..085d7003c413 100644 --- a/tests/xtro-sharpie/macOS-Intents.ignore +++ b/tests/xtro-sharpie/macOS-Intents.ignore @@ -18,3 +18,63 @@ !missing-enum! INGetRestaurantGuestIntentResponseCode not bound !missing-enum! INGetUserCurrentRestaurantReservationBookingsIntentResponseCode not bound !missing-enum! INRestaurantReservationUserBookingStatus not bound + +## Do not make sense on macOS, we can bind later if asked +!missing-selector! +INCurrencyAmountResolutionResult::confirmationRequiredWithCurrencyAmountToConfirm: not bound +!missing-selector! +INCurrencyAmountResolutionResult::disambiguationWithCurrencyAmountsToDisambiguate: not bound +!missing-selector! +INCurrencyAmountResolutionResult::successWithResolvedCurrencyAmount: not bound +!missing-selector! +INDoubleResolutionResult::confirmationRequiredWithValueToConfirm: not bound +!missing-selector! +INDoubleResolutionResult::successWithResolvedValue: not bound +!missing-selector! INTicketedEvent::category not bound +!missing-selector! INTicketedEvent::eventDuration not bound +!missing-selector! INTicketedEvent::initWithCategory:name:eventDuration:location: not bound +!missing-selector! INTicketedEvent::location not bound +!missing-selector! INTicketedEvent::name not bound +!missing-selector! INTicketedEventReservation::event not bound +!missing-selector! INTicketedEventReservation::initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:reservedSeat:event: not bound +!missing-selector! INTicketedEventReservation::initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservedSeat:event: not bound +!missing-selector! INTicketedEventReservation::reservedSeat not bound +!missing-type! INCurrencyAmountResolutionResult not bound +!missing-type! INDoubleResolutionResult not bound +!missing-type! INTicketedEvent not bound +!missing-type! INTicketedEventReservation not bound + +## Apple fixed API availability fixed in XAMCORE_4_0 +!unknown-field! INPersonRelationshipAssistant bound +!unknown-field! INPersonRelationshipBrother bound +!unknown-field! INPersonRelationshipChild bound +!unknown-field! INPersonRelationshipFather bound +!unknown-field! INPersonRelationshipFriend bound +!unknown-field! INPersonRelationshipManager bound +!unknown-field! INPersonRelationshipMother bound +!unknown-field! INPersonRelationshipParent bound +!unknown-field! INPersonRelationshipPartner bound +!unknown-field! INPersonRelationshipSister bound +!unknown-field! INPersonRelationshipSpouse bound +!unknown-native-enum! INCallRecordType bound +!unknown-protocol! INSearchCallHistoryIntentHandling bound +!unknown-protocol! INSearchForMessagesIntentHandling bound +!unknown-protocol! INSendMessageIntentHandling bound +!unknown-protocol! INStartAudioCallIntentHandling bound +!unknown-protocol! INStartVideoCallIntentHandling bound +!unknown-type! INCallDestinationTypeResolutionResult bound +!unknown-type! INCallRecord bound +!unknown-type! INCallRecordTypeOptionsResolutionResult bound +!unknown-type! INCallRecordTypeResolutionResult bound +!unknown-type! INDateComponentsRangeResolutionResult bound +!unknown-type! INMessage bound +!unknown-type! INMessageAttributeOptionsResolutionResult bound +!unknown-type! INParameter bound +!unknown-type! INRecurrenceRule bound +!unknown-type! INSearchCallHistoryIntent bound +!unknown-type! INSearchCallHistoryIntentResponse bound +!unknown-type! INSearchForMessagesIntent bound +!unknown-type! INSearchForMessagesIntentResponse bound +!unknown-type! INSendMessageIntent bound +!unknown-type! INSendMessageIntentResponse bound +!unknown-type! INSendMessageRecipientResolutionResult bound +!unknown-type! INSpeakableStringResolutionResult bound +!unknown-type! INStartAudioCallIntent bound +!unknown-type! INStartAudioCallIntentResponse bound +!unknown-type! INStartVideoCallIntent bound +!unknown-type! INStartVideoCallIntentResponse bound diff --git a/tests/xtro-sharpie/macOS-Intents.todo b/tests/xtro-sharpie/macOS-Intents.todo deleted file mode 100644 index b523497a4d64..000000000000 --- a/tests/xtro-sharpie/macOS-Intents.todo +++ /dev/null @@ -1,81 +0,0 @@ -!unknown-field! INIntentErrorDomain bound -!unknown-native-enum! INCallCapability bound -!unknown-native-enum! INCallCapabilityOptions bound -!unknown-native-enum! INCallDestinationType bound -!unknown-native-enum! INCallRecordType bound -!unknown-native-enum! INCallRecordTypeOptions bound -!unknown-native-enum! INConditionalOperator bound -!unknown-native-enum! INIntentErrorCode bound -!unknown-native-enum! INIntentHandlingStatus bound -!unknown-native-enum! INInteractionDirection bound -!unknown-native-enum! INMessageAttributeOptions bound -!unknown-native-enum! INMessageType bound -!unknown-native-enum! INPersonHandleType bound -!unknown-native-enum! INSearchCallHistoryIntentResponseCode bound -!unknown-native-enum! INSearchForMessagesIntentResponseCode bound -!unknown-native-enum! INSendMessageIntentResponseCode bound -!unknown-native-enum! INSendMessageRecipientUnsupportedReason bound -!unknown-native-enum! INStartAudioCallIntentResponseCode bound -!unknown-native-enum! INStartVideoCallIntentResponseCode bound -!unknown-protocol! INSearchCallHistoryIntentHandling bound -!unknown-protocol! INSearchForMessagesIntentHandling bound -!unknown-protocol! INSendMessageIntentHandling bound -!unknown-protocol! INSpeakable bound -!unknown-protocol! INStartAudioCallIntentHandling bound -!unknown-protocol! INStartVideoCallIntentHandling bound -!unknown-type! INCallDestinationTypeResolutionResult bound -!unknown-type! INCallRecord bound -!unknown-type! INCallRecordTypeOptionsResolutionResult bound -!unknown-type! INCallRecordTypeResolutionResult bound -!unknown-type! INDateComponentsRange bound -!unknown-type! INDateComponentsRangeResolutionResult bound -!unknown-type! INImage bound -!unknown-type! INIntent bound -!unknown-type! INIntentResolutionResult bound -!unknown-type! INIntentResponse bound -!unknown-type! INInteraction bound -!unknown-type! INMessage bound -!unknown-type! INMessageAttributeOptionsResolutionResult bound -!unknown-type! INParameter bound -!unknown-type! INPerson bound -!unknown-type! INPersonHandle bound -!unknown-type! INPersonResolutionResult bound -!unknown-type! INPlacemarkResolutionResult bound -!unknown-type! INRecurrenceRule bound -!unknown-type! INSearchCallHistoryIntent bound -!unknown-type! INSearchCallHistoryIntentResponse bound -!unknown-type! INSearchForMessagesIntent bound -!unknown-type! INSearchForMessagesIntentResponse bound -!unknown-type! INSendMessageIntent bound -!unknown-type! INSendMessageIntentResponse bound -!unknown-type! INSendMessageRecipientResolutionResult bound -!unknown-type! INSpeakableString bound -!unknown-type! INSpeakableStringResolutionResult bound -!unknown-type! INStartAudioCallIntent bound -!unknown-type! INStartAudioCallIntentResponse bound -!unknown-type! INStartVideoCallIntent bound -!unknown-type! INStartVideoCallIntentResponse bound -!unknown-type! INStringResolutionResult bound - -## Xcode 11.4 b1 -!unknown-field! INPersonHandleLabelHome bound -!unknown-field! INPersonHandleLabelHomeFax bound -!unknown-field! INPersonHandleLabeliPhone bound -!unknown-field! INPersonHandleLabelMain bound -!unknown-field! INPersonHandleLabelMobile bound -!unknown-field! INPersonHandleLabelOther bound -!unknown-field! INPersonHandleLabelPager bound -!unknown-field! INPersonHandleLabelWork bound -!unknown-field! INPersonHandleLabelWorkFax bound -!unknown-field! INPersonRelationshipAssistant bound -!unknown-field! INPersonRelationshipBrother bound -!unknown-field! INPersonRelationshipChild bound -!unknown-field! INPersonRelationshipFather bound -!unknown-field! INPersonRelationshipFriend bound -!unknown-field! INPersonRelationshipManager bound -!unknown-field! INPersonRelationshipMother bound -!unknown-field! INPersonRelationshipParent bound -!unknown-field! INPersonRelationshipPartner bound -!unknown-field! INPersonRelationshipSister bound -!unknown-field! INPersonRelationshipSpouse bound - diff --git a/tests/xtro-sharpie/macOS-MapKit.ignore b/tests/xtro-sharpie/macOS-MapKit.ignore index 6f0ab23d236f..95b7bb95d297 100644 --- a/tests/xtro-sharpie/macOS-MapKit.ignore +++ b/tests/xtro-sharpie/macOS-MapKit.ignore @@ -1,8 +1,6 @@ !missing-field! MKAnnotationCalloutInfoDidChangeNotification not bound !missing-protocol-conformance! MKUserLocation should conform to MKAnnotation !missing-protocol-member! MKOverlay::coordinate not found -!unknown-native-enum! MKFeatureVisibility bound -!unknown-native-enum! MKUserTrackingMode bound # Initial result from new rule extra-null-allowed !extra-null-allowed! 'System.Boolean MapKit.MKMapItem::_OpenMaps(MapKit.MKMapItem[],Foundation.NSDictionary)' has a extraneous [NullAllowed] on parameter #0 diff --git a/tests/xtro-sharpie/macOS-MediaPlayer.ignore b/tests/xtro-sharpie/macOS-MediaPlayer.ignore index 9d7c4e27cd0b..4b1e1793ca2d 100644 --- a/tests/xtro-sharpie/macOS-MediaPlayer.ignore +++ b/tests/xtro-sharpie/macOS-MediaPlayer.ignore @@ -1,6 +1,11 @@ ## deprecated in iOS 10, not on macOS !missing-selector! MPMediaItemArtwork::imageCropRect not bound +## protocol without availability - the only member is marked as not available to macOS +!missing-protocol! MPSystemMusicPlayerController not bound + +## field added in xcode 12 b1 - but not marked as available on macOS and already deprecated on iOS +!missing-field! MPMediaPlaybackIsPreparedToPlayDidChangeNotification not bound ## unsorted diff --git a/tests/xtro-sharpie/macOS-Metal.ignore b/tests/xtro-sharpie/macOS-Metal.ignore index f71598c63805..9f85ae5099a9 100644 --- a/tests/xtro-sharpie/macOS-Metal.ignore +++ b/tests/xtro-sharpie/macOS-Metal.ignore @@ -118,3 +118,78 @@ !missing-null-allowed! 'System.Void Metal.MTLRenderPipelineDescriptor::set_VertexDescriptor(Metal.MTLVertexDescriptor)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void Metal.MTLSamplerDescriptor::set_Label(System.String)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void Metal.MTLVertexBufferLayoutDescriptorArray::SetObject(Metal.MTLVertexBufferLayoutDescriptor,System.nuint)' is missing an [NullAllowed] on parameter #0 + +# new methods added to a protocol, they will be abstract in XAMCORE_4 +!incorrect-protocol-member! MTLArgumentEncoder::setAccelerationStructure:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setComputePipelineState:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setComputePipelineStates:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setIntersectionFunctionTable:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setIntersectionFunctionTables:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setVisibleFunctionTable:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setVisibleFunctionTables:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::setAccelerationStructure:atBufferIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::setImageblockWidth:height: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::setIntersectionFunctionTable:atBufferIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::setIntersectionFunctionTables:withBufferRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::setVisibleFunctionTable:atBufferIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::setVisibleFunctionTables:withBufferRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::accelerationStructureSizesWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newAccelerationStructureWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newAccelerationStructureWithSize: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newBinaryArchiveWithDescriptor:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newDynamicLibrary:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newDynamicLibraryWithURL:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newRenderPipelineStateWithTileDescriptor:options:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newRenderPipelineStateWithTileDescriptor:options:reflection:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::sparseTileSizeInBytes is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::sparseTileSizeWithTextureType:pixelFormat:sampleCount: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supports32BitFloatFiltering is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supports32BitMSAA is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsBCTextureCompression is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsCounterSampling: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsDynamicLibraries is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsFunctionPointers is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsPullModelInterpolation is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsRaytracing is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::installName is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::newFunctionWithDescriptor:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::newFunctionWithDescriptor:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::newIntersectionFunctionWithDescriptor:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::newIntersectionFunctionWithDescriptor:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::type is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::accelerationStructureCommandEncoder is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::blitCommandEncoderWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::computeCommandEncoderWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::errorOptions is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::logs is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::resourceStateCommandEncoder is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::resourceStateCommandEncoderWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandQueue::commandBufferWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::functionHandleWithFunction: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::imageblockMemoryLengthForDimensions: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::newComputePipelineStateWithAdditionalBinaryFunctions:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::newIntersectionFunctionTableWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::newVisibleFunctionTableWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::supportIndirectCommandBuffers is REQUIRED and should be abstract +!incorrect-protocol-member! MTLFunction::options is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::dispatchThreadsPerTile: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setThreadgroupMemoryLength:offset:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setTileBuffer:offset:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setTileBufferOffset:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setTileBuffers:offsets:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setTileBytes:length:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setTileSamplerState:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setTileSamplerStates:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setTileTexture:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setTileTextures:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::tileHeight is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::tileWidth is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsQueryTextureLOD is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderPipelineState::imageblockMemoryLengthForDimensions: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderPipelineState::imageblockSampleLength is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderPipelineState::maxTotalThreadsPerThreadgroup is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderPipelineState::threadgroupSizeMatchesTileSize is REQUIRED and should be abstract +!incorrect-protocol-member! MTLIndirectComputeCommand::setImageblockWidth:height: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::isRemovable is REQUIRED and should be abstract diff --git a/tests/xtro-sharpie/macOS-Metal.todo b/tests/xtro-sharpie/macOS-Metal.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/macOS-MetalPerformanceShaders.todo b/tests/xtro-sharpie/macOS-MetalPerformanceShaders.todo index 450132f6c908..78c7e8a6b203 100644 --- a/tests/xtro-sharpie/macOS-MetalPerformanceShaders.todo +++ b/tests/xtro-sharpie/macOS-MetalPerformanceShaders.todo @@ -8,6 +8,7 @@ !missing-protocol-conformance! MPSCNNBatchNormalizationNode should conform to MPSNNTrainableNode !missing-protocol-conformance! MPSCNNConvolutionNode should conform to MPSNNTrainableNode !missing-protocol-conformance! MPSCNNInstanceNormalizationNode should conform to MPSNNTrainableNode +!missing-protocol-member! MPSCNNConvolutionDataSource::kernelWeightsDataType not found !missing-protocol-member! MPSCNNConvolutionDataSource::weightsLayout not found !missing-protocol-member! MPSCNNInstanceNormalizationDataSource::load not found !missing-protocol-member! MPSCNNInstanceNormalizationDataSource::purge not found @@ -16,6 +17,8 @@ !missing-selector! +MPSCNNGroupNormalizationGradientNode::nodeWithSourceGradient:sourceImage:gradientState: not bound !missing-selector! +MPSCNNGroupNormalizationNode::nodeWithSource:dataSource: not bound !missing-selector! +MPSCNNNeuronGeLUNode::nodeWithSource: not bound +!missing-selector! +MPSMatrixRandomDistributionDescriptor::normalDistributionDescriptorWithMean:standardDeviation: not bound +!missing-selector! +MPSMatrixRandomDistributionDescriptor::normalDistributionDescriptorWithMean:standardDeviation:minimum:maximum: not bound !missing-selector! +MPSNDArrayDescriptor::descriptorWithDataType:dimensionSizes: not bound !missing-selector! +MPSNNGramMatrixCalculationGradientNode::nodeWithSourceGradient:sourceImage:gradientState: not bound !missing-selector! +MPSNNGramMatrixCalculationGradientNode::nodeWithSourceGradient:sourceImage:gradientState:alpha: not bound @@ -81,6 +84,9 @@ !missing-selector! MPSCNNInstanceNormalizationNode::trainingStyle not bound !missing-selector! MPSCNNKernel::batchEncodingStorageSizeForSourceImage:sourceStates:destinationImage: not bound !missing-selector! MPSCNNKernel::encodingStorageSizeForSourceImage:sourceStates:destinationImage: not bound +!missing-selector! MPSCNNLoss::reduceAcrossBatch not bound +!missing-selector! MPSCNNLossDescriptor::reduceAcrossBatch not bound +!missing-selector! MPSCNNLossDescriptor::setReduceAcrossBatch: not bound !missing-selector! MPSCNNLossLabels::initWithDevice:lossImageSize:labelsImage:weightsImage: not bound !missing-selector! MPSCNNMultiaryKernel::appendBatchBarrier not bound !missing-selector! MPSCNNMultiaryKernel::clipRect not bound @@ -129,6 +135,42 @@ !missing-selector! MPSCNNMultiaryKernel::temporaryResultStateBatchForCommandBuffer:sourceImages:sourceStates:destinationImage: not bound !missing-selector! MPSCNNMultiaryKernel::temporaryResultStateForCommandBuffer:sourceImages:sourceStates:destinationImage: not bound !missing-selector! MPSCNNNeuronGeLUNode::initWithSource: not bound +!missing-selector! MPSCNNYOLOLoss::reduceAcrossBatch not bound +!missing-selector! MPSCNNYOLOLossDescriptor::reduceAcrossBatch not bound +!missing-selector! MPSCNNYOLOLossDescriptor::setReduceAcrossBatch: not bound +!missing-selector! MPSImageCanny::colorTransform not bound +!missing-selector! MPSImageCanny::highThreshold not bound +!missing-selector! MPSImageCanny::initWithCoder:device: not bound +!missing-selector! MPSImageCanny::initWithDevice: not bound +!missing-selector! MPSImageCanny::initWithDevice:linearToGrayScaleTransform:sigma: not bound +!missing-selector! MPSImageCanny::lowThreshold not bound +!missing-selector! MPSImageCanny::setHighThreshold: not bound +!missing-selector! MPSImageCanny::setLowThreshold: not bound +!missing-selector! MPSImageCanny::setUseFastMode: not bound +!missing-selector! MPSImageCanny::sigma not bound +!missing-selector! MPSImageCanny::useFastMode not bound +!missing-selector! MPSImageEDLines::clipRectSource not bound +!missing-selector! MPSImageEDLines::detailRatio not bound +!missing-selector! MPSImageEDLines::encodeToCommandBuffer:sourceTexture:destinationTexture:endpointBuffer:endpointOffset: not bound +!missing-selector! MPSImageEDLines::gaussianSigma not bound +!missing-selector! MPSImageEDLines::gradientThreshold not bound +!missing-selector! MPSImageEDLines::initWithCoder:device: not bound +!missing-selector! MPSImageEDLines::initWithDevice:gaussianSigma:minLineLength:maxLines:detailRatio:gradientThreshold:lineErrorThreshold:mergeLocalityThreshold: not bound +!missing-selector! MPSImageEDLines::lineErrorThreshold not bound +!missing-selector! MPSImageEDLines::maxLines not bound +!missing-selector! MPSImageEDLines::mergeLocalityThreshold not bound +!missing-selector! MPSImageEDLines::minLineLength not bound +!missing-selector! MPSImageEDLines::setClipRectSource: not bound +!missing-selector! MPSImageEDLines::setDetailRatio: not bound +!missing-selector! MPSImageEDLines::setGradientThreshold: not bound +!missing-selector! MPSImageEDLines::setLineErrorThreshold: not bound +!missing-selector! MPSImageEDLines::setMaxLines: not bound +!missing-selector! MPSImageEDLines::setMergeLocalityThreshold: not bound +!missing-selector! MPSImageEDLines::setMinLineLength: not bound +!missing-selector! MPSImageEuclideanDistanceTransform::searchLimitRadius not bound +!missing-selector! MPSImageEuclideanDistanceTransform::setSearchLimitRadius: not bound +!missing-selector! MPSImageGuidedFilter::encodeReconstructionToCommandBuffer:guidanceTexture:coefficientsTextureA:coefficientsTextureB:destinationTexture: not bound +!missing-selector! MPSImageGuidedFilter::encodeRegressionToCommandBuffer:sourceTexture:guidanceTexture:weightsTexture:destinationCoefficientsTextureA:destinationCoefficientsTextureB: not bound !missing-selector! MPSMatrixSum::resultMatrixOrigin not bound !missing-selector! MPSMatrixSum::setResultMatrixOrigin: not bound !missing-selector! MPSNDArrayBinaryKernel::encodeToCommandBuffer:primarySourceArray:secondarySourceArray: not bound @@ -211,12 +253,14 @@ !missing-selector! MPSNNForwardLoss::labelSmoothing not bound !missing-selector! MPSNNForwardLoss::lossType not bound !missing-selector! MPSNNForwardLoss::numberOfClasses not bound +!missing-selector! MPSNNForwardLoss::reduceAcrossBatch not bound !missing-selector! MPSNNForwardLoss::reductionType not bound !missing-selector! MPSNNForwardLoss::setDelta: not bound !missing-selector! MPSNNForwardLoss::setEpsilon: not bound !missing-selector! MPSNNForwardLoss::setLabelSmoothing: not bound !missing-selector! MPSNNForwardLoss::setWeight: not bound !missing-selector! MPSNNForwardLoss::weight not bound +!missing-selector! MPSNNForwardLossNode::reduceAcrossBatch not bound !missing-selector! MPSNNGramMatrixCalculation::alpha not bound !missing-selector! MPSNNGramMatrixCalculation::initWithCoder:device: not bound !missing-selector! MPSNNGramMatrixCalculation::initWithDevice: not bound @@ -261,6 +305,7 @@ !missing-selector! MPSNNLossGradient::labelSmoothing not bound !missing-selector! MPSNNLossGradient::lossType not bound !missing-selector! MPSNNLossGradient::numberOfClasses not bound +!missing-selector! MPSNNLossGradient::reduceAcrossBatch not bound !missing-selector! MPSNNLossGradient::reductionType not bound !missing-selector! MPSNNLossGradient::setComputeLabelGradients: not bound !missing-selector! MPSNNLossGradient::setDelta: not bound @@ -268,6 +313,7 @@ !missing-selector! MPSNNLossGradient::setLabelSmoothing: not bound !missing-selector! MPSNNLossGradient::setWeight: not bound !missing-selector! MPSNNLossGradient::weight not bound +!missing-selector! MPSNNLossGradientNode::reduceAcrossBatch not bound !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:batchNormalizationGradientState:batchNormalizationSourceState:inputMomentumVectors:inputVelocityVectors:maximumVelocityVectors:resultState: not bound !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:batchNormalizationState:inputMomentumVectors:inputVelocityVectors:maximumVelocityVectors:resultState: not bound !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:convolutionGradientState:convolutionSourceState:inputMomentumVectors:inputVelocityVectors:maximumVelocityVectors:resultState: not bound @@ -276,6 +322,8 @@ !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:inputGradientVector:inputValuesVector:inputMomentumVector:inputVelocityVector:maximumVelocityVector:resultValuesVector: not bound !missing-selector! MPSNNOptimizerRMSProp::encodeToCommandBuffer:inputGradientMatrix:inputValuesMatrix:inputSumOfSquaresMatrix:resultValuesMatrix: not bound !missing-selector! MPSNNOptimizerStochasticGradientDescent::encodeToCommandBuffer:inputGradientMatrix:inputValuesMatrix:inputMomentumMatrix:resultValuesMatrix: not bound +!missing-selector! MPSNNOptimizerStochasticGradientDescent::initWithDevice:momentumScale:useNesterovMomentum:optimizerDescriptor: not bound +!missing-selector! MPSNNOptimizerStochasticGradientDescent::useNesterovMomentum not bound !missing-selector! MPSNNReduceColumnMax::initWithCoder:device: not bound !missing-selector! MPSNNReduceColumnMean::initWithCoder:device: not bound !missing-selector! MPSNNReduceColumnMin::initWithCoder:device: not bound @@ -292,6 +340,10 @@ !missing-selector! MPSNNReduceRowMean::initWithCoder:device: not bound !missing-selector! MPSNNReduceRowMin::initWithCoder:device: not bound !missing-selector! MPSNNReduceRowSum::initWithCoder:device: not bound +!missing-selector! MPSNNReshape::encodeBatchToCommandBuffer:sourceImages:destinationStates:destinationStateIsTemporary:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound +!missing-selector! MPSNNReshape::encodeBatchToCommandBuffer:sourceImages:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound +!missing-selector! MPSNNReshape::encodeToCommandBuffer:sourceImage:destinationState:destinationStateIsTemporary:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound +!missing-selector! MPSNNReshape::encodeToCommandBuffer:sourceImage:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound !missing-selector! MPSPolygonAccelerationStructure::indexBuffer not bound !missing-selector! MPSPolygonAccelerationStructure::indexBufferOffset not bound !missing-selector! MPSPolygonAccelerationStructure::indexType not bound @@ -417,6 +469,8 @@ !missing-type! MPSCNNGroupNormalizationNode not bound !missing-type! MPSCNNMultiaryKernel not bound !missing-type! MPSCNNNeuronGeLUNode not bound +!missing-type! MPSImageCanny not bound +!missing-type! MPSImageEDLines not bound !missing-type! MPSNDArrayBinaryKernel not bound !missing-type! MPSNDArrayBinaryPrimaryGradientKernel not bound !missing-type! MPSNDArrayBinarySecondaryGradientKernel not bound @@ -452,7 +506,3 @@ !missing-type! MPSTemporalAA not bound !unknown-simd-type-mapping! The Simd type vector_uchar16 does not have a mapping to a managed type. Please add one in SimdCheck.cs !wrong-base-type! MPSTriangleAccelerationStructure expected MPSPolygonAccelerationStructure actual MPSAccelerationStructure - -## Xcode 11.4 b1 -!missing-selector! MPSImageGuidedFilter::encodeReconstructionToCommandBuffer:guidanceTexture:coefficientsTextureA:coefficientsTextureB:destinationTexture: not bound -!missing-selector! MPSImageGuidedFilter::encodeRegressionToCommandBuffer:sourceTexture:guidanceTexture:weightsTexture:destinationCoefficientsTextureA:destinationCoefficientsTextureB: not bound diff --git a/tests/xtro-sharpie/macOS-MetalPerformanceShadersGraph.todo b/tests/xtro-sharpie/macOS-MetalPerformanceShadersGraph.todo new file mode 100644 index 000000000000..68f4c392809b --- /dev/null +++ b/tests/xtro-sharpie/macOS-MetalPerformanceShadersGraph.todo @@ -0,0 +1,276 @@ +!missing-enum! MPSGraphDeviceType not bound +!missing-enum! MPSGraphLossReductionType not bound +!missing-enum! MPSGraphOptions not bound +!missing-enum! MPSGraphPaddingMode not bound +!missing-enum! MPSGraphPaddingStyle not bound +!missing-enum! MPSGraphResizeMode not bound +!missing-enum! MPSGraphTensorNamedDataLayout not bound +!missing-selector! +MPSGraphConvolution2DOpDescriptor::descriptorWithStrideInX:strideInY:dilationRateInX:dilationRateInY:groups:paddingLeft:paddingRight:paddingTop:paddingBottom:paddingStyle:dataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphConvolution2DOpDescriptor::descriptorWithStrideInX:strideInY:dilationRateInX:dilationRateInY:groups:paddingStyle:dataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphDepthwiseConvolution2DOpDescriptor::descriptorWithDataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphDepthwiseConvolution2DOpDescriptor::descriptorWithStrideInX:strideInY:dilationRateInX:dilationRateInY:paddingLeft:paddingRight:paddingTop:paddingBottom:paddingStyle:dataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphDevice::deviceWithMTLDevice: not bound +!missing-selector! +MPSGraphPooling2DOpDescriptor::descriptorWithKernelWidth:kernelHeight:strideInX:strideInY:dilationRateInX:dilationRateInY:paddingLeft:paddingRight:paddingTop:paddingBottom:paddingStyle:dataLayout: not bound +!missing-selector! +MPSGraphPooling2DOpDescriptor::descriptorWithKernelWidth:kernelHeight:strideInX:strideInY:paddingStyle:dataLayout: not bound +!missing-selector! MPSGraph::absoluteWithTensor:name: not bound +!missing-selector! MPSGraph::acoshWithTensor:name: not bound +!missing-selector! MPSGraph::acosWithTensor:name: not bound +!missing-selector! MPSGraph::additionWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::applyStochasticGradientDescentWithLearningRateTensor:variable:gradientTensor:name: not bound +!missing-selector! MPSGraph::asinhWithTensor:name: not bound +!missing-selector! MPSGraph::asinWithTensor:name: not bound +!missing-selector! MPSGraph::assignVariable:withValueOfTensor:name: not bound +!missing-selector! MPSGraph::atan2WithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::atanhWithTensor:name: not bound +!missing-selector! MPSGraph::atanWithTensor:name: not bound +!missing-selector! MPSGraph::avgPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::avgPooling2DWithSourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::ceilWithTensor:name: not bound +!missing-selector! MPSGraph::clampWithTensor:minValueTensor:maxValueTensor:name: not bound +!missing-selector! MPSGraph::concatTensor:withTensor:dimension:name: not bound +!missing-selector! MPSGraph::concatTensors:dimension:name: not bound +!missing-selector! MPSGraph::constantWithData:shape:dataType: not bound +!missing-selector! MPSGraph::constantWithScalar:shape:dataType: not bound +!missing-selector! MPSGraph::convolution2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolution2DWeightsGradientWithIncomingGradientTensor:sourceTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolution2DWithSourceTensor:weightsTensor:descriptor:name: not bound +!missing-selector! MPSGraph::convolutionTranspose2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolutionTranspose2DWeightsGradientWithIncomingGradientTensor:sourceTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolutionTranspose2DWithSourceTensor:weightsTensor:outputShape:descriptor:name: not bound +!missing-selector! MPSGraph::coshWithTensor:name: not bound +!missing-selector! MPSGraph::cosWithTensor:name: not bound +!missing-selector! MPSGraph::depthwiseConvolution2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:descriptor:name: not bound +!missing-selector! MPSGraph::depthwiseConvolution2DWeightsGradientWithIncomingGradientTensor:sourceTensor:outputShape:descriptor:name: not bound +!missing-selector! MPSGraph::depthwiseConvolution2DWithSourceTensor:weightsTensor:descriptor:name: not bound +!missing-selector! MPSGraph::divisionNoNaNWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::divisionWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::dropoutTensor:rate:name: not bound +!missing-selector! MPSGraph::dropoutTensor:rateTensor:name: not bound +!missing-selector! MPSGraph::encodeToCommandBuffer:feeds:targetOperations:resultsDictionary:executionDescriptor: not bound +!missing-selector! MPSGraph::encodeToCommandBuffer:feeds:targetTensors:targetOperations:executionDescriptor: not bound +!missing-selector! MPSGraph::equalWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::erfWithTensor:name: not bound +!missing-selector! MPSGraph::exponentBase10WithTensor:name: not bound +!missing-selector! MPSGraph::exponentBase2WithTensor:name: not bound +!missing-selector! MPSGraph::exponentWithTensor:name: not bound +!missing-selector! MPSGraph::floorModuloWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::floorWithTensor:name: not bound +!missing-selector! MPSGraph::gatherNDWithUpdatesTensor:indicesTensor:batchDimensions:name: not bound +!missing-selector! MPSGraph::gatherWithUpdatesTensor:indicesTensor:axis:batchDimensions:name: not bound +!missing-selector! MPSGraph::gradientForPrimaryTensor:withTensors:name: not bound +!missing-selector! MPSGraph::greaterThanOrEqualToWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::greaterThanWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::identityWithTensor:name: not bound +!missing-selector! MPSGraph::init not bound +!missing-selector! MPSGraph::isFiniteWithTensor:name: not bound +!missing-selector! MPSGraph::isInfiniteWithTensor:name: not bound +!missing-selector! MPSGraph::isNaNWithTensor:name: not bound +!missing-selector! MPSGraph::lessThanOrEqualToWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::lessThanWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logarithmBase10WithTensor:name: not bound +!missing-selector! MPSGraph::logarithmBase2WithTensor:name: not bound +!missing-selector! MPSGraph::logarithmWithTensor:name: not bound +!missing-selector! MPSGraph::logicalANDWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalNANDWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalNORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalXNORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalXORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::matrixMultiplicationWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::maximumWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::maxPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::maxPooling2DWithSourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::meanOfTensor:axes:name: not bound +!missing-selector! MPSGraph::minimumWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::moduloWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::multiplicationWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::negativeWithTensor:name: not bound +!missing-selector! MPSGraph::normalizationBetaGradientWithIncomingGradientTensor:sourceTensor:reductionAxes:name: not bound +!missing-selector! MPSGraph::normalizationGammaGradientWithIncomingGradientTensor:sourceTensor:meanTensor:varianceTensor:reductionAxes:epsilon:name: not bound +!missing-selector! MPSGraph::normalizationGradientWithIncomingGradientTensor:sourceTensor:meanTensor:varianceTensor:gammaTensor:gammaGradientTensor:betaGradientTensor:reductionAxes:epsilon:name: not bound +!missing-selector! MPSGraph::normalizationWithTensor:meanTensor:varianceTensor:gammaTensor:betaTensor:epsilon:name: not bound +!missing-selector! MPSGraph::notEqualWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::notWithTensor:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:axis:dataType:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:axis:dataType:onValue:offValue:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:axis:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:dataType:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:dataType:onValue:offValue:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:name: not bound +!missing-selector! MPSGraph::options not bound +!missing-selector! MPSGraph::padGradientWithIncomingGradientTensor:sourceTensor:paddingMode:leftPadding:rightPadding:name: not bound +!missing-selector! MPSGraph::padTensor:withPaddingMode:leftPadding:rightPadding:constantValue:name: not bound +!missing-selector! MPSGraph::placeholderTensors not bound +!missing-selector! MPSGraph::placeholderWithShape:dataType:name: not bound +!missing-selector! MPSGraph::placeholderWithShape:name: not bound +!missing-selector! MPSGraph::powerWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::readVariable:name: not bound +!missing-selector! MPSGraph::reciprocalWithTensor:name: not bound +!missing-selector! MPSGraph::reductionMaximumWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionMaximumWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reductionMinimumWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionMinimumWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reductionProductWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionProductWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reductionSumWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionSumWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reLUGradientWithIncomingGradient:sourceTensor:name: not bound +!missing-selector! MPSGraph::reLUWithTensor:name: not bound +!missing-selector! MPSGraph::reshapeTensor:withShape:name: not bound +!missing-selector! MPSGraph::resizeTensor:size:mode:centerResult:alignCorners:layout:name: not bound +!missing-selector! MPSGraph::resizeWithGradientTensor:input:mode:centerResult:alignCorners:layout:name: not bound +!missing-selector! MPSGraph::reverseSquareRootWithTensor:name: not bound +!missing-selector! MPSGraph::rintWithTensor:name: not bound +!missing-selector! MPSGraph::roundWithTensor:name: not bound +!missing-selector! MPSGraph::runAsyncWithFeeds:targetTensors:targetOperations:executionDescriptor: not bound +!missing-selector! MPSGraph::runAsyncWithMTLCommandQueue:feeds:targetOperations:resultsDictionary:executionDescriptor: not bound +!missing-selector! MPSGraph::runAsyncWithMTLCommandQueue:feeds:targetTensors:targetOperations:executionDescriptor: not bound +!missing-selector! MPSGraph::runWithFeeds:targetTensors:targetOperations: not bound +!missing-selector! MPSGraph::runWithMTLCommandQueue:feeds:targetOperations:resultsDictionary: not bound +!missing-selector! MPSGraph::runWithMTLCommandQueue:feeds:targetTensors:targetOperations: not bound +!missing-selector! MPSGraph::scatterNDWithUpdatesTensor:indicesTensor:shape:batchDimensions:name: not bound +!missing-selector! MPSGraph::selectWithPredicateTensor:truePredicateTensor:falsePredicateTensor:name: not bound +!missing-selector! MPSGraph::setOptions: not bound +!missing-selector! MPSGraph::sigmoidGradientWithIncomingGradient:sourceTensor:name: not bound +!missing-selector! MPSGraph::sigmoidWithTensor:name: not bound +!missing-selector! MPSGraph::signbitWithTensor:name: not bound +!missing-selector! MPSGraph::signWithTensor:name: not bound +!missing-selector! MPSGraph::sinhWithTensor:name: not bound +!missing-selector! MPSGraph::sinWithTensor:name: not bound +!missing-selector! MPSGraph::sliceTensor:dimension:start:length:name: not bound +!missing-selector! MPSGraph::softMaxCrossEntropyGradientWithIncomingGradientTensor:sourceTensor:labelsTensor:axis:reductionType:name: not bound +!missing-selector! MPSGraph::softMaxCrossEntropyWithSourceTensor:labelsTensor:axis:reductionType:name: not bound +!missing-selector! MPSGraph::softMaxGradientWithIncomingGradient:sourceTensor:axis:name: not bound +!missing-selector! MPSGraph::softMaxWithTensor:axis:name: not bound +!missing-selector! MPSGraph::squareRootWithTensor:name: not bound +!missing-selector! MPSGraph::squareWithTensor:name: not bound +!missing-selector! MPSGraph::stochasticGradientDescentWithLearningRateTensor:valuesTensor:gradientTensor:name: not bound +!missing-selector! MPSGraph::subtractionWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::tanhWithTensor:name: not bound +!missing-selector! MPSGraph::tanWithTensor:name: not bound +!missing-selector! MPSGraph::tileGradientWithIncomingGradientTensor:sourceTensor:withMultiplier:name: not bound +!missing-selector! MPSGraph::tileTensor:withMultiplier:name: not bound +!missing-selector! MPSGraph::transposeTensor:dimension:withDimension:name: not bound +!missing-selector! MPSGraph::variableWithData:shape:dataType:name: not bound +!missing-selector! MPSGraph::varianceOfTensor:axes:name: not bound +!missing-selector! MPSGraph::varianceOfTensor:meanTensor:axes:name: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::dataLayout not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::dilationRateInX not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::dilationRateInY not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::groups not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingBottom not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingLeft not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingRight not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingStyle not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingTop not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setDataLayout: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setDilationRateInX: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setDilationRateInY: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setExplicitPaddingWithPaddingLeft:paddingRight:paddingTop:paddingBottom: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setGroups: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingBottom: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingLeft: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingRight: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingStyle: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingTop: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setStrideInX: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setStrideInY: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setWeightsLayout: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::strideInX not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::strideInY not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::weightsLayout not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::dataLayout not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::dilationRateInX not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::dilationRateInY not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingBottom not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingLeft not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingRight not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingStyle not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingTop not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setDataLayout: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setDilationRateInX: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setDilationRateInY: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setExplicitPaddingWithPaddingLeft:paddingRight:paddingTop:paddingBottom: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingBottom: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingLeft: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingRight: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingStyle: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingTop: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setStrideInX: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setStrideInY: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setWeightsLayout: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::strideInX not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::strideInY not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::weightsLayout not bound +!missing-selector! MPSGraphDevice::metalDevice not bound +!missing-selector! MPSGraphDevice::type not bound +!missing-selector! MPSGraphExecutionDescriptor::completionHandler not bound +!missing-selector! MPSGraphExecutionDescriptor::scheduledHandler not bound +!missing-selector! MPSGraphExecutionDescriptor::setCompletionHandler: not bound +!missing-selector! MPSGraphExecutionDescriptor::setScheduledHandler: not bound +!missing-selector! MPSGraphExecutionDescriptor::setWaitUntilCompleted: not bound +!missing-selector! MPSGraphExecutionDescriptor::waitUntilCompleted not bound +!missing-selector! MPSGraphOperation::controlDependencies not bound +!missing-selector! MPSGraphOperation::graph not bound +!missing-selector! MPSGraphOperation::inputTensors not bound +!missing-selector! MPSGraphOperation::name not bound +!missing-selector! MPSGraphOperation::outputTensors not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::dataLayout not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::dilationRateInX not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::dilationRateInY not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::kernelHeight not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::kernelWidth not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingBottom not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingLeft not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingRight not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingStyle not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingTop not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setDataLayout: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setDilationRateInX: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setDilationRateInY: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setExplicitPaddingWithPaddingLeft:paddingRight:paddingTop:paddingBottom: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setKernelHeight: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setKernelWidth: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingBottom: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingLeft: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingRight: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingStyle: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingTop: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setStrideInX: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setStrideInY: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::strideInX not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::strideInY not bound +!missing-selector! MPSGraphShapedType::dataType not bound +!missing-selector! MPSGraphShapedType::initWithShape:dataType: not bound +!missing-selector! MPSGraphShapedType::isEqualTo: not bound +!missing-selector! MPSGraphShapedType::setDataType: not bound +!missing-selector! MPSGraphShapedType::setShape: not bound +!missing-selector! MPSGraphShapedType::shape not bound +!missing-selector! MPSGraphTensor::dataType not bound +!missing-selector! MPSGraphTensor::operation not bound +!missing-selector! MPSGraphTensor::shape not bound +!missing-selector! MPSGraphTensorData::dataType not bound +!missing-selector! MPSGraphTensorData::device not bound +!missing-selector! MPSGraphTensorData::initWithDevice:data:shape:dataType: not bound +!missing-selector! MPSGraphTensorData::initWithMPSImageBatch: not bound +!missing-selector! MPSGraphTensorData::initWithMPSMatrix: not bound +!missing-selector! MPSGraphTensorData::initWithMPSMatrix:rank: not bound +!missing-selector! MPSGraphTensorData::initWithMPSNDArray: not bound +!missing-selector! MPSGraphTensorData::initWithMPSVector: not bound +!missing-selector! MPSGraphTensorData::initWithMPSVector:rank: not bound +!missing-selector! MPSGraphTensorData::initWithMTLBuffer:shape:dataType: not bound +!missing-selector! MPSGraphTensorData::mpsndarray not bound +!missing-selector! MPSGraphTensorData::shape not bound +!missing-selector! MPSGraphVariableOp::dataType not bound +!missing-selector! MPSGraphVariableOp::shape not bound +!missing-type! MPSGraph not bound +!missing-type! MPSGraphConvolution2DOpDescriptor not bound +!missing-type! MPSGraphDepthwiseConvolution2DOpDescriptor not bound +!missing-type! MPSGraphDevice not bound +!missing-type! MPSGraphExecutionDescriptor not bound +!missing-type! MPSGraphOperation not bound +!missing-type! MPSGraphPooling2DOpDescriptor not bound +!missing-type! MPSGraphShapedType not bound +!missing-type! MPSGraphTensor not bound +!missing-type! MPSGraphTensorData not bound +!missing-type! MPSGraphVariableOp not bound diff --git a/tests/xtro-sharpie/macOS-NearbyInteraction.ignore b/tests/xtro-sharpie/macOS-NearbyInteraction.ignore new file mode 100644 index 000000000000..39e3525be604 --- /dev/null +++ b/tests/xtro-sharpie/macOS-NearbyInteraction.ignore @@ -0,0 +1,3 @@ +## not available on macOS as of Xcode12 beta 4 +!missing-enum! NIErrorCode not bound +!missing-enum! NINearbyObjectRemovalReason not bound diff --git a/tests/xtro-sharpie/macOS-Network.todo b/tests/xtro-sharpie/macOS-Network.todo new file mode 100644 index 000000000000..37648521d390 --- /dev/null +++ b/tests/xtro-sharpie/macOS-Network.todo @@ -0,0 +1,43 @@ +!missing-field! _nw_privacy_context_default_context not bound +!missing-pinvoke! nw_connection_group_cancel is not bound +!missing-pinvoke! nw_connection_group_copy_descriptor is not bound +!missing-pinvoke! nw_connection_group_copy_local_endpoint_for_message is not bound +!missing-pinvoke! nw_connection_group_copy_parameters is not bound +!missing-pinvoke! nw_connection_group_copy_path_for_message is not bound +!missing-pinvoke! nw_connection_group_copy_remote_endpoint_for_message is not bound +!missing-pinvoke! nw_connection_group_create is not bound +!missing-pinvoke! nw_connection_group_extract_connection_for_message is not bound +!missing-pinvoke! nw_connection_group_reply is not bound +!missing-pinvoke! nw_connection_group_send_message is not bound +!missing-pinvoke! nw_connection_group_set_queue is not bound +!missing-pinvoke! nw_connection_group_set_receive_handler is not bound +!missing-pinvoke! nw_connection_group_set_state_changed_handler is not bound +!missing-pinvoke! nw_connection_group_start is not bound +!missing-pinvoke! nw_establishment_report_enumerate_resolution_reports is not bound +!missing-pinvoke! nw_group_descriptor_add_endpoint is not bound +!missing-pinvoke! nw_group_descriptor_create_multicast is not bound +!missing-pinvoke! nw_group_descriptor_enumerate_endpoints is not bound +!missing-pinvoke! nw_ip_options_set_disable_multicast_loopback is not bound +!missing-pinvoke! nw_multicast_group_descriptor_get_disable_unicast_traffic is not bound +!missing-pinvoke! nw_multicast_group_descriptor_set_disable_unicast_traffic is not bound +!missing-pinvoke! nw_multicast_group_descriptor_set_specific_source is not bound +!missing-pinvoke! nw_parameters_set_privacy_context is not bound +!missing-pinvoke! nw_path_monitor_prohibit_interface_type is not bound +!missing-pinvoke! nw_privacy_context_create is not bound +!missing-pinvoke! nw_privacy_context_disable_logging is not bound +!missing-pinvoke! nw_privacy_context_flush_cache is not bound +!missing-pinvoke! nw_privacy_context_require_encrypted_name_resolution is not bound +!missing-pinvoke! nw_resolution_report_copy_preferred_endpoint is not bound +!missing-pinvoke! nw_resolution_report_copy_successful_endpoint is not bound +!missing-pinvoke! nw_resolution_report_get_endpoint_count is not bound +!missing-pinvoke! nw_resolution_report_get_milliseconds is not bound +!missing-pinvoke! nw_resolution_report_get_protocol is not bound +!missing-pinvoke! nw_resolution_report_get_source is not bound +!missing-pinvoke! nw_resolver_config_add_server_address is not bound +!missing-pinvoke! nw_resolver_config_create_https is not bound +!missing-pinvoke! nw_resolver_config_create_tls is not bound +!missing-protocol! OS_nw_connection_group not bound +!missing-protocol! OS_nw_group_descriptor not bound +!missing-protocol! OS_nw_privacy_context not bound +!missing-protocol! OS_nw_resolution_report not bound +!missing-protocol! OS_nw_resolver_config not bound diff --git a/tests/xtro-sharpie/macOS-NetworkExtension.todo b/tests/xtro-sharpie/macOS-NetworkExtension.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/macOS-OSLog.todo b/tests/xtro-sharpie/macOS-OSLog.ignore similarity index 92% rename from tests/xtro-sharpie/macOS-OSLog.todo rename to tests/xtro-sharpie/macOS-OSLog.ignore index b3aab1ecf8b9..e97cb97869a4 100644 --- a/tests/xtro-sharpie/macOS-OSLog.todo +++ b/tests/xtro-sharpie/macOS-OSLog.ignore @@ -1,11 +1,15 @@ +## Will save these bindings for later - https://github.com/xamarin/xamarin-macios/issues/9480 + !missing-enum! OSLogEntryLogLevel not bound !missing-enum! OSLogEntrySignpostType not bound !missing-enum! OSLogEntryStoreCategory not bound !missing-enum! OSLogEnumeratorOptions not bound !missing-enum! OSLogMessageComponentArgumentCategory not bound +!missing-enum! OSLogStoreScope not bound !missing-protocol! OSLogEntryFromProcess not bound !missing-protocol! OSLogEntryWithPayload not bound !missing-selector! +OSLogStore::localStoreAndReturnError: not bound +!missing-selector! +OSLogStore::storeWithScope:error: not bound !missing-selector! +OSLogStore::storeWithURL:error: not bound !missing-selector! OSLogEntry::composedMessage not bound !missing-selector! OSLogEntry::date not bound diff --git a/tests/xtro-sharpie/macOS-PDFKit.ignore b/tests/xtro-sharpie/macOS-PDFKit.ignore index 254902805dd8..1c9ef386e9bb 100644 --- a/tests/xtro-sharpie/macOS-PDFKit.ignore +++ b/tests/xtro-sharpie/macOS-PDFKit.ignore @@ -1,3 +1,41 @@ +# Deprecated +!missing-selector! PDFAnnotation::initWithDictionary:forPage: not bound +!missing-field! kPDFAnnotationKey_Action not bound +!missing-field! kPDFAnnotationKey_AdditionalActions not bound +!missing-field! kPDFAnnotationKey_AppearanceDictionary not bound +!missing-field! kPDFAnnotationKey_AppearanceState not bound +!missing-field! kPDFAnnotationKey_Border not bound +!missing-field! kPDFAnnotationKey_BorderStyle not bound +!missing-field! kPDFAnnotationKey_Color not bound +!missing-field! kPDFAnnotationKey_Contents not bound +!missing-field! kPDFAnnotationKey_Date not bound +!missing-field! kPDFAnnotationKey_DefaultAppearance not bound +!missing-field! kPDFAnnotationKey_Destination not bound +!missing-field! kPDFAnnotationKey_Flags not bound +!missing-field! kPDFAnnotationKey_HighlightingMode not bound +!missing-field! kPDFAnnotationKey_IconName not bound +!missing-field! kPDFAnnotationKey_Inklist not bound +!missing-field! kPDFAnnotationKey_InteriorColor not bound +!missing-field! kPDFAnnotationKey_LineEndingStyles not bound +!missing-field! kPDFAnnotationKey_LinePoints not bound +!missing-field! kPDFAnnotationKey_Name not bound +!missing-field! kPDFAnnotationKey_Open not bound +!missing-field! kPDFAnnotationKey_Page not bound +!missing-field! kPDFAnnotationKey_Parent not bound +!missing-field! kPDFAnnotationKey_Popup not bound +!missing-field! kPDFAnnotationKey_Quadding not bound +!missing-field! kPDFAnnotationKey_QuadPoints not bound +!missing-field! kPDFAnnotationKey_Rect not bound +!missing-field! kPDFAnnotationKey_Subtype not bound +!missing-field! kPDFAnnotationKey_TextLabel not bound +!missing-field! kPDFAnnotationKey_WidgetAppearanceDictionary not bound +!missing-field! kPDFAnnotationKey_WidgetDefaultValue not bound +!missing-field! kPDFAnnotationKey_WidgetFieldFlags not bound +!missing-field! kPDFAnnotationKey_WidgetFieldType not bound +!missing-field! kPDFAnnotationKey_WidgetMaxLen not bound +!missing-field! kPDFAnnotationKey_WidgetOptions not bound +!missing-field! kPDFAnnotationKey_WidgetTextLabelUI not bound +!missing-field! kPDFAnnotationKey_WidgetValue not bound # Initial result from new rule missing-null-allowed !missing-null-allowed! 'AppKit.NSView PdfKit.PdfView::get_DocumentView()' is missing an [NullAllowed] on return type diff --git a/tests/xtro-sharpie/macOS-PassKit.ignore b/tests/xtro-sharpie/macOS-PassKit.ignore new file mode 100644 index 000000000000..652a7af29f2e --- /dev/null +++ b/tests/xtro-sharpie/macOS-PassKit.ignore @@ -0,0 +1,40 @@ +## no point in adding API that are already deprecated to a new platform +!missing-field! PKPaymentNetworkCarteBancaire not bound +!missing-field! PKPaymentNetworkCarteBancaires not bound +!missing-protocol-member! PKPaymentAuthorizationControllerDelegate::paymentAuthorizationController:didAuthorizePayment:completion: not found +!missing-protocol-member! PKPaymentAuthorizationControllerDelegate::paymentAuthorizationController:didSelectPaymentMethod:completion: not found +!missing-protocol-member! PKPaymentAuthorizationControllerDelegate::paymentAuthorizationController:didSelectShippingContact:completion: not found +!missing-protocol-member! PKPaymentAuthorizationControllerDelegate::paymentAuthorizationController:didSelectShippingMethod:completion: not found +!missing-protocol-member! PKPaymentAuthorizationViewControllerDelegate::paymentAuthorizationViewController:didAuthorizePayment:completion: not found +!missing-protocol-member! PKPaymentAuthorizationViewControllerDelegate::paymentAuthorizationViewController:didSelectPaymentMethod:completion: not found +!missing-protocol-member! PKPaymentAuthorizationViewControllerDelegate::paymentAuthorizationViewController:didSelectShippingContact:completion: not found +!missing-protocol-member! PKPaymentAuthorizationViewControllerDelegate::paymentAuthorizationViewController:didSelectShippingMethod:completion: not found +!missing-selector! PKPass::paymentPass not bound +!missing-selector! PKPaymentMethod::paymentPass not bound +!missing-selector! PKPaymentPass::activationState not bound +!missing-selector! +PKPassLibrary::isPaymentPassActivationAvailable not bound +!missing-selector! PKContact::setSupplementarySubLocality: not bound +!missing-selector! PKContact::supplementarySubLocality not bound +!missing-selector! PKPassLibrary::activatePaymentPass:withActivationCode:completion: not bound +!missing-selector! PKPassLibrary::activatePaymentPass:withActivationData:completion: not bound +!missing-selector! PKPassLibrary::canAddPaymentPassWithPrimaryAccountIdentifier: not bound +!missing-selector! PKPassLibrary::isPaymentPassActivationAvailable not bound +!missing-selector! PKPassLibrary::presentPaymentPass: not bound +!missing-selector! PKPassLibrary::remotePaymentPasses not bound +!missing-selector! PKPaymentRequest::requiredBillingAddressFields not bound +!missing-selector! PKPaymentRequest::requiredShippingAddressFields not bound +!missing-selector! PKPaymentRequest::setRequiredBillingAddressFields: not bound +!missing-selector! PKPaymentRequest::setRequiredShippingAddressFields: not bound +!missing-selector! PKPaymentToken::paymentInstrumentName not bound +!missing-selector! PKPaymentToken::paymentNetwork not bound + +## enum only used in API not available on macOS +!missing-enum! PKAddressField not bound +!missing-enum! PKPaymentPassActivationState not bound +!missing-enum! PKDisbursementRequestSchedule not bound + +## all members are decorated but not the type themselves +!missing-protocol! PKDisbursementAuthorizationControllerDelegate not bound +!missing-type! PKDisbursementAuthorizationController not bound +!missing-type! PKDisbursementRequest not bound +!missing-type! PKDisbursementVoucher not bound diff --git a/tests/xtro-sharpie/macOS-SafariServices.ignore b/tests/xtro-sharpie/macOS-SafariServices.ignore index 18a1cdbc6534..fa10b60a0c5a 100644 --- a/tests/xtro-sharpie/macOS-SafariServices.ignore +++ b/tests/xtro-sharpie/macOS-SafariServices.ignore @@ -5,5 +5,8 @@ !missing-type! SFSafariExtensionManager not bound !missing-type! SFSafariExtensionState not bound +# xcode 12 - no doc, might be best located in unbound types +!missing-field! SFExtensionMessageKey not bound + ## it's present but it's unused and the [Obsolete] attribute skips it (so it's reported) !missing-enum! SFSafariServicesVersion not bound diff --git a/tests/xtro-sharpie/macOS-Security.ignore b/tests/xtro-sharpie/macOS-Security.ignore index 85086df7a5e1..841a88606134 100644 --- a/tests/xtro-sharpie/macOS-Security.ignore +++ b/tests/xtro-sharpie/macOS-Security.ignore @@ -4,6 +4,13 @@ !unknown-pinvoke! SecKeyRawSign bound !unknown-pinvoke! SecKeyRawVerify bound +## deprecated API (in 10.6, not sure why they appeared recently) +!missing-pinvoke! SecHostCreateGuest is not bound +!missing-pinvoke! SecHostRemoveGuest is not bound +!missing-pinvoke! SecHostSelectedGuest is not bound +!missing-pinvoke! SecHostSelectGuest is not bound +!missing-pinvoke! SecHostSetGuestStatus is not bound +!missing-pinvoke! SecHostSetHostingPort is not bound ## unsorted diff --git a/tests/xtro-sharpie/macOS-Security.todo b/tests/xtro-sharpie/macOS-Security.todo deleted file mode 100644 index 92de0e5707fa..000000000000 --- a/tests/xtro-sharpie/macOS-Security.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-pinvoke! SecHostCreateGuest is not bound -!missing-pinvoke! SecHostRemoveGuest is not bound -!missing-pinvoke! SecHostSelectedGuest is not bound -!missing-pinvoke! SecHostSelectGuest is not bound -!missing-pinvoke! SecHostSetGuestStatus is not bound -!missing-pinvoke! SecHostSetHostingPort is not bound diff --git a/tests/xtro-sharpie/macOS-StoreKit.ignore b/tests/xtro-sharpie/macOS-StoreKit.ignore index cfc84265f0af..f814f3e03218 100644 --- a/tests/xtro-sharpie/macOS-StoreKit.ignore +++ b/tests/xtro-sharpie/macOS-StoreKit.ignore @@ -1,7 +1,2 @@ # delegate do not mention macOS (as unavailable) but the non-delegate type is not (available) !missing-protocol! SKCloudServiceSetupViewControllerDelegate not bound -!missing-protocol! SKStoreProductViewControllerDelegate not bound - -# Fixed in XAMCORE_4_0 -!unknown-native-enum! SKCloudServiceAuthorizationStatus bound -!unknown-native-enum! SKCloudServiceCapability bound diff --git a/tests/xtro-sharpie/macOS-SystemExtensions.todo b/tests/xtro-sharpie/macOS-SystemExtensions.todo deleted file mode 100644 index 6af333ba0284..000000000000 --- a/tests/xtro-sharpie/macOS-SystemExtensions.todo +++ /dev/null @@ -1,21 +0,0 @@ -!missing-enum! OSSystemExtensionErrorCode not bound -!missing-enum! OSSystemExtensionReplacementAction not bound -!missing-enum! OSSystemExtensionRequestResult not bound -!missing-field! NSSystemExtensionUsageDescriptionKey not bound -!missing-field! OSBundleUsageDescriptionKey not bound -!missing-field! OSSystemExtensionErrorDomain not bound -!missing-protocol! OSSystemExtensionRequestDelegate not bound -!missing-selector! +OSSystemExtensionManager::sharedManager not bound -!missing-selector! +OSSystemExtensionRequest::activationRequestForExtension:queue: not bound -!missing-selector! +OSSystemExtensionRequest::deactivationRequestForExtension:queue: not bound -!missing-selector! OSSystemExtensionManager::submitRequest: not bound -!missing-selector! OSSystemExtensionProperties::bundleIdentifier not bound -!missing-selector! OSSystemExtensionProperties::bundleShortVersion not bound -!missing-selector! OSSystemExtensionProperties::bundleVersion not bound -!missing-selector! OSSystemExtensionProperties::URL not bound -!missing-selector! OSSystemExtensionRequest::delegate not bound -!missing-selector! OSSystemExtensionRequest::identifier not bound -!missing-selector! OSSystemExtensionRequest::setDelegate: not bound -!missing-type! OSSystemExtensionManager not bound -!missing-type! OSSystemExtensionProperties not bound -!missing-type! OSSystemExtensionRequest not bound diff --git a/tests/xtro-sharpie/tvOS-AVFoundation.todo b/tests/xtro-sharpie/tvOS-AVFoundation.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/tvOS-AuthenticationServices.todo b/tests/xtro-sharpie/tvOS-AuthenticationServices.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/tvOS-CloudKit.ignore b/tests/xtro-sharpie/tvOS-CloudKit.ignore index 1bc1df7b9bc8..c927fcbdcb08 100644 --- a/tests/xtro-sharpie/tvOS-CloudKit.ignore +++ b/tests/xtro-sharpie/tvOS-CloudKit.ignore @@ -2,21 +2,3 @@ ## In reality the selectors only answer in the simulator, not on AppleTV devices !missing-selector! CKContainer::fetchAllLongLivedOperationIDsWithCompletionHandler: not bound !missing-selector! CKContainer::fetchLongLivedOperationWithID:completionHandler: not bound - -## deprecated API -!missing-selector! CKContainer::discoverAllContactUserInfosWithCompletionHandler: not bound -!missing-selector! CKContainer::discoverUserInfoWithEmailAddress:completionHandler: not bound -!missing-selector! CKContainer::discoverUserInfoWithUserRecordID:completionHandler: not bound -!missing-selector! CKDiscoverUserInfosOperation::discoverUserInfosCompletionBlock not bound -!missing-selector! CKDiscoverUserInfosOperation::emailAddresses not bound -!missing-selector! CKDiscoverUserInfosOperation::init not bound -!missing-selector! CKDiscoverUserInfosOperation::initWithEmailAddresses:userRecordIDs: not bound -!missing-selector! CKDiscoverUserInfosOperation::setDiscoverUserInfosCompletionBlock: not bound -!missing-selector! CKDiscoverUserInfosOperation::setEmailAddresses: not bound -!missing-selector! CKDiscoverUserInfosOperation::setUserRecordIDs: not bound -!missing-selector! CKDiscoverUserInfosOperation::userRecordIDs not bound -!missing-selector! CKQueryNotification::isPublicDatabase not bound -!missing-selector! CKSubscription::initWithZoneID:options: not bound -!missing-selector! CKSubscription::initWithZoneID:subscriptionID:options: not bound -!missing-selector! CKSubscription::subscriptionOptions not bound -!missing-type! CKDiscoverUserInfosOperation not bound diff --git a/tests/xtro-sharpie/tvOS-CoreGraphics.todo b/tests/xtro-sharpie/tvOS-CoreGraphics.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/tvOS-CoreHaptics.ignore b/tests/xtro-sharpie/tvOS-CoreHaptics.ignore new file mode 100644 index 000000000000..0362888af68f --- /dev/null +++ b/tests/xtro-sharpie/tvOS-CoreHaptics.ignore @@ -0,0 +1,2 @@ +# AVFoundation is not present on tvOS issue: https://github.com/xamarin/maccore/issues/2261 +!missing-selector! CHHapticEngine::initWithAudioSession:error: not bound diff --git a/tests/xtro-sharpie/tvOS-CoreLocation.todo b/tests/xtro-sharpie/tvOS-CoreLocation.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/tvOS-CoreML.todo b/tests/xtro-sharpie/tvOS-CoreML.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/tvOS-GameKit.ignore b/tests/xtro-sharpie/tvOS-GameKit.ignore index 449463508dad..90c880f31395 100644 --- a/tests/xtro-sharpie/tvOS-GameKit.ignore +++ b/tests/xtro-sharpie/tvOS-GameKit.ignore @@ -16,3 +16,12 @@ !missing-null-allowed! 'System.String GameKit.GKPlayer::get_GuestIdentifier()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Void GameKit.GKGameSession::SendMessage(System.String,System.String[],Foundation.NSData,GameKit.GKCloudPlayer[],System.Boolean,System.Action`1)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'UIKit.UIImage GameKit.GKAchievementDescription::get_Image()' is missing an [NullAllowed] on return type + +# NS_DEPRECATED_IOS(7_0, 8_0, "This is never invoked and its implementation does nothing, pass GKPlayers to challengeComposeControllerWithMessage:players: instead") /*rb= GameKit.unavailableForTVOS*/; +# as a sideeffect these macros include tvOS, however by the time tvOS 9.0 was released this +# API was already deprecated +!missing-selector! GKAchievement::challengeComposeControllerWithPlayers:message:completionHandler: not bound +!missing-selector! GKScore::challengeComposeControllerWithPlayers:message:completionHandler: not bound + +# API removed by Apple, marked as deprecated +!unknown-native-enum! GKAuthenticationType bound diff --git a/tests/xtro-sharpie/tvOS-GameKit.todo b/tests/xtro-sharpie/tvOS-GameKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/tvOS-HomeKit.todo b/tests/xtro-sharpie/tvOS-HomeKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/tvOS-Intents.ignore b/tests/xtro-sharpie/tvOS-Intents.ignore new file mode 100644 index 000000000000..ba4764aa8e4c --- /dev/null +++ b/tests/xtro-sharpie/tvOS-Intents.ignore @@ -0,0 +1,7 @@ +## Marked as available but do not make sense at all to be on Apple TV +!missing-field! INSetMessageAttributeIntentIdentifier not bound +!missing-selector! INDateComponentsRange::EKRecurrenceRule not bound +!missing-selector! INDateComponentsRange::initWithEKRecurrenceRule: not bound +!missing-selector! INDateComponentsRange::initWithStartDateComponents:endDateComponents:recurrenceRule: not bound +!missing-selector! INDateComponentsRange::recurrenceRule not bound +!unknown-native-enum! INCallRecordType bound diff --git a/tests/xtro-sharpie/tvOS-IntentsUI.ignore b/tests/xtro-sharpie/tvOS-IntentsUI.ignore new file mode 100644 index 000000000000..5357b1f0ae3f --- /dev/null +++ b/tests/xtro-sharpie/tvOS-IntentsUI.ignore @@ -0,0 +1,9 @@ +## not exposed by our API (better use the OS version) +!missing-field! IntentsUIVersionNumber not bound +!missing-field! IntentsUIVersionString not bound + +# fails on intro rdar: https://github.com/xamarin/maccore/issues/2286 +!missing-selector! +INImage::imageSizeForIntentResponse: not bound +!missing-selector! +INImage::imageWithCGImage: not bound +!missing-selector! +INImage::imageWithUIImage: not bound +!missing-selector! INImage::fetchUIImageWithCompletion: not bound diff --git a/tests/xtro-sharpie/tvOS-MediaPlayer.ignore b/tests/xtro-sharpie/tvOS-MediaPlayer.ignore index 43df3bfd8238..00ff2321b7a7 100644 --- a/tests/xtro-sharpie/tvOS-MediaPlayer.ignore +++ b/tests/xtro-sharpie/tvOS-MediaPlayer.ignore @@ -3,9 +3,6 @@ !missing-selector! MPNowPlayingInfoCenter::playbackState not bound !missing-selector! MPNowPlayingInfoCenter::setPlaybackState: not bound -## MPMediaItem only exposed for fields, it's not really available -!unknown-type! MPMediaItem bound - ## marked as available in tvOS 11 but the member is not and using a type, MPMusicPlayerQueueDescriptor, that's not available !missing-protocol! MPSystemMusicPlayerController not bound @@ -14,8 +11,34 @@ !missing-field! MPMediaPlaylistPropertyAuthorDisplayName not bound !missing-field! MPMediaPlaylistPropertyDescriptionText not bound -# Initial result from new rule missing-null-allowed -!missing-null-allowed! 'Foundation.NSString MediaPlayer.NSUserActivity_MediaPlayerAdditions::GetExternalMediaContentIdentifier(Foundation.NSUserActivity)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.Void MediaPlayer.MPContentItem::set_Artwork(MediaPlayer.MPMediaItemArtwork)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void MediaPlayer.MPContentItem::set_Subtitle(System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void MediaPlayer.MPContentItem::set_Title(System.String)' is missing an [NullAllowed] on parameter #0 +## _added_ in xcode12 but already deprecated in iOS9 (likely error in headers) +!missing-field! MPMediaPlaybackIsPreparedToPlayDidChangeNotification not bound +!missing-field! MPMovieDurationAvailableNotification not bound +!missing-field! MPMovieMediaTypesAvailableNotification not bound +!missing-field! MPMovieNaturalSizeAvailableNotification not bound +!missing-field! MPMoviePlayerDidEnterFullscreenNotification not bound +!missing-field! MPMoviePlayerDidExitFullscreenNotification not bound +!missing-field! MPMoviePlayerFullscreenAnimationCurveUserInfoKey not bound +!missing-field! MPMoviePlayerFullscreenAnimationDurationUserInfoKey not bound +!missing-field! MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification not bound +!missing-field! MPMoviePlayerLoadStateDidChangeNotification not bound +!missing-field! MPMoviePlayerNowPlayingMovieDidChangeNotification not bound +!missing-field! MPMoviePlayerPlaybackDidFinishNotification not bound +!missing-field! MPMoviePlayerPlaybackDidFinishReasonUserInfoKey not bound +!missing-field! MPMoviePlayerPlaybackStateDidChangeNotification not bound +!missing-field! MPMoviePlayerReadyForDisplayDidChangeNotification not bound +!missing-field! MPMoviePlayerScalingModeDidChangeNotification not bound +!missing-field! MPMoviePlayerThumbnailErrorKey not bound +!missing-field! MPMoviePlayerThumbnailImageKey not bound +!missing-field! MPMoviePlayerThumbnailImageRequestDidFinishNotification not bound +!missing-field! MPMoviePlayerThumbnailTimeKey not bound +!missing-field! MPMoviePlayerTimedMetadataKeyDataType not bound +!missing-field! MPMoviePlayerTimedMetadataKeyInfo not bound +!missing-field! MPMoviePlayerTimedMetadataKeyLanguageCode not bound +!missing-field! MPMoviePlayerTimedMetadataKeyMIMEType not bound +!missing-field! MPMoviePlayerTimedMetadataKeyName not bound +!missing-field! MPMoviePlayerTimedMetadataUpdatedNotification not bound +!missing-field! MPMoviePlayerTimedMetadataUserInfoKey not bound +!missing-field! MPMoviePlayerWillEnterFullscreenNotification not bound +!missing-field! MPMoviePlayerWillExitFullscreenNotification not bound +!missing-field! MPMovieSourceTypeAvailableNotification not bound diff --git a/tests/xtro-sharpie/tvOS-Metal.ignore b/tests/xtro-sharpie/tvOS-Metal.ignore index 3e063f1e90df..1964cf0d475b 100644 --- a/tests/xtro-sharpie/tvOS-Metal.ignore +++ b/tests/xtro-sharpie/tvOS-Metal.ignore @@ -46,10 +46,6 @@ !missing-selector! MTLHeapDescriptor::setType: not bound !missing-selector! MTLHeapDescriptor::type not bound -# Fails instrospection issue: https://github.com/xamarin/maccore/issues/1979 -!missing-selector! MTLIndirectCommandBufferDescriptor::maxKernelBufferBindCount not bound -!missing-selector! MTLIndirectCommandBufferDescriptor::setMaxKernelBufferBindCount: not bound - # Initial result from new rule extra-null-allowed !extra-null-allowed! 'System.String Metal.MTLAttribute::get_Name()' has a extraneous [NullAllowed] on return type @@ -74,3 +70,28 @@ !missing-null-allowed! 'System.Void Metal.MTLRenderPipelineDescriptor::set_VertexDescriptor(Metal.MTLVertexDescriptor)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void Metal.MTLSamplerDescriptor::set_Label(System.String)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void Metal.MTLVertexBufferLayoutDescriptorArray::SetObject(Metal.MTLVertexBufferLayoutDescriptor,System.nuint)' is missing an [NullAllowed] on parameter #0 + +# new methods added to a protocol, they will be abstract in XAMCORE_4 +!incorrect-protocol-member! MTLDevice::newBinaryArchiveWithDescriptor:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newDynamicLibrary:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newDynamicLibraryWithURL:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsCounterSampling: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsDynamicLibraries is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsPullModelInterpolation is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::installName is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::newFunctionWithDescriptor:completionHandler: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::newFunctionWithDescriptor:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLLibrary::type is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBlitCommandEncoder::resolveCounters:inRange:destinationBuffer:destinationOffset: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBlitCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::blitCommandEncoderWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::computeCommandEncoderWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::errorOptions is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::logs is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandQueue::commandBufferWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::counterSets is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newCounterSampleBufferWithDescriptor:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::sampleTimestamps:gpuTimestamp: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLIndirectComputeCommand::setImageblockWidth:height: is REQUIRED and should be abstract diff --git a/tests/xtro-sharpie/tvOS-MetalPerformanceShaders.todo b/tests/xtro-sharpie/tvOS-MetalPerformanceShaders.todo index 64d1f1e46ea9..78c7e8a6b203 100644 --- a/tests/xtro-sharpie/tvOS-MetalPerformanceShaders.todo +++ b/tests/xtro-sharpie/tvOS-MetalPerformanceShaders.todo @@ -8,6 +8,7 @@ !missing-protocol-conformance! MPSCNNBatchNormalizationNode should conform to MPSNNTrainableNode !missing-protocol-conformance! MPSCNNConvolutionNode should conform to MPSNNTrainableNode !missing-protocol-conformance! MPSCNNInstanceNormalizationNode should conform to MPSNNTrainableNode +!missing-protocol-member! MPSCNNConvolutionDataSource::kernelWeightsDataType not found !missing-protocol-member! MPSCNNConvolutionDataSource::weightsLayout not found !missing-protocol-member! MPSCNNInstanceNormalizationDataSource::load not found !missing-protocol-member! MPSCNNInstanceNormalizationDataSource::purge not found @@ -16,6 +17,8 @@ !missing-selector! +MPSCNNGroupNormalizationGradientNode::nodeWithSourceGradient:sourceImage:gradientState: not bound !missing-selector! +MPSCNNGroupNormalizationNode::nodeWithSource:dataSource: not bound !missing-selector! +MPSCNNNeuronGeLUNode::nodeWithSource: not bound +!missing-selector! +MPSMatrixRandomDistributionDescriptor::normalDistributionDescriptorWithMean:standardDeviation: not bound +!missing-selector! +MPSMatrixRandomDistributionDescriptor::normalDistributionDescriptorWithMean:standardDeviation:minimum:maximum: not bound !missing-selector! +MPSNDArrayDescriptor::descriptorWithDataType:dimensionSizes: not bound !missing-selector! +MPSNNGramMatrixCalculationGradientNode::nodeWithSourceGradient:sourceImage:gradientState: not bound !missing-selector! +MPSNNGramMatrixCalculationGradientNode::nodeWithSourceGradient:sourceImage:gradientState:alpha: not bound @@ -81,6 +84,9 @@ !missing-selector! MPSCNNInstanceNormalizationNode::trainingStyle not bound !missing-selector! MPSCNNKernel::batchEncodingStorageSizeForSourceImage:sourceStates:destinationImage: not bound !missing-selector! MPSCNNKernel::encodingStorageSizeForSourceImage:sourceStates:destinationImage: not bound +!missing-selector! MPSCNNLoss::reduceAcrossBatch not bound +!missing-selector! MPSCNNLossDescriptor::reduceAcrossBatch not bound +!missing-selector! MPSCNNLossDescriptor::setReduceAcrossBatch: not bound !missing-selector! MPSCNNLossLabels::initWithDevice:lossImageSize:labelsImage:weightsImage: not bound !missing-selector! MPSCNNMultiaryKernel::appendBatchBarrier not bound !missing-selector! MPSCNNMultiaryKernel::clipRect not bound @@ -129,6 +135,42 @@ !missing-selector! MPSCNNMultiaryKernel::temporaryResultStateBatchForCommandBuffer:sourceImages:sourceStates:destinationImage: not bound !missing-selector! MPSCNNMultiaryKernel::temporaryResultStateForCommandBuffer:sourceImages:sourceStates:destinationImage: not bound !missing-selector! MPSCNNNeuronGeLUNode::initWithSource: not bound +!missing-selector! MPSCNNYOLOLoss::reduceAcrossBatch not bound +!missing-selector! MPSCNNYOLOLossDescriptor::reduceAcrossBatch not bound +!missing-selector! MPSCNNYOLOLossDescriptor::setReduceAcrossBatch: not bound +!missing-selector! MPSImageCanny::colorTransform not bound +!missing-selector! MPSImageCanny::highThreshold not bound +!missing-selector! MPSImageCanny::initWithCoder:device: not bound +!missing-selector! MPSImageCanny::initWithDevice: not bound +!missing-selector! MPSImageCanny::initWithDevice:linearToGrayScaleTransform:sigma: not bound +!missing-selector! MPSImageCanny::lowThreshold not bound +!missing-selector! MPSImageCanny::setHighThreshold: not bound +!missing-selector! MPSImageCanny::setLowThreshold: not bound +!missing-selector! MPSImageCanny::setUseFastMode: not bound +!missing-selector! MPSImageCanny::sigma not bound +!missing-selector! MPSImageCanny::useFastMode not bound +!missing-selector! MPSImageEDLines::clipRectSource not bound +!missing-selector! MPSImageEDLines::detailRatio not bound +!missing-selector! MPSImageEDLines::encodeToCommandBuffer:sourceTexture:destinationTexture:endpointBuffer:endpointOffset: not bound +!missing-selector! MPSImageEDLines::gaussianSigma not bound +!missing-selector! MPSImageEDLines::gradientThreshold not bound +!missing-selector! MPSImageEDLines::initWithCoder:device: not bound +!missing-selector! MPSImageEDLines::initWithDevice:gaussianSigma:minLineLength:maxLines:detailRatio:gradientThreshold:lineErrorThreshold:mergeLocalityThreshold: not bound +!missing-selector! MPSImageEDLines::lineErrorThreshold not bound +!missing-selector! MPSImageEDLines::maxLines not bound +!missing-selector! MPSImageEDLines::mergeLocalityThreshold not bound +!missing-selector! MPSImageEDLines::minLineLength not bound +!missing-selector! MPSImageEDLines::setClipRectSource: not bound +!missing-selector! MPSImageEDLines::setDetailRatio: not bound +!missing-selector! MPSImageEDLines::setGradientThreshold: not bound +!missing-selector! MPSImageEDLines::setLineErrorThreshold: not bound +!missing-selector! MPSImageEDLines::setMaxLines: not bound +!missing-selector! MPSImageEDLines::setMergeLocalityThreshold: not bound +!missing-selector! MPSImageEDLines::setMinLineLength: not bound +!missing-selector! MPSImageEuclideanDistanceTransform::searchLimitRadius not bound +!missing-selector! MPSImageEuclideanDistanceTransform::setSearchLimitRadius: not bound +!missing-selector! MPSImageGuidedFilter::encodeReconstructionToCommandBuffer:guidanceTexture:coefficientsTextureA:coefficientsTextureB:destinationTexture: not bound +!missing-selector! MPSImageGuidedFilter::encodeRegressionToCommandBuffer:sourceTexture:guidanceTexture:weightsTexture:destinationCoefficientsTextureA:destinationCoefficientsTextureB: not bound !missing-selector! MPSMatrixSum::resultMatrixOrigin not bound !missing-selector! MPSMatrixSum::setResultMatrixOrigin: not bound !missing-selector! MPSNDArrayBinaryKernel::encodeToCommandBuffer:primarySourceArray:secondarySourceArray: not bound @@ -211,12 +253,14 @@ !missing-selector! MPSNNForwardLoss::labelSmoothing not bound !missing-selector! MPSNNForwardLoss::lossType not bound !missing-selector! MPSNNForwardLoss::numberOfClasses not bound +!missing-selector! MPSNNForwardLoss::reduceAcrossBatch not bound !missing-selector! MPSNNForwardLoss::reductionType not bound !missing-selector! MPSNNForwardLoss::setDelta: not bound !missing-selector! MPSNNForwardLoss::setEpsilon: not bound !missing-selector! MPSNNForwardLoss::setLabelSmoothing: not bound !missing-selector! MPSNNForwardLoss::setWeight: not bound !missing-selector! MPSNNForwardLoss::weight not bound +!missing-selector! MPSNNForwardLossNode::reduceAcrossBatch not bound !missing-selector! MPSNNGramMatrixCalculation::alpha not bound !missing-selector! MPSNNGramMatrixCalculation::initWithCoder:device: not bound !missing-selector! MPSNNGramMatrixCalculation::initWithDevice: not bound @@ -261,6 +305,7 @@ !missing-selector! MPSNNLossGradient::labelSmoothing not bound !missing-selector! MPSNNLossGradient::lossType not bound !missing-selector! MPSNNLossGradient::numberOfClasses not bound +!missing-selector! MPSNNLossGradient::reduceAcrossBatch not bound !missing-selector! MPSNNLossGradient::reductionType not bound !missing-selector! MPSNNLossGradient::setComputeLabelGradients: not bound !missing-selector! MPSNNLossGradient::setDelta: not bound @@ -268,6 +313,7 @@ !missing-selector! MPSNNLossGradient::setLabelSmoothing: not bound !missing-selector! MPSNNLossGradient::setWeight: not bound !missing-selector! MPSNNLossGradient::weight not bound +!missing-selector! MPSNNLossGradientNode::reduceAcrossBatch not bound !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:batchNormalizationGradientState:batchNormalizationSourceState:inputMomentumVectors:inputVelocityVectors:maximumVelocityVectors:resultState: not bound !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:batchNormalizationState:inputMomentumVectors:inputVelocityVectors:maximumVelocityVectors:resultState: not bound !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:convolutionGradientState:convolutionSourceState:inputMomentumVectors:inputVelocityVectors:maximumVelocityVectors:resultState: not bound @@ -276,6 +322,8 @@ !missing-selector! MPSNNOptimizerAdam::encodeToCommandBuffer:inputGradientVector:inputValuesVector:inputMomentumVector:inputVelocityVector:maximumVelocityVector:resultValuesVector: not bound !missing-selector! MPSNNOptimizerRMSProp::encodeToCommandBuffer:inputGradientMatrix:inputValuesMatrix:inputSumOfSquaresMatrix:resultValuesMatrix: not bound !missing-selector! MPSNNOptimizerStochasticGradientDescent::encodeToCommandBuffer:inputGradientMatrix:inputValuesMatrix:inputMomentumMatrix:resultValuesMatrix: not bound +!missing-selector! MPSNNOptimizerStochasticGradientDescent::initWithDevice:momentumScale:useNesterovMomentum:optimizerDescriptor: not bound +!missing-selector! MPSNNOptimizerStochasticGradientDescent::useNesterovMomentum not bound !missing-selector! MPSNNReduceColumnMax::initWithCoder:device: not bound !missing-selector! MPSNNReduceColumnMean::initWithCoder:device: not bound !missing-selector! MPSNNReduceColumnMin::initWithCoder:device: not bound @@ -292,6 +340,10 @@ !missing-selector! MPSNNReduceRowMean::initWithCoder:device: not bound !missing-selector! MPSNNReduceRowMin::initWithCoder:device: not bound !missing-selector! MPSNNReduceRowSum::initWithCoder:device: not bound +!missing-selector! MPSNNReshape::encodeBatchToCommandBuffer:sourceImages:destinationStates:destinationStateIsTemporary:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound +!missing-selector! MPSNNReshape::encodeBatchToCommandBuffer:sourceImages:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound +!missing-selector! MPSNNReshape::encodeToCommandBuffer:sourceImage:destinationState:destinationStateIsTemporary:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound +!missing-selector! MPSNNReshape::encodeToCommandBuffer:sourceImage:reshapedWidth:reshapedHeight:reshapedFeatureChannels: not bound !missing-selector! MPSPolygonAccelerationStructure::indexBuffer not bound !missing-selector! MPSPolygonAccelerationStructure::indexBufferOffset not bound !missing-selector! MPSPolygonAccelerationStructure::indexType not bound @@ -417,6 +469,8 @@ !missing-type! MPSCNNGroupNormalizationNode not bound !missing-type! MPSCNNMultiaryKernel not bound !missing-type! MPSCNNNeuronGeLUNode not bound +!missing-type! MPSImageCanny not bound +!missing-type! MPSImageEDLines not bound !missing-type! MPSNDArrayBinaryKernel not bound !missing-type! MPSNDArrayBinaryPrimaryGradientKernel not bound !missing-type! MPSNDArrayBinarySecondaryGradientKernel not bound @@ -452,8 +506,3 @@ !missing-type! MPSTemporalAA not bound !unknown-simd-type-mapping! The Simd type vector_uchar16 does not have a mapping to a managed type. Please add one in SimdCheck.cs !wrong-base-type! MPSTriangleAccelerationStructure expected MPSPolygonAccelerationStructure actual MPSAccelerationStructure - -## Xcode 11.4 b1 -!missing-selector! MPSImageGuidedFilter::encodeReconstructionToCommandBuffer:guidanceTexture:coefficientsTextureA:coefficientsTextureB:destinationTexture: not bound -!missing-selector! MPSImageGuidedFilter::encodeRegressionToCommandBuffer:sourceTexture:guidanceTexture:weightsTexture:destinationCoefficientsTextureA:destinationCoefficientsTextureB: not bound - diff --git a/tests/xtro-sharpie/tvOS-MetalPerformanceShadersGraph.todo b/tests/xtro-sharpie/tvOS-MetalPerformanceShadersGraph.todo new file mode 100644 index 000000000000..68f4c392809b --- /dev/null +++ b/tests/xtro-sharpie/tvOS-MetalPerformanceShadersGraph.todo @@ -0,0 +1,276 @@ +!missing-enum! MPSGraphDeviceType not bound +!missing-enum! MPSGraphLossReductionType not bound +!missing-enum! MPSGraphOptions not bound +!missing-enum! MPSGraphPaddingMode not bound +!missing-enum! MPSGraphPaddingStyle not bound +!missing-enum! MPSGraphResizeMode not bound +!missing-enum! MPSGraphTensorNamedDataLayout not bound +!missing-selector! +MPSGraphConvolution2DOpDescriptor::descriptorWithStrideInX:strideInY:dilationRateInX:dilationRateInY:groups:paddingLeft:paddingRight:paddingTop:paddingBottom:paddingStyle:dataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphConvolution2DOpDescriptor::descriptorWithStrideInX:strideInY:dilationRateInX:dilationRateInY:groups:paddingStyle:dataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphDepthwiseConvolution2DOpDescriptor::descriptorWithDataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphDepthwiseConvolution2DOpDescriptor::descriptorWithStrideInX:strideInY:dilationRateInX:dilationRateInY:paddingLeft:paddingRight:paddingTop:paddingBottom:paddingStyle:dataLayout:weightsLayout: not bound +!missing-selector! +MPSGraphDevice::deviceWithMTLDevice: not bound +!missing-selector! +MPSGraphPooling2DOpDescriptor::descriptorWithKernelWidth:kernelHeight:strideInX:strideInY:dilationRateInX:dilationRateInY:paddingLeft:paddingRight:paddingTop:paddingBottom:paddingStyle:dataLayout: not bound +!missing-selector! +MPSGraphPooling2DOpDescriptor::descriptorWithKernelWidth:kernelHeight:strideInX:strideInY:paddingStyle:dataLayout: not bound +!missing-selector! MPSGraph::absoluteWithTensor:name: not bound +!missing-selector! MPSGraph::acoshWithTensor:name: not bound +!missing-selector! MPSGraph::acosWithTensor:name: not bound +!missing-selector! MPSGraph::additionWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::applyStochasticGradientDescentWithLearningRateTensor:variable:gradientTensor:name: not bound +!missing-selector! MPSGraph::asinhWithTensor:name: not bound +!missing-selector! MPSGraph::asinWithTensor:name: not bound +!missing-selector! MPSGraph::assignVariable:withValueOfTensor:name: not bound +!missing-selector! MPSGraph::atan2WithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::atanhWithTensor:name: not bound +!missing-selector! MPSGraph::atanWithTensor:name: not bound +!missing-selector! MPSGraph::avgPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::avgPooling2DWithSourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::ceilWithTensor:name: not bound +!missing-selector! MPSGraph::clampWithTensor:minValueTensor:maxValueTensor:name: not bound +!missing-selector! MPSGraph::concatTensor:withTensor:dimension:name: not bound +!missing-selector! MPSGraph::concatTensors:dimension:name: not bound +!missing-selector! MPSGraph::constantWithData:shape:dataType: not bound +!missing-selector! MPSGraph::constantWithScalar:shape:dataType: not bound +!missing-selector! MPSGraph::convolution2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolution2DWeightsGradientWithIncomingGradientTensor:sourceTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolution2DWithSourceTensor:weightsTensor:descriptor:name: not bound +!missing-selector! MPSGraph::convolutionTranspose2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolutionTranspose2DWeightsGradientWithIncomingGradientTensor:sourceTensor:outputShape:forwardConvolutionDescriptor:name: not bound +!missing-selector! MPSGraph::convolutionTranspose2DWithSourceTensor:weightsTensor:outputShape:descriptor:name: not bound +!missing-selector! MPSGraph::coshWithTensor:name: not bound +!missing-selector! MPSGraph::cosWithTensor:name: not bound +!missing-selector! MPSGraph::depthwiseConvolution2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:descriptor:name: not bound +!missing-selector! MPSGraph::depthwiseConvolution2DWeightsGradientWithIncomingGradientTensor:sourceTensor:outputShape:descriptor:name: not bound +!missing-selector! MPSGraph::depthwiseConvolution2DWithSourceTensor:weightsTensor:descriptor:name: not bound +!missing-selector! MPSGraph::divisionNoNaNWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::divisionWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::dropoutTensor:rate:name: not bound +!missing-selector! MPSGraph::dropoutTensor:rateTensor:name: not bound +!missing-selector! MPSGraph::encodeToCommandBuffer:feeds:targetOperations:resultsDictionary:executionDescriptor: not bound +!missing-selector! MPSGraph::encodeToCommandBuffer:feeds:targetTensors:targetOperations:executionDescriptor: not bound +!missing-selector! MPSGraph::equalWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::erfWithTensor:name: not bound +!missing-selector! MPSGraph::exponentBase10WithTensor:name: not bound +!missing-selector! MPSGraph::exponentBase2WithTensor:name: not bound +!missing-selector! MPSGraph::exponentWithTensor:name: not bound +!missing-selector! MPSGraph::floorModuloWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::floorWithTensor:name: not bound +!missing-selector! MPSGraph::gatherNDWithUpdatesTensor:indicesTensor:batchDimensions:name: not bound +!missing-selector! MPSGraph::gatherWithUpdatesTensor:indicesTensor:axis:batchDimensions:name: not bound +!missing-selector! MPSGraph::gradientForPrimaryTensor:withTensors:name: not bound +!missing-selector! MPSGraph::greaterThanOrEqualToWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::greaterThanWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::identityWithTensor:name: not bound +!missing-selector! MPSGraph::init not bound +!missing-selector! MPSGraph::isFiniteWithTensor:name: not bound +!missing-selector! MPSGraph::isInfiniteWithTensor:name: not bound +!missing-selector! MPSGraph::isNaNWithTensor:name: not bound +!missing-selector! MPSGraph::lessThanOrEqualToWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::lessThanWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logarithmBase10WithTensor:name: not bound +!missing-selector! MPSGraph::logarithmBase2WithTensor:name: not bound +!missing-selector! MPSGraph::logarithmWithTensor:name: not bound +!missing-selector! MPSGraph::logicalANDWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalNANDWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalNORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalXNORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::logicalXORWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::matrixMultiplicationWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::maximumWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::maxPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::maxPooling2DWithSourceTensor:descriptor:name: not bound +!missing-selector! MPSGraph::meanOfTensor:axes:name: not bound +!missing-selector! MPSGraph::minimumWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::moduloWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::multiplicationWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::negativeWithTensor:name: not bound +!missing-selector! MPSGraph::normalizationBetaGradientWithIncomingGradientTensor:sourceTensor:reductionAxes:name: not bound +!missing-selector! MPSGraph::normalizationGammaGradientWithIncomingGradientTensor:sourceTensor:meanTensor:varianceTensor:reductionAxes:epsilon:name: not bound +!missing-selector! MPSGraph::normalizationGradientWithIncomingGradientTensor:sourceTensor:meanTensor:varianceTensor:gammaTensor:gammaGradientTensor:betaGradientTensor:reductionAxes:epsilon:name: not bound +!missing-selector! MPSGraph::normalizationWithTensor:meanTensor:varianceTensor:gammaTensor:betaTensor:epsilon:name: not bound +!missing-selector! MPSGraph::notEqualWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::notWithTensor:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:axis:dataType:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:axis:dataType:onValue:offValue:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:axis:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:dataType:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:dataType:onValue:offValue:name: not bound +!missing-selector! MPSGraph::oneHotWithIndicesTensor:depth:name: not bound +!missing-selector! MPSGraph::options not bound +!missing-selector! MPSGraph::padGradientWithIncomingGradientTensor:sourceTensor:paddingMode:leftPadding:rightPadding:name: not bound +!missing-selector! MPSGraph::padTensor:withPaddingMode:leftPadding:rightPadding:constantValue:name: not bound +!missing-selector! MPSGraph::placeholderTensors not bound +!missing-selector! MPSGraph::placeholderWithShape:dataType:name: not bound +!missing-selector! MPSGraph::placeholderWithShape:name: not bound +!missing-selector! MPSGraph::powerWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::readVariable:name: not bound +!missing-selector! MPSGraph::reciprocalWithTensor:name: not bound +!missing-selector! MPSGraph::reductionMaximumWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionMaximumWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reductionMinimumWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionMinimumWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reductionProductWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionProductWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reductionSumWithTensor:axes:name: not bound +!missing-selector! MPSGraph::reductionSumWithTensor:axis:name: not bound +!missing-selector! MPSGraph::reLUGradientWithIncomingGradient:sourceTensor:name: not bound +!missing-selector! MPSGraph::reLUWithTensor:name: not bound +!missing-selector! MPSGraph::reshapeTensor:withShape:name: not bound +!missing-selector! MPSGraph::resizeTensor:size:mode:centerResult:alignCorners:layout:name: not bound +!missing-selector! MPSGraph::resizeWithGradientTensor:input:mode:centerResult:alignCorners:layout:name: not bound +!missing-selector! MPSGraph::reverseSquareRootWithTensor:name: not bound +!missing-selector! MPSGraph::rintWithTensor:name: not bound +!missing-selector! MPSGraph::roundWithTensor:name: not bound +!missing-selector! MPSGraph::runAsyncWithFeeds:targetTensors:targetOperations:executionDescriptor: not bound +!missing-selector! MPSGraph::runAsyncWithMTLCommandQueue:feeds:targetOperations:resultsDictionary:executionDescriptor: not bound +!missing-selector! MPSGraph::runAsyncWithMTLCommandQueue:feeds:targetTensors:targetOperations:executionDescriptor: not bound +!missing-selector! MPSGraph::runWithFeeds:targetTensors:targetOperations: not bound +!missing-selector! MPSGraph::runWithMTLCommandQueue:feeds:targetOperations:resultsDictionary: not bound +!missing-selector! MPSGraph::runWithMTLCommandQueue:feeds:targetTensors:targetOperations: not bound +!missing-selector! MPSGraph::scatterNDWithUpdatesTensor:indicesTensor:shape:batchDimensions:name: not bound +!missing-selector! MPSGraph::selectWithPredicateTensor:truePredicateTensor:falsePredicateTensor:name: not bound +!missing-selector! MPSGraph::setOptions: not bound +!missing-selector! MPSGraph::sigmoidGradientWithIncomingGradient:sourceTensor:name: not bound +!missing-selector! MPSGraph::sigmoidWithTensor:name: not bound +!missing-selector! MPSGraph::signbitWithTensor:name: not bound +!missing-selector! MPSGraph::signWithTensor:name: not bound +!missing-selector! MPSGraph::sinhWithTensor:name: not bound +!missing-selector! MPSGraph::sinWithTensor:name: not bound +!missing-selector! MPSGraph::sliceTensor:dimension:start:length:name: not bound +!missing-selector! MPSGraph::softMaxCrossEntropyGradientWithIncomingGradientTensor:sourceTensor:labelsTensor:axis:reductionType:name: not bound +!missing-selector! MPSGraph::softMaxCrossEntropyWithSourceTensor:labelsTensor:axis:reductionType:name: not bound +!missing-selector! MPSGraph::softMaxGradientWithIncomingGradient:sourceTensor:axis:name: not bound +!missing-selector! MPSGraph::softMaxWithTensor:axis:name: not bound +!missing-selector! MPSGraph::squareRootWithTensor:name: not bound +!missing-selector! MPSGraph::squareWithTensor:name: not bound +!missing-selector! MPSGraph::stochasticGradientDescentWithLearningRateTensor:valuesTensor:gradientTensor:name: not bound +!missing-selector! MPSGraph::subtractionWithPrimaryTensor:secondaryTensor:name: not bound +!missing-selector! MPSGraph::tanhWithTensor:name: not bound +!missing-selector! MPSGraph::tanWithTensor:name: not bound +!missing-selector! MPSGraph::tileGradientWithIncomingGradientTensor:sourceTensor:withMultiplier:name: not bound +!missing-selector! MPSGraph::tileTensor:withMultiplier:name: not bound +!missing-selector! MPSGraph::transposeTensor:dimension:withDimension:name: not bound +!missing-selector! MPSGraph::variableWithData:shape:dataType:name: not bound +!missing-selector! MPSGraph::varianceOfTensor:axes:name: not bound +!missing-selector! MPSGraph::varianceOfTensor:meanTensor:axes:name: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::dataLayout not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::dilationRateInX not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::dilationRateInY not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::groups not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingBottom not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingLeft not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingRight not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingStyle not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::paddingTop not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setDataLayout: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setDilationRateInX: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setDilationRateInY: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setExplicitPaddingWithPaddingLeft:paddingRight:paddingTop:paddingBottom: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setGroups: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingBottom: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingLeft: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingRight: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingStyle: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setPaddingTop: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setStrideInX: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setStrideInY: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::setWeightsLayout: not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::strideInX not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::strideInY not bound +!missing-selector! MPSGraphConvolution2DOpDescriptor::weightsLayout not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::dataLayout not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::dilationRateInX not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::dilationRateInY not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingBottom not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingLeft not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingRight not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingStyle not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::paddingTop not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setDataLayout: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setDilationRateInX: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setDilationRateInY: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setExplicitPaddingWithPaddingLeft:paddingRight:paddingTop:paddingBottom: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingBottom: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingLeft: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingRight: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingStyle: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setPaddingTop: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setStrideInX: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setStrideInY: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::setWeightsLayout: not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::strideInX not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::strideInY not bound +!missing-selector! MPSGraphDepthwiseConvolution2DOpDescriptor::weightsLayout not bound +!missing-selector! MPSGraphDevice::metalDevice not bound +!missing-selector! MPSGraphDevice::type not bound +!missing-selector! MPSGraphExecutionDescriptor::completionHandler not bound +!missing-selector! MPSGraphExecutionDescriptor::scheduledHandler not bound +!missing-selector! MPSGraphExecutionDescriptor::setCompletionHandler: not bound +!missing-selector! MPSGraphExecutionDescriptor::setScheduledHandler: not bound +!missing-selector! MPSGraphExecutionDescriptor::setWaitUntilCompleted: not bound +!missing-selector! MPSGraphExecutionDescriptor::waitUntilCompleted not bound +!missing-selector! MPSGraphOperation::controlDependencies not bound +!missing-selector! MPSGraphOperation::graph not bound +!missing-selector! MPSGraphOperation::inputTensors not bound +!missing-selector! MPSGraphOperation::name not bound +!missing-selector! MPSGraphOperation::outputTensors not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::dataLayout not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::dilationRateInX not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::dilationRateInY not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::kernelHeight not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::kernelWidth not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingBottom not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingLeft not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingRight not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingStyle not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::paddingTop not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setDataLayout: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setDilationRateInX: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setDilationRateInY: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setExplicitPaddingWithPaddingLeft:paddingRight:paddingTop:paddingBottom: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setKernelHeight: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setKernelWidth: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingBottom: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingLeft: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingRight: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingStyle: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setPaddingTop: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setStrideInX: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::setStrideInY: not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::strideInX not bound +!missing-selector! MPSGraphPooling2DOpDescriptor::strideInY not bound +!missing-selector! MPSGraphShapedType::dataType not bound +!missing-selector! MPSGraphShapedType::initWithShape:dataType: not bound +!missing-selector! MPSGraphShapedType::isEqualTo: not bound +!missing-selector! MPSGraphShapedType::setDataType: not bound +!missing-selector! MPSGraphShapedType::setShape: not bound +!missing-selector! MPSGraphShapedType::shape not bound +!missing-selector! MPSGraphTensor::dataType not bound +!missing-selector! MPSGraphTensor::operation not bound +!missing-selector! MPSGraphTensor::shape not bound +!missing-selector! MPSGraphTensorData::dataType not bound +!missing-selector! MPSGraphTensorData::device not bound +!missing-selector! MPSGraphTensorData::initWithDevice:data:shape:dataType: not bound +!missing-selector! MPSGraphTensorData::initWithMPSImageBatch: not bound +!missing-selector! MPSGraphTensorData::initWithMPSMatrix: not bound +!missing-selector! MPSGraphTensorData::initWithMPSMatrix:rank: not bound +!missing-selector! MPSGraphTensorData::initWithMPSNDArray: not bound +!missing-selector! MPSGraphTensorData::initWithMPSVector: not bound +!missing-selector! MPSGraphTensorData::initWithMPSVector:rank: not bound +!missing-selector! MPSGraphTensorData::initWithMTLBuffer:shape:dataType: not bound +!missing-selector! MPSGraphTensorData::mpsndarray not bound +!missing-selector! MPSGraphTensorData::shape not bound +!missing-selector! MPSGraphVariableOp::dataType not bound +!missing-selector! MPSGraphVariableOp::shape not bound +!missing-type! MPSGraph not bound +!missing-type! MPSGraphConvolution2DOpDescriptor not bound +!missing-type! MPSGraphDepthwiseConvolution2DOpDescriptor not bound +!missing-type! MPSGraphDevice not bound +!missing-type! MPSGraphExecutionDescriptor not bound +!missing-type! MPSGraphOperation not bound +!missing-type! MPSGraphPooling2DOpDescriptor not bound +!missing-type! MPSGraphShapedType not bound +!missing-type! MPSGraphTensor not bound +!missing-type! MPSGraphTensorData not bound +!missing-type! MPSGraphVariableOp not bound diff --git a/tests/xtro-sharpie/tvOS-Network.todo b/tests/xtro-sharpie/tvOS-Network.todo new file mode 100644 index 000000000000..37648521d390 --- /dev/null +++ b/tests/xtro-sharpie/tvOS-Network.todo @@ -0,0 +1,43 @@ +!missing-field! _nw_privacy_context_default_context not bound +!missing-pinvoke! nw_connection_group_cancel is not bound +!missing-pinvoke! nw_connection_group_copy_descriptor is not bound +!missing-pinvoke! nw_connection_group_copy_local_endpoint_for_message is not bound +!missing-pinvoke! nw_connection_group_copy_parameters is not bound +!missing-pinvoke! nw_connection_group_copy_path_for_message is not bound +!missing-pinvoke! nw_connection_group_copy_remote_endpoint_for_message is not bound +!missing-pinvoke! nw_connection_group_create is not bound +!missing-pinvoke! nw_connection_group_extract_connection_for_message is not bound +!missing-pinvoke! nw_connection_group_reply is not bound +!missing-pinvoke! nw_connection_group_send_message is not bound +!missing-pinvoke! nw_connection_group_set_queue is not bound +!missing-pinvoke! nw_connection_group_set_receive_handler is not bound +!missing-pinvoke! nw_connection_group_set_state_changed_handler is not bound +!missing-pinvoke! nw_connection_group_start is not bound +!missing-pinvoke! nw_establishment_report_enumerate_resolution_reports is not bound +!missing-pinvoke! nw_group_descriptor_add_endpoint is not bound +!missing-pinvoke! nw_group_descriptor_create_multicast is not bound +!missing-pinvoke! nw_group_descriptor_enumerate_endpoints is not bound +!missing-pinvoke! nw_ip_options_set_disable_multicast_loopback is not bound +!missing-pinvoke! nw_multicast_group_descriptor_get_disable_unicast_traffic is not bound +!missing-pinvoke! nw_multicast_group_descriptor_set_disable_unicast_traffic is not bound +!missing-pinvoke! nw_multicast_group_descriptor_set_specific_source is not bound +!missing-pinvoke! nw_parameters_set_privacy_context is not bound +!missing-pinvoke! nw_path_monitor_prohibit_interface_type is not bound +!missing-pinvoke! nw_privacy_context_create is not bound +!missing-pinvoke! nw_privacy_context_disable_logging is not bound +!missing-pinvoke! nw_privacy_context_flush_cache is not bound +!missing-pinvoke! nw_privacy_context_require_encrypted_name_resolution is not bound +!missing-pinvoke! nw_resolution_report_copy_preferred_endpoint is not bound +!missing-pinvoke! nw_resolution_report_copy_successful_endpoint is not bound +!missing-pinvoke! nw_resolution_report_get_endpoint_count is not bound +!missing-pinvoke! nw_resolution_report_get_milliseconds is not bound +!missing-pinvoke! nw_resolution_report_get_protocol is not bound +!missing-pinvoke! nw_resolution_report_get_source is not bound +!missing-pinvoke! nw_resolver_config_add_server_address is not bound +!missing-pinvoke! nw_resolver_config_create_https is not bound +!missing-pinvoke! nw_resolver_config_create_tls is not bound +!missing-protocol! OS_nw_connection_group not bound +!missing-protocol! OS_nw_group_descriptor not bound +!missing-protocol! OS_nw_privacy_context not bound +!missing-protocol! OS_nw_resolution_report not bound +!missing-protocol! OS_nw_resolver_config not bound diff --git a/tests/xtro-sharpie/tvOS-StoreKit.todo b/tests/xtro-sharpie/tvOS-StoreKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/tvOS-UIKit.ignore b/tests/xtro-sharpie/tvOS-UIKit.ignore index 4890628df28e..775dc50b9e81 100644 --- a/tests/xtro-sharpie/tvOS-UIKit.ignore +++ b/tests/xtro-sharpie/tvOS-UIKit.ignore @@ -1,6 +1,4 @@ ## lack of availabilty macros on NSItemProvder.PreferredPresentationStyle - intro says they are not available -!missing-selector! NSItemProvider::preferredPresentationStyle not bound -!missing-selector! NSItemProvider::setPreferredPresentationStyle: not bound ## and that also means the (enum/returned) type is unused !missing-enum! UIPreferredPresentationStyle not bound @@ -72,6 +70,9 @@ ## Does not make much sense to have it bound in tvOS !missing-field! UIGuidedAccessErrorDomain not bound +## enum only used in iOS API (lack correct decorations on tvOS headers) +!missing-enum! UINavigationItemBackButtonDisplayMode not bound + # Xcode 11 ## Inherited from another protocol diff --git a/tests/xtro-sharpie/tvOS-UIKit.todo b/tests/xtro-sharpie/tvOS-UIKit.todo index e69de29bb2d1..4b7894a0771c 100644 --- a/tests/xtro-sharpie/tvOS-UIKit.todo +++ b/tests/xtro-sharpie/tvOS-UIKit.todo @@ -0,0 +1,18 @@ +!missing-selector! NSDiffableDataSourceSectionTransaction::difference not bound +!missing-selector! NSDiffableDataSourceTransaction::difference not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::canReorderItemHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::didReorderHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::setCanReorderItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::setDidReorderHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::setWillReorderHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceReorderingHandlers::willReorderHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::setShouldCollapseItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::setShouldExpandItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::setSnapshotForExpandingParentItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::setWillCollapseItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::setWillExpandItemHandler: not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::shouldCollapseItemHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::shouldExpandItemHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::snapshotForExpandingParentItemHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::willCollapseItemHandler not bound +!missing-selector! UICollectionViewDiffableDataSourceSectionSnapshotHandlers::willExpandItemHandler not bound diff --git a/tests/xtro-sharpie/watchOS-AuthenticationServices.todo b/tests/xtro-sharpie/watchOS-AuthenticationServices.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/watchOS-ClockKit.ignore b/tests/xtro-sharpie/watchOS-ClockKit.ignore new file mode 100644 index 000000000000..a90cd37aa590 --- /dev/null +++ b/tests/xtro-sharpie/watchOS-ClockKit.ignore @@ -0,0 +1,3 @@ +# Default constructor is disabled, not need to add it. +!deprecated-attribute-missing! CLKFullColorImageProvider::init missing a [Deprecated] attribute +!incorrect-protocol-member! CLKComplicationDataSource::getSupportedTimeTravelDirectionsForComplication:withHandler: is OPTIONAL and should NOT be abstract diff --git a/tests/xtro-sharpie/watchOS-CloudKit.ignore b/tests/xtro-sharpie/watchOS-CloudKit.ignore index 99a7efd2175d..d227fc0c2bf5 100644 --- a/tests/xtro-sharpie/watchOS-CloudKit.ignore +++ b/tests/xtro-sharpie/watchOS-CloudKit.ignore @@ -1,19 +1,4 @@ ## Types (and members) added and deprecated in the same version (iOS headers are already cleaned in most cases) -!missing-type! CKDiscoverAllContactsOperation not bound -!missing-selector! CKDiscoverAllContactsOperation::discoverAllContactsCompletionBlock not bound -!missing-selector! CKDiscoverAllContactsOperation::setDiscoverAllContactsCompletionBlock: not bound -!missing-type! CKDiscoverUserInfosOperation not bound -!missing-selector! CKDiscoverUserInfosOperation::discoverUserInfosCompletionBlock not bound -!missing-selector! CKDiscoverUserInfosOperation::emailAddresses not bound -!missing-selector! CKDiscoverUserInfosOperation::initWithEmailAddresses:userRecordIDs: not bound -!missing-selector! CKDiscoverUserInfosOperation::setDiscoverUserInfosCompletionBlock: not bound -!missing-selector! CKDiscoverUserInfosOperation::setEmailAddresses: not bound -!missing-selector! CKDiscoverUserInfosOperation::setUserRecordIDs: not bound -!missing-selector! CKDiscoverUserInfosOperation::userRecordIDs not bound -!missing-type! CKDiscoveredUserInfo not bound -!missing-selector! CKDiscoveredUserInfo::firstName not bound -!missing-selector! CKDiscoveredUserInfo::lastName not bound -!missing-selector! CKDiscoveredUserInfo::userRecordID not bound !missing-type! CKFetchRecordChangesOperation not bound !missing-selector! CKFetchRecordChangesOperation::desiredKeys not bound !missing-selector! CKFetchRecordChangesOperation::fetchRecordChangesCompletionBlock not bound @@ -31,14 +16,9 @@ !missing-selector! CKFetchRecordChangesOperation::setRecordWithIDWasDeletedBlock: not bound !missing-selector! CKFetchRecordChangesOperation::setRecordZoneID: not bound !missing-selector! CKFetchRecordChangesOperation::setResultsLimit: not bound -!missing-selector! CKContainer::discoverAllContactUserInfosWithCompletionHandler: not bound -!missing-selector! CKContainer::discoverUserInfoWithEmailAddress:completionHandler: not bound -!missing-selector! CKContainer::discoverUserInfoWithUserRecordID:completionHandler: not bound !missing-field! CKOwnerDefaultName not bound ## some `init` do not work on watchOS (only) and we provide compatibility stubs for them to ease code sharing -!missing-selector! CKDiscoverAllContactsOperation::init not bound -!missing-selector! CKDiscoverUserInfosOperation::init not bound !missing-selector! CKFetchRecordChangesOperation::init not bound !missing-selector! CKFetchRecordsOperation::init not bound !missing-selector! CKFetchRecordZonesOperation::init not bound @@ -46,9 +26,3 @@ !missing-selector! CKModifyRecordsOperation::init not bound !missing-selector! CKModifyRecordZonesOperation::init not bound !missing-selector! CKQueryOperation::init not bound - -## Types (and members) added and deprecated in the same version (watchOS 6,0) -!missing-selector! CKSubscription::recordType not bound - -#deprecated -!missing-selector! CKQueryNotification::isPublicDatabase not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/watchOS-CoreGraphics.todo b/tests/xtro-sharpie/watchOS-CoreGraphics.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/watchOS-CoreLocation.todo b/tests/xtro-sharpie/watchOS-CoreLocation.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/watchOS-CoreML.todo b/tests/xtro-sharpie/watchOS-CoreML.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/watchOS-Foundation.ignore b/tests/xtro-sharpie/watchOS-Foundation.ignore index 29d994274dcc..8ea75431f806 100644 --- a/tests/xtro-sharpie/watchOS-Foundation.ignore +++ b/tests/xtro-sharpie/watchOS-Foundation.ignore @@ -4,6 +4,9 @@ ## type was not marked as unavailable before Xcode9 !unknown-type! NSUbiquitousKeyValueStore bound +## removed in Xcode 12 +!unknown-field! NSNetServicesErrorDomain bound + ## unsorted !missing-protocol-conformance! NSXPCConnection should conform to NSXPCProxyCreating !missing-selector! NSXPCInterface::interfaceForSelector:argumentIndex:ofReply: not bound diff --git a/tests/xtro-sharpie/watchOS-GameKit.ignore b/tests/xtro-sharpie/watchOS-GameKit.ignore index a23b9025de79..760d441eb013 100644 --- a/tests/xtro-sharpie/watchOS-GameKit.ignore +++ b/tests/xtro-sharpie/watchOS-GameKit.ignore @@ -77,8 +77,12 @@ !missing-selector! +GKVoiceChatService::defaultVoiceChatService not bound !missing-selector! +GKVoiceChatService::isVoIPAllowed not bound -# Initial result from new rule extra-null-allowed -!extra-null-allowed! 'System.Void GameKit.GKTurnBasedEventHandler::set_WeakDelegate(Foundation.NSObject)' has a extraneous [NullAllowed] on parameter #0 - # Initial result from new rule missing-null-allowed !missing-null-allowed! 'System.String GameKit.GKTurnBasedParticipant::get_PlayerID()' is missing an [NullAllowed] on return type + +# API removed by Apple, marked as deprecated +!unknown-native-enum! GKAuthenticationType bound + +# Xcode 12 beta 6 - these API have been deprecated and were never available on watch before +!missing-selector! GKMatchRequest::restrictToAutomatch not bound +!missing-selector! GKMatchRequest::setRestrictToAutomatch: not bound diff --git a/tests/xtro-sharpie/watchOS-GameKit.todo b/tests/xtro-sharpie/watchOS-GameKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/watchOS-HomeKit.todo b/tests/xtro-sharpie/watchOS-HomeKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/watchOS-Intents.ignore b/tests/xtro-sharpie/watchOS-Intents.ignore index eb1021b12b3c..d5f0863e0998 100644 --- a/tests/xtro-sharpie/watchOS-Intents.ignore +++ b/tests/xtro-sharpie/watchOS-Intents.ignore @@ -18,3 +18,24 @@ !unknown-type! INRadioTypeResolutionResult bound !unknown-type! INRelativeReferenceResolutionResult bound !unknown-type! INRelativeSettingResolutionResult bound + +## These do not make sense to have on watchOS, we can bind later if needed +!missing-field! INStartVideoCallIntentIdentifier not bound +!unknown-native-enum! INCarAirCirculationMode bound +!unknown-native-enum! INCarAudioSource bound +!unknown-native-enum! INCarDefroster bound +!unknown-native-enum! INCarSeat bound +!unknown-native-enum! INRadioType bound +!unknown-native-enum! INRelativeReference bound +!unknown-native-enum! INRelativeSetting bound +!unknown-type! INParameter bound + +## Changes introduced in Xcode 12 GM for iOS but not reflected in WatchOS we can bring them in later if needed +!missing-field! INCarChargingConnectorTypeNone not bound +!missing-null-allowed! 'Intents.INCarChargingConnectorType[] Intents.INCar::get_SupportedChargingConnectors()' is missing an [NullAllowed] on return type +!missing-null-allowed! 'System.Void Intents.INCar::.ctor(System.String,System.String,System.String,System.String,System.String,CoreGraphics.CGColor,Intents.INCarHeadUnit,Intents.INCarChargingConnectorType[])' is missing an [NullAllowed] on parameter #7 +!missing-selector! INColor::blue not bound +!missing-selector! INColor::green not bound +!missing-selector! INColor::initWithRed:green:blue: not bound +!missing-selector! INColor::red not bound +!missing-type! INColor not bound diff --git a/tests/xtro-sharpie/watchOS-Intents.todo b/tests/xtro-sharpie/watchOS-Intents.todo deleted file mode 100644 index edb8b142f529..000000000000 --- a/tests/xtro-sharpie/watchOS-Intents.todo +++ /dev/null @@ -1,8 +0,0 @@ -!unknown-native-enum! INCarAirCirculationMode bound -!unknown-native-enum! INCarAudioSource bound -!unknown-native-enum! INCarDefroster bound -!unknown-native-enum! INCarSeat bound -!unknown-native-enum! INRadioType bound -!unknown-native-enum! INRelativeReference bound -!unknown-native-enum! INRelativeSetting bound -!unknown-type! INParameter bound \ No newline at end of file diff --git a/tests/xtro-sharpie/watchOS-MediaPlayer.ignore b/tests/xtro-sharpie/watchOS-MediaPlayer.ignore index 511a36533b05..f0537dd8b7fe 100644 --- a/tests/xtro-sharpie/watchOS-MediaPlayer.ignore +++ b/tests/xtro-sharpie/watchOS-MediaPlayer.ignore @@ -1,4 +1,5 @@ -# Initial result from new rule missing-null-allowed -!missing-null-allowed! 'Foundation.NSObject MediaPlayer.MPMediaEntity::GetObject(Foundation.NSObject)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject MediaPlayer.MPMediaEntity::ValueForProperty(Foundation.NSString)' is missing an [NullAllowed] on return type +## stuff removed in Xcode 12 -> XAMCORE_4_0 +!unknown-field! MPMediaEntityPropertyPersistentID bound +!unknown-protocol! MPMediaPlayback bound +!unknown-type! MPMediaEntity bound diff --git a/tests/xtro-sharpie/watchOS-Network.todo b/tests/xtro-sharpie/watchOS-Network.todo new file mode 100644 index 000000000000..37648521d390 --- /dev/null +++ b/tests/xtro-sharpie/watchOS-Network.todo @@ -0,0 +1,43 @@ +!missing-field! _nw_privacy_context_default_context not bound +!missing-pinvoke! nw_connection_group_cancel is not bound +!missing-pinvoke! nw_connection_group_copy_descriptor is not bound +!missing-pinvoke! nw_connection_group_copy_local_endpoint_for_message is not bound +!missing-pinvoke! nw_connection_group_copy_parameters is not bound +!missing-pinvoke! nw_connection_group_copy_path_for_message is not bound +!missing-pinvoke! nw_connection_group_copy_remote_endpoint_for_message is not bound +!missing-pinvoke! nw_connection_group_create is not bound +!missing-pinvoke! nw_connection_group_extract_connection_for_message is not bound +!missing-pinvoke! nw_connection_group_reply is not bound +!missing-pinvoke! nw_connection_group_send_message is not bound +!missing-pinvoke! nw_connection_group_set_queue is not bound +!missing-pinvoke! nw_connection_group_set_receive_handler is not bound +!missing-pinvoke! nw_connection_group_set_state_changed_handler is not bound +!missing-pinvoke! nw_connection_group_start is not bound +!missing-pinvoke! nw_establishment_report_enumerate_resolution_reports is not bound +!missing-pinvoke! nw_group_descriptor_add_endpoint is not bound +!missing-pinvoke! nw_group_descriptor_create_multicast is not bound +!missing-pinvoke! nw_group_descriptor_enumerate_endpoints is not bound +!missing-pinvoke! nw_ip_options_set_disable_multicast_loopback is not bound +!missing-pinvoke! nw_multicast_group_descriptor_get_disable_unicast_traffic is not bound +!missing-pinvoke! nw_multicast_group_descriptor_set_disable_unicast_traffic is not bound +!missing-pinvoke! nw_multicast_group_descriptor_set_specific_source is not bound +!missing-pinvoke! nw_parameters_set_privacy_context is not bound +!missing-pinvoke! nw_path_monitor_prohibit_interface_type is not bound +!missing-pinvoke! nw_privacy_context_create is not bound +!missing-pinvoke! nw_privacy_context_disable_logging is not bound +!missing-pinvoke! nw_privacy_context_flush_cache is not bound +!missing-pinvoke! nw_privacy_context_require_encrypted_name_resolution is not bound +!missing-pinvoke! nw_resolution_report_copy_preferred_endpoint is not bound +!missing-pinvoke! nw_resolution_report_copy_successful_endpoint is not bound +!missing-pinvoke! nw_resolution_report_get_endpoint_count is not bound +!missing-pinvoke! nw_resolution_report_get_milliseconds is not bound +!missing-pinvoke! nw_resolution_report_get_protocol is not bound +!missing-pinvoke! nw_resolution_report_get_source is not bound +!missing-pinvoke! nw_resolver_config_add_server_address is not bound +!missing-pinvoke! nw_resolver_config_create_https is not bound +!missing-pinvoke! nw_resolver_config_create_tls is not bound +!missing-protocol! OS_nw_connection_group not bound +!missing-protocol! OS_nw_group_descriptor not bound +!missing-protocol! OS_nw_privacy_context not bound +!missing-protocol! OS_nw_resolution_report not bound +!missing-protocol! OS_nw_resolver_config not bound diff --git a/tests/xtro-sharpie/watchOS-NetworkExtension.ignore b/tests/xtro-sharpie/watchOS-NetworkExtension.ignore new file mode 100644 index 000000000000..0040a683da0a --- /dev/null +++ b/tests/xtro-sharpie/watchOS-NetworkExtension.ignore @@ -0,0 +1,28 @@ +# ignored due to https://github.com/xamarin/maccore/issues/2313 +!missing-enum! NEAppProxyFlowError not bound +!missing-enum! NEHotspotConfigurationError not bound +!missing-field! NEHotspotConfigurationErrorDomain not bound +!missing-selector! +NEHotspotConfigurationManager::sharedManager not bound +!missing-selector! +NEHotspotNetwork::fetchCurrentWithCompletionHandler: not bound +!missing-selector! NEHotspotConfiguration::hidden not bound +!missing-selector! NEHotspotConfiguration::initWithSSID: not bound +!missing-selector! NEHotspotConfiguration::initWithSSID:passphrase:isWEP: not bound +!missing-selector! NEHotspotConfiguration::initWithSSIDPrefix: not bound +!missing-selector! NEHotspotConfiguration::initWithSSIDPrefix:passphrase:isWEP: not bound +!missing-selector! NEHotspotConfiguration::joinOnce not bound +!missing-selector! NEHotspotConfiguration::lifeTimeInDays not bound +!missing-selector! NEHotspotConfiguration::setHidden: not bound +!missing-selector! NEHotspotConfiguration::setJoinOnce: not bound +!missing-selector! NEHotspotConfiguration::setLifeTimeInDays: not bound +!missing-selector! NEHotspotConfiguration::SSID not bound +!missing-selector! NEHotspotConfiguration::SSIDPrefix not bound +!missing-selector! NEHotspotConfigurationManager::applyConfiguration:completionHandler: not bound +!missing-selector! NEHotspotConfigurationManager::getConfiguredSSIDsWithCompletionHandler: not bound +!missing-selector! NEHotspotConfigurationManager::removeConfigurationForSSID: not bound +!missing-selector! NEHotspotNetwork::BSSID not bound +!missing-selector! NEHotspotNetwork::SSID not bound +!missing-type! NEHotspotConfiguration not bound +!missing-type! NEHotspotConfigurationManager not bound +!missing-type! NEHotspotNetwork not bound +!missing-type! NEIPv6Route not bound +!missing-type! NWTLSParameters not bound diff --git a/tests/xtro-sharpie/watchOS-PassKit.ignore b/tests/xtro-sharpie/watchOS-PassKit.ignore index c7f4e27aa002..3e52b50f028b 100644 --- a/tests/xtro-sharpie/watchOS-PassKit.ignore +++ b/tests/xtro-sharpie/watchOS-PassKit.ignore @@ -18,25 +18,3 @@ ## This is already deprecated !missing-selector! PKPassLibrary::activatePaymentPass:withActivationData:completion: not bound - -# Initial result from new rule extra-null-allowed -!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_CountryCode(System.String)' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_CurrencyCode(System.String)' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_MerchantIdentifier(System.String)' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_PaymentSummaryItems(PassKit.PKPaymentSummaryItem[])' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentRequest::set_SupportedNetworks(Foundation.NSString[])' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentSummaryItem::set_Amount(Foundation.NSDecimalNumber)' has a extraneous [NullAllowed] on parameter #0 -!extra-null-allowed! 'System.Void PassKit.PKPaymentSummaryItem::set_Label(System.String)' has a extraneous [NullAllowed] on parameter #0 - -# Initial result from new rule missing-null-allowed -!missing-null-allowed! 'Foundation.NSDate PassKit.PKPass::get_RelevantDate()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary PassKit.PKPass::get_UserInfo()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject PassKit.PKPass::GetLocalizedValue(Foundation.NSString)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl PassKit.PKPass::get_WebServiceUrl()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'PassKit.PKPass PassKit.PKPassLibrary::GetPass(System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'PassKit.PKPaymentPass PassKit.PKPass::get_PaymentPass()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'PassKit.PKShippingMethod PassKit.PKPayment::get_ShippingMethod()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String PassKit.PKPass::get_AuthenticationToken()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.Void PassKit.PKPaymentAuthorizationResult::set_Errors(Foundation.NSError[])' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void PassKit.PKPaymentRequestPaymentMethodUpdate::set_Errors(Foundation.NSError[])' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.Void PassKit.PKPaymentRequestShippingContactUpdate::set_Errors(Foundation.NSError[])' is missing an [NullAllowed] on parameter #0 diff --git a/tests/xtro-sharpie/watchOS-PassKit.todo b/tests/xtro-sharpie/watchOS-PassKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/watchOS-UIKit.ignore b/tests/xtro-sharpie/watchOS-UIKit.ignore index f8508cb84de7..7cddc25d3cda 100644 --- a/tests/xtro-sharpie/watchOS-UIKit.ignore +++ b/tests/xtro-sharpie/watchOS-UIKit.ignore @@ -10,8 +10,6 @@ !missing-selector! +UIColor::colorNamed:inBundle:compatibleWithTraitCollection: not bound ## lack of availabilty macros on NSItemProvder.PreferredPresentationStyle - intro says they are not available -!missing-selector! NSItemProvider::preferredPresentationStyle not bound -!missing-selector! NSItemProvider::setPreferredPresentationStyle: not bound ## and that also means the (enum/returned) type is unused !missing-enum! UIPreferredPresentationStyle not bound @@ -50,3 +48,5 @@ !missing-null-allowed! 'Foundation.NSFileWrapper Foundation.NSAttributedString::GetFileWrapperFromRange(Foundation.NSRange,Foundation.NSDictionary,Foundation.NSError&)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject UIKit.UIFontDescriptor::GetObject(Foundation.NSString)' is missing an [NullAllowed] on return type !missing-null-allowed! 'UIKit.UIFontDescriptor UIKit.UIFontDescriptor::CreateWithTraits(UIKit.UIFontDescriptorSymbolicTraits)' is missing an [NullAllowed] on return type + +!unknown-field! UIUserNotificationActionResponseTypedTextKey bound \ No newline at end of file diff --git a/tests/xtro-sharpie/watchOS-UIKit.todo b/tests/xtro-sharpie/watchOS-UIKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/watchOS-WatchKit.todo b/tests/xtro-sharpie/watchOS-WatchKit.todo deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/xtro-sharpie/xtro-sanity/Sanitizer.cs b/tests/xtro-sharpie/xtro-sanity/Sanitizer.cs index b1a1720b2046..63d0c34eeffd 100644 --- a/tests/xtro-sharpie/xtro-sanity/Sanitizer.cs +++ b/tests/xtro-sharpie/xtro-sanity/Sanitizer.cs @@ -5,7 +5,39 @@ namespace Extrospection { class Sanitizer { - static readonly string [] Platforms = new [] { "iOS", "tvOS", "watchOS", "macOS" }; + static List platforms; + + static List Platforms { + get { + if (platforms != null) + return platforms; + + platforms = new List (4); + foreach (var line in File.ReadAllLines ("../../Make.config")) { + var eq = line.IndexOf ('='); + if (eq == -1) + continue; + if (!line.StartsWith ("INCLUDE_", StringComparison.Ordinal)) + continue; + + switch (line.Substring (0, eq)) { + case "INCLUDE_IOS": + platforms.Add ("iOS"); + break; + case "INCLUDE_TVOS": + platforms.Add ("tvOS"); + break; + case "INCLUDE_WATCH": + platforms.Add ("watchOS"); + break; + case "INCLUDE_MAC": + platforms.Add ("macOS"); + break; + } + } + return platforms; + } + } static bool IsEntry (string line) { @@ -71,6 +103,8 @@ static void NoDuplicateInCommonIgnores () static void NoIgnoredTodo () { foreach (var file in Directory.GetFiles (directory, "*.todo")) { + if (!IsIncluded (file)) + continue; var last = file.LastIndexOf ('-'); var fx = file.Substring (last + 1, file.Length - last - 6); // check if it's in common or in the same platform @@ -95,9 +129,21 @@ static void NoIgnoredTodo () } } + static bool IsIncluded (string file) + { + var name = Path.GetFileName (file); + foreach (var p in Platforms) { + if (name.StartsWith (p, StringComparison.Ordinal)) + return true; + } + return false; + } + static void NoFixedTodo () { foreach (var file in Directory.GetFiles (directory, "*.todo")) { + if (!IsIncluded (file)) + continue; var last = file.LastIndexOf ('-'); var fx = file.Substring (last + 1, file.Length - last - 6); var raw = Path.ChangeExtension (file, ".raw"); @@ -133,6 +179,7 @@ public static void Log (string s) public static int Main (string [] args) { directory = args.Length == 0 ? "." : args [0]; + Environment.CurrentDirectory = directory; // cache stuff foreach (var file in Directory.GetFiles (directory, "common-*.ignore")) { @@ -151,6 +198,8 @@ public static int Main (string [] args) CorrectEntries (common, $"common-{fx}.ignore"); } foreach (var file in Directory.GetFiles (directory, "*.ignore")) { + if (!IsIncluded (file)) + continue; var filename = Path.GetFileName (file); // already processed from cache - don't reload them if (filename.StartsWith ("common-", StringComparison.Ordinal)) @@ -181,7 +230,7 @@ public static int Main (string [] args) var fx = kvp.Key; var common = kvp.Value; //ExistingCommonEntries (common, $"common-{fx}.ignore"); - List [] raws = new List [Platforms.Length]; + List [] raws = new List [Platforms.Count]; for (int i=0; i < raws.Length; i++) { var fname = Path.Combine (directory, $"{Platforms[i]}-{fx}.raw"); if (File.Exists (fname)) @@ -213,6 +262,8 @@ public static int Main (string [] args) } // * a platform ignore must existing in it's corresponding raw file foreach (var file in Directory.GetFiles (directory, "*.ignore")) { + if (!IsIncluded (file)) + continue; var shortname = Path.GetFileName (file); if (shortname.StartsWith ("common-", StringComparison.Ordinal)) continue; diff --git a/tools/common/Application.cs b/tools/common/Application.cs index e15c36c3f17c..23b3ce619e4a 100644 --- a/tools/common/Application.cs +++ b/tools/common/Application.cs @@ -308,13 +308,13 @@ public string Name { public bool RequiresPInvokeWrappers { get { -#if MTOUCH + if (Platform == ApplePlatform.MacOSX) + return false; + if (IsSimulatorBuild) return false; + return MarshalObjectiveCExceptions == MarshalObjectiveCExceptionMode.ThrowManagedException || MarshalObjectiveCExceptions == MarshalObjectiveCExceptionMode.Abort; -#else - return false; -#endif } } diff --git a/tools/common/Assembly.cs b/tools/common/Assembly.cs index b9c81c212d66..668bbd333621 100644 --- a/tools/common/Assembly.cs +++ b/tools/common/Assembly.cs @@ -277,12 +277,10 @@ void ProcessLinkWithAttributes (AssemblyDefinition assembly) void AssertiOSVersionSupportsUserFrameworks (string path) { -#if MONOTOUCH - if (App.Platform == Xamarin.Utils.ApplePlatform.iOS && App.DeploymentTarget.Major < 8) { + if (App.Platform == ApplePlatform.iOS && App.DeploymentTarget.Major < 8) { throw ErrorHelper.CreateError (1305, Errors.MT1305, FileName, Path.GetFileName (path), App.DeploymentTarget); } -#endif } void ProcessNativeReferenceOptions (NativeReferenceMetadata metadata) @@ -452,11 +450,7 @@ void AddFramework (string file) if (Driver.GetFrameworks (App).TryGetValue (file, out var framework) && framework.Version > App.SdkVersion) ErrorHelper.Warning (135, Errors.MX0135, file, FileName, App.PlatformName, framework.Version, App.SdkVersion); else { -#if MTOUCH var strong = (framework == null) || (App.DeploymentTarget >= (App.IsSimulatorBuild ? framework.VersionAvailableInSimulator ?? framework.Version : framework.Version)); -#else - var strong = (framework == null) || (App.DeploymentTarget >= framework.Version); -#endif if (strong) { if (Frameworks.Add (file)) Driver.Log (3, "Linking with the framework {0} because it's referenced by a module reference in {1}", file, FileName); @@ -499,12 +493,10 @@ public void ComputeLinkerFlags () string file = Path.GetFileNameWithoutExtension (name); -#if !MONOMAC if (App.IsSimulatorBuild && !App.IsFrameworkAvailableInSimulator (file)) { Driver.Log (3, "Not linking with {0} (referenced by a module reference in {1}) because it's not available in the simulator.", file, FileName); continue; } -#endif switch (file) { // special case @@ -548,24 +540,24 @@ public void ComputeLinkerFlags () Driver.Log (3, "Linking with the framework OpenAL because {0} is referenced by a module reference in {1}", file, FileName); break; default: -#if MONOMAC - string path = Path.GetDirectoryName (name); - if (!path.StartsWith ("/System/Library/Frameworks", StringComparison.Ordinal)) - continue; - - // CoreServices has multiple sub-frameworks that can be used by customer code - if (path.StartsWith ("/System/Library/Frameworks/CoreServices.framework/", StringComparison.Ordinal)) { - if (Frameworks.Add ("CoreServices")) - Driver.Log (3, "Linking with the framework CoreServices because {0} is referenced by a module reference in {1}", file, FileName); - break; - } - // ApplicationServices has multiple sub-frameworks that can be used by customer code - if (path.StartsWith ("/System/Library/Frameworks/ApplicationServices.framework/", StringComparison.Ordinal)) { - if (Frameworks.Add ("ApplicationServices")) - Driver.Log (3, "Linking with the framework ApplicationServices because {0} is referenced by a module reference in {1}", file, FileName); - break; + if (App.Platform == ApplePlatform.MacOSX) { + string path = Path.GetDirectoryName (name); + if (!path.StartsWith ("/System/Library/Frameworks", StringComparison.Ordinal)) + continue; + + // CoreServices has multiple sub-frameworks that can be used by customer code + if (path.StartsWith ("/System/Library/Frameworks/CoreServices.framework/", StringComparison.Ordinal)) { + if (Frameworks.Add ("CoreServices")) + Driver.Log (3, "Linking with the framework CoreServices because {0} is referenced by a module reference in {1}", file, FileName); + break; + } + // ApplicationServices has multiple sub-frameworks that can be used by customer code + if (path.StartsWith ("/System/Library/Frameworks/ApplicationServices.framework/", StringComparison.Ordinal)) { + if (Frameworks.Add ("ApplicationServices")) + Driver.Log (3, "Linking with the framework ApplicationServices because {0} is referenced by a module reference in {1}", file, FileName); + break; + } } -#endif // detect frameworks int f = name.IndexOf (".framework/", StringComparison.Ordinal); diff --git a/tools/common/Frameworks.cs b/tools/common/Frameworks.cs index 2a51fa4cb7dc..63522d7a4d8f 100644 --- a/tools/common/Frameworks.cs +++ b/tools/common/Frameworks.cs @@ -5,6 +5,8 @@ using Mono.Cecil; using Xamarin.Bundler; +using Xamarin.Utils; +using Registrar; #endif using Xamarin.Utils; @@ -210,6 +212,17 @@ public static Frameworks MacFrameworks { //{ "CoreHaptics", "CoreHaptics", 10,15 }, { "AutomaticAssessmentConfiguration", "AutomaticAssessmentConfiguration", 10,15,4 }, + + { "Accessibility", "Accessibility", 11,0 }, + { "AppTrackingTransparency", "AppTrackingTransparency", 11,0 }, + { "CallKit", "CallKit", 11,0 }, + { "ClassKit", "ClassKit", 11,0 }, + { "MLCompute", "MLCompute", 11,0 }, + { "PassKit", "PassKit", 11,0 }, + { "ReplayKit", "ReplayKit", 11,0 }, + { "ScreenTime", "ScreenTime", 11,0 }, + { "UniformTypeIdentifiers", "UniformTypeIdentifiers", 11,0 }, + { "UserNotificationsUI", "UserNotificationsUI", 11,0 }, }; } return mac_frameworks; @@ -317,7 +330,7 @@ public static Frameworks GetiOSFrameworks (bool is_simulator_build) { "IntentsUI", "IntentsUI", 10 }, { "ARKit", "ARKit", 11 }, - { "CoreNFC", "CoreNFC", 11, true }, /* not always present, e.g. iPad w/iOS 12, so must be weak linked */ + { "CoreNFC", "CoreNFC", new Version (11, 0), NotAvailableInSimulator, true }, /* not always present, e.g. iPad w/iOS 12, so must be weak linked; doesn't work in the simulator in Xcode 12 (https://stackoverflow.com/q/63915728/183422) */ { "DeviceCheck", "DeviceCheck", new Version (11, 0), new Version (13, 0) }, { "IdentityLookup", "IdentityLookup", 11 }, { "IOSurface", "IOSurface", new Version (11, 0), NotAvailableInSimulator /* Not available in the simulator (the header is there, but broken) */ }, @@ -348,6 +361,16 @@ public static Frameworks GetiOSFrameworks (bool is_simulator_build) { "AutomaticAssessmentConfiguration", "AutomaticAssessmentConfiguration", 13, 4 }, + { "Accessibility", "Accessibility", 14,0 }, + { "AppClip", "AppClip", 14,0 }, + { "AppTrackingTransparency", "AppTrackingTransparency", 14,0 }, + { "MediaSetup", "MediaSetup", new Version (14, 0), NotAvailableInSimulator /* no headers in beta 3 */ }, + { "MLCompute", "MLCompute", new Version (14,0), NotAvailableInSimulator }, + { "NearbyInteraction", "NearbyInteraction", 14,0 }, + { "ScreenTime", "ScreenTime", 14,0 }, + { "SensorKit", "SensorKit", 14,0 }, + { "UniformTypeIdentifiers", "UniformTypeIdentifiers", 14,0 }, + // the above MUST be kept in sync with simlauncher // see tools/mtouch/Makefile // please also keep it sorted to ease comparison @@ -411,8 +434,10 @@ public static Frameworks GetwatchOSFrameworks (bool is_simulator_build) { "PushKit", "PushKit", 6 }, { "SoundAnalysis", "SoundAnalysis", 6 }, { "CoreMedia", "CoreMedia", 6 }, - { "StoreKit", "StoreKit", 6,2 } + { "StoreKit", "StoreKit", 6,2 }, + { "Accessibility", "Accessibility", 7,0 }, + { "UniformTypeIdentifiers", "UniformTypeIdentifiers", 7,0 }, }; } return watch_frameworks; @@ -492,6 +517,14 @@ public static Frameworks TVOSFrameworks { { "AuthenticationServices", "AuthenticationServices", 13,0 }, { "SoundAnalysis", "SoundAnalysis", 13,0 }, { "BackgroundTasks", "BackgroundTasks", 13, 0 }, + + { "Accessibility", "Accessibility", 14,0 }, + { "AppTrackingTransparency", "AppTrackingTransparency", 14,0 }, + { "CoreHaptics", "CoreHaptics", 14, 0 }, + { "LinkPresentation", "LinkPresentation", 14,0 }, + { "MLCompute", "MLCompute", new Version (14,0), NotAvailableInSimulator }, + { "UniformTypeIdentifiers", "UniformTypeIdentifiers", 14,0 }, + { "Intents", "Intents", 14,0 }, }; } return tvos_frameworks; @@ -542,9 +575,14 @@ static void Gather (Application app, AssemblyDefinition product_assembly, HashSe if (app.IsSimulatorBuild && !framework.IsFrameworkAvailableInSimulator (app)) continue; - var add_to = app.DeploymentTarget >= framework.Version ? frameworks : weak_frameworks; + var weak_link = framework.AlwaysWeakLinked || app.DeploymentTarget < framework.Version; + var add_to = weak_link ? weak_frameworks : frameworks; add_to.Add (framework.Name); } + + // Make sure there are no duplicates between frameworks and weak frameworks. + // Keep the weak ones. + frameworks.ExceptWith (weak_frameworks); } static bool FilterFrameworks (Application app, Framework framework) diff --git a/tools/common/Target.cs b/tools/common/Target.cs index 6739957cbd07..94cca995641d 100644 --- a/tools/common/Target.cs +++ b/tools/common/Target.cs @@ -106,10 +106,8 @@ public PlatformLinkContext GetLinkContext () { if (LinkContext != null) return LinkContext; -#if MTOUCH if (App.IsExtension && App.IsCodeShared) return ContainerTarget.GetLinkContext (); -#endif return null; } @@ -223,7 +221,6 @@ public void GatherFrameworks () case "Metal": case "MetalKit": case "MetalPerformanceShaders": - case "CoreNFC": // some frameworks do not exists on simulators and will result in linker errors if we include them if (App.IsSimulatorBuild) continue; @@ -248,6 +245,16 @@ public void GatherFrameworks () continue; } break; + default: + if (App.IsSimulatorBuild && !App.IsFrameworkAvailableInSimulator (framework.Name)) { + if (App.LinkMode != LinkMode.None) { + ErrorHelper.Warning (5223, Errors.MX5223, framework.Name, App.PlatformName); + } else { + Driver.Log (3, Errors.MX5223, framework.Name, App.PlatformName); + } + continue; + } + break; #endif } @@ -312,11 +319,12 @@ public void CollectAllSymbols () dynamic_symbols.AddFunction ("mono_pmip"); bool has_dyn_msgSend; -#if MONOTOUCH - has_dyn_msgSend = App.IsSimulatorBuild; -#else - has_dyn_msgSend = App.MarshalObjectiveCExceptions != MarshalObjectiveCExceptionMode.Disable && !App.RequiresPInvokeWrappers && Is64Build; -#endif + + if (App.Platform == ApplePlatform.MacOSX) { + has_dyn_msgSend = App.MarshalObjectiveCExceptions != MarshalObjectiveCExceptionMode.Disable && !App.RequiresPInvokeWrappers && Is64Build; + } else { + has_dyn_msgSend = App.IsSimulatorBuild; + } if (has_dyn_msgSend) { dynamic_symbols.AddFunction ("xamarin_dyn_objc_msgSend"); @@ -352,19 +360,17 @@ bool IsRequiredSymbol (Symbol symbol, Assembly single_assembly = null) if (single_assembly != null && !symbol.Members.Any ((v) => v.Module.Assembly == single_assembly.AssemblyDefinition)) return false; // nope, this symbol is not used in the assembly we're using as filter. -#if MTOUCH // If we're code-sharing, the managed linker might have found symbols // that are not in any of the assemblies in the current app. // This occurs because the managed linker processes all the // assemblies for all the apps together, but when linking natively // we're only linking with the assemblies that actually go into the app. - if (App.IsCodeShared && symbol.Assemblies.Count > 0) { + if (App.Platform != ApplePlatform.MacOSX && App.IsCodeShared && symbol.Assemblies.Count > 0) { // So if this is a symbol related to any assembly, make sure // at least one of those assemblies are in the current app. if (!symbol.Assemblies.Any ((v) => Assemblies.Contains (v))) return false; } -#endif switch (symbol.Type) { case SymbolType.Field: diff --git a/tools/common/TargetFramework.cs b/tools/common/TargetFramework.cs index 4ed3d2205610..9c629828a623 100644 --- a/tools/common/TargetFramework.cs +++ b/tools/common/TargetFramework.cs @@ -14,6 +14,11 @@ namespace Xamarin.Utils { public struct TargetFramework : IEquatable { + public const string DotNet_5_0_iOS_String = ".NETCoreApp,Version=5.0,Profile=ios"; // Short form: net5.0-ios + public const string DotNet_5_0_tvOS_String = ".NETCoreApp,Version=5.0,Profile=tvos"; // Short form: net5.0-tvos + public const string DotNet_5_0_watchOS_String = ".NETCoreApp,Version=5.0,Profile=watchos"; // Short form: net5.0-watchos + public const string DotNet_5_0_macOS_String = ".NETCoreApp,Version=5.0,Profile=macos"; // Short form: net5.0-macos + public static readonly TargetFramework Empty = new TargetFramework (); public static readonly TargetFramework Net_2_0 = Parse ("2.0"); public static readonly TargetFramework Net_3_0 = Parse ("3.0"); @@ -30,10 +35,10 @@ public struct TargetFramework : IEquatable public static readonly TargetFramework Xamarin_Mac_4_5_Full = Parse ("Xamarin.Mac,Version=v4.5,Profile=Full"); public static readonly TargetFramework Xamarin_Mac_4_5_System = Parse ("Xamarin.Mac,Version=v4.5,Profile=System"); - public static readonly TargetFramework DotNet_5_0_iOS = Parse (".NETCoreApp,Version=5.0,Profile=ios"); // Short form: net5.0-ios - public static readonly TargetFramework DotNet_5_0_tvOS = Parse (".NETCoreApp,Version=5.0,Profile=tvos"); // Short form: net5.0-tvos - public static readonly TargetFramework DotNet_5_0_watchOS = Parse (".NETCoreApp,Version=5.0,Profile=watchos"); // Short form: net5.0-watchos - public static readonly TargetFramework DotNet_5_0_macOS = Parse (".NETCoreApp,Version=5.0,Profile=macos"); // Short form: net5.0-macos + public static readonly TargetFramework DotNet_5_0_iOS = Parse (DotNet_5_0_iOS_String); + public static readonly TargetFramework DotNet_5_0_tvOS = Parse (DotNet_5_0_tvOS_String); + public static readonly TargetFramework DotNet_5_0_watchOS = Parse (DotNet_5_0_watchOS_String); + public static readonly TargetFramework DotNet_5_0_macOS = Parse (DotNet_5_0_macOS_String); public static readonly TargetFramework [] ValidFrameworksMac = new [] { Xamarin_Mac_2_0_Mobile, Xamarin_Mac_4_5_Full, Xamarin_Mac_4_5_System, diff --git a/tools/devops/device-tests/templates/device-tests.yml b/tools/devops/device-tests/templates/device-tests.yml index 3483ab940b5b..520d32c9bb9e 100644 --- a/tools/devops/device-tests/templates/device-tests.yml +++ b/tools/devops/device-tests/templates/device-tests.yml @@ -301,6 +301,7 @@ steps: TESTS_EXTRA_ARGUMENTS: ${{ parameters.testsLabels }} USE_XAMARIN_STORAGE: ${{ parameters.useXamarinStorage }} VSDROPS_URI: '${{ parameters.vsdropsPrefix }}/$(Build.BuildNumber)/$(Build.BuildId);/tests/' # uri used to create the vsdrops index using full uri + USE_TCP_TUNNEL: 'true' displayName: 'Run tests' name: runTests # not to be confused with the displayName, this is used to later use the name of the step to access the output variables from an other job timeoutInMinutes: 600 diff --git a/tools/dotnet-linker/SetupStep.cs b/tools/dotnet-linker/SetupStep.cs index 1c121fe05e3f..64a7c6ce7117 100644 --- a/tools/dotnet-linker/SetupStep.cs +++ b/tools/dotnet-linker/SetupStep.cs @@ -25,6 +25,17 @@ public List Steps { } } + void InsertBefore (IStep step, string stepName) + { + for (int i = 0; i < Steps.Count; i++) { + if (Steps [i].GetType ().Name == stepName) { + Steps.Insert (i, step); + return; + } + } + throw new InvalidOperationException ($"Could not insert {step} before {stepName} because {stepName} wasn't found."); + } + void InsertAfter (IStep step, string stepName) { for (int i = 0; i < Steps.Count;) { @@ -46,10 +57,15 @@ protected override void Process () // This would not be needed of LinkContext.GetAssemblies () was exposed to us. InsertAfter (new CollectAssembliesStep (), "LoadReferencesStep"); + var pre_dynamic_dependency_lookup_substeps = new DotNetSubStepDispatcher (); + InsertBefore (pre_dynamic_dependency_lookup_substeps, "DynamicDependencyLookupStep"); + var prelink_substeps = new DotNetSubStepDispatcher (); InsertAfter (prelink_substeps, "RemoveSecurityStep"); if (Configuration.LinkMode != LinkMode.None) { + pre_dynamic_dependency_lookup_substeps.Add (new PreserveBlockCodeSubStep ()); + // We need to run the ApplyPreserveAttribute step even we're only linking sdk assemblies, because even // though we know that sdk assemblies will never have Preserve attributes, user assemblies may have // [assembly: LinkSafe] attributes, which means we treat them as sdk assemblies and those may have diff --git a/tools/dotnet-linker/Steps/ConfigurationAwareSubStep.cs b/tools/dotnet-linker/Steps/ConfigurationAwareSubStep.cs new file mode 100644 index 000000000000..60d1b2dc549a --- /dev/null +++ b/tools/dotnet-linker/Steps/ConfigurationAwareSubStep.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using Mono.Linker; +using Mono.Linker.Steps; + +using Xamarin.Bundler; +using Xamarin.Tuner; + +namespace Xamarin.Linker { + public abstract class ConfigurationAwareSubStep : BaseSubStep { + public LinkerConfiguration Configuration { get; private set; } + + public DerivedLinkContext LinkContext { + get { return Configuration.DerivedLinkContext; } + } + + public override sealed void Initialize (LinkContext context) + { + base.Initialize (context); + + Configuration = LinkerConfiguration.GetInstance (context); + } + + protected void Report (Exception exception) + { + ErrorHelper.Show (exception); + } + + protected void Report (List exceptions) + { + // Maybe there's a better way to show errors that integrates with the linker? + // We can't just throw an exception or exit here, since there might be only warnings in the list of exceptions. + ErrorHelper.Show (exceptions); + } + } +} + diff --git a/tools/dotnet-linker/Steps/PreserveBlockCodeSubStep.cs b/tools/dotnet-linker/Steps/PreserveBlockCodeSubStep.cs new file mode 100644 index 000000000000..d7e9b1b5cb60 --- /dev/null +++ b/tools/dotnet-linker/Steps/PreserveBlockCodeSubStep.cs @@ -0,0 +1,152 @@ +using System; +using System.Linq; + +using Mono.Cecil; + +using Mono.Linker.Steps; +using Mono.Tuner; + +using Xamarin.Bundler; + +namespace Xamarin.Linker.Steps { + public class PreserveBlockCodeSubStep : ConfigurationAwareSubStep { + MethodDefinition ctor_string_def; + MethodReference ctor_string_ref; + + public override SubStepTargets Targets { + get { + return SubStepTargets.Assembly | + SubStepTargets.Field | + SubStepTargets.Type; + } + } + + MethodReference GetConstructorReference (AssemblyDefinition assembly) + { + if (ctor_string_def == null) { + // Find the method definition for the constructor we want to use + foreach (var asm in Configuration.Assemblies) { + var dependencyAttribute = asm.MainModule.GetType ("System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute"); + if (dependencyAttribute == null) + continue; + + foreach (var method in dependencyAttribute.Methods) { + if (!method.HasParameters) + continue; + + if (method.Parameters.Count == 1 && method.Parameters [0].ParameterType.Is ("System", "String")) { + ctor_string_def = method; + break; + } + } + + break; + } + + if (ctor_string_def == null) + throw ErrorHelper.CreateError (99, Errors.MX0099, "Could not find the constructor 'System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute..ctor(System.String)'"); + } + + // Import the constructor into the current assembly if it hasn't already been imported + ctor_string_ref ??= assembly.MainModule.ImportReference (ctor_string_def); + + return ctor_string_ref; + } + + public override void ProcessAssembly (AssemblyDefinition assembly) + { + // Clear out the method reference we have, so that we import the method definition again + ctor_string_ref = null; + + base.ProcessAssembly (assembly); + } + + public override void ProcessField (FieldDefinition field) + { + base.ProcessField (field); + + PreserveBlockField (field); + } + + void PreserveBlockField (FieldDefinition field) + { + /* For the following class: + + static internal class SDInnerBlock { + // this field is not preserved by other means, but it must not be linked away + static internal readonly DInnerBlock Handler = Invoke; + + [MonoPInvokeCallback (typeof (DInnerBlock))] + static internal void Invoke (IntPtr block, int magic_number) + { + } + } + + We need to make sure the linker doesn't remove the Handler field + and the Invoke method. Unfortunately there's no programmatic way + to preserve a field dependent upon the preservation of the + containing type, so we have to inject a DynamicDependency + attribute. And since we can't add a DynamicDependency attribute on + the type itself, we add it to the Invoke method. We also need to + preserve the Invoke method (which is done programmatically). Our + generator generates the required attributes, but since we have to + work with existing assemblies, we detect the scenario here as well + and inject the attributes manually if they're not already there. + + */ + + // First make sure we got the right field + // The containing type for the field we're looking for is abstract, sealed and nested and contains exactly 1 field. + var td = field.DeclaringType; + if (!td.IsAbstract || !td.IsSealed || !td.IsNested) + return; + if (td.Fields.Count != 1) + return; + + // The containing type is also nested inside ObjCRuntime.Trampolines class) + var nestingType = td.DeclaringType; + if (!nestingType.Is ("ObjCRuntime", "Trampolines")) + return; + + // The field itself is a readonly field named 'Handler' + if (!field.IsInitOnly) + return; + if (field.Name != "Handler") + return; + + // One problem is that we can't add the DynamicDependency attribute to the type, nor the field itself, + // so we add it to the Invoke method in the same type. + if (!td.HasMethods) + return; + + var method = td.Methods.SingleOrDefault (v => { + if (v.Name != "Invoke") + return false; + if (v.Parameters.Count == 0) + return false; + if (!v.HasCustomAttributes) + return false; + if (!v.CustomAttributes.Any (v => v.AttributeType.Name == "MonoPInvokeCallbackAttribute")) + return false; + return true; + }); + + if (method == null) + return; + + // We need to preserve the method, if the type is used (unless it's already preserved) + if (!method.CustomAttributes.Any (v => v.AttributeType.Name == "PreserveAttribute")) + Annotations.AddPreservedMethod (method.DeclaringType, method); + + // Does the method already have a DynamicDependency attribute? If so, no need to add another one + if (method.CustomAttributes.Any (v => v.AttributeType.Is ("System.Diagnostics.CodeAnalysis", "DynamicDependencyAttribute"))) + return; + + // Create and add the DynamicDependency attribute to the method + var ctor = GetConstructorReference (field.DeclaringType.Module.Assembly); + var attrib = new CustomAttribute (ctor); + attrib.ConstructorArguments.Add (new CustomAttributeArgument (ctor.Parameters [0].ParameterType, "Handler")); + method.CustomAttributes.Add (attrib); + } + } +} diff --git a/tools/governance/cgmanifest.json b/tools/governance/cgmanifest.json index 0db33d037fcb..7079bc7b3b82 100644 --- a/tools/governance/cgmanifest.json +++ b/tools/governance/cgmanifest.json @@ -5,7 +5,7 @@ "Type": "git", "Git": { "RepositoryUrl": "https://github.com/spouliot/Touch.Unit.git", - "CommitHash": "6c5bb930b35cf326d1f650eac0a5ac9e679a4e09" + "CommitHash": "89afaf7e05a942c87231cf5601b3a5b59640e218" } }, "DevelopmentDependency": true @@ -15,7 +15,7 @@ "Type": "git", "Git": { "RepositoryUrl": "https://github.com/xamarin/Xamarin.MacDev", - "CommitHash": "45c5a680e20a209ac846a32e0f2f0f83e843ab76" + "CommitHash": "7ea83265099f904eaeb487a7b6a579e9e77d9433" } }, "DevelopmentDependency": false @@ -35,7 +35,7 @@ "Type": "git", "Git": { "RepositoryUrl": "https://github.com/xamarin/macios-binaries", - "CommitHash": "3fbdcdb97459ca2c699d47e33028a106b95a7f1f" + "CommitHash": "d33e206ce7978d2ec0019989a1add727c87ea1cf" } }, "DevelopmentDependency": false diff --git a/tools/mlaunch/Makefile b/tools/mlaunch/Makefile index bb3c44d9c052..054e62744ea8 100644 --- a/tools/mlaunch/Makefile +++ b/tools/mlaunch/Makefile @@ -6,6 +6,12 @@ COLOR_GREEN:=$(shell tput setaf 120 2>/dev/null) COLOR_CLEAR:=$(shell tput sgr0 2>/dev/null) ifdef ENABLE_XAMARIN +ifdef INCLUDE_MAC +ENABLE_MLAUNCH=1 +endif +endif + +ifdef ENABLE_MLAUNCH all-local install-local clean-local:: $(MAKE) -C $(MACCORE_PATH)/tools/mlaunch $@ else diff --git a/tools/mtouch/Errors.designer.cs b/tools/mtouch/Errors.designer.cs index 932e835190a2..23ca46dfd967 100644 --- a/tools/mtouch/Errors.designer.cs +++ b/tools/mtouch/Errors.designer.cs @@ -2284,6 +2284,12 @@ internal static string MX5222 { return ResourceManager.GetString("MX5222", resourceCulture); } } + + internal static string MX5223 { + get { + return ResourceManager.GetString("MX5223", resourceCulture); + } + } internal static string MT5301 { get { diff --git a/tools/mtouch/Errors.resx b/tools/mtouch/Errors.resx index 6917422c9207..6203d8355709 100644 --- a/tools/mtouch/Errors.resx +++ b/tools/mtouch/Errors.resx @@ -1946,11 +1946,20 @@ Linking against framework '{0}'. It is prohibited (rejected) by the Mac App Store + - - The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - + + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new + + + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + + Missing 'strip' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/Makefile b/tools/mtouch/Makefile index 9502bab26bbc..3d0f2646ae9b 100644 --- a/tools/mtouch/Makefile +++ b/tools/mtouch/Makefile @@ -160,6 +160,14 @@ SIMLAUNCHER_FRAMEWORKS = \ -weak_framework VisionKit \ \ -weak_framework AutomaticAssessmentConfiguration \ + \ + -weak_framework Accessibility \ + -weak_framework AppClip \ + -weak_framework AppTrackingTransparency \ + -weak_framework ScreenTime \ + -weak_framework SensorKit \ + -weak_framework UniformTypeIdentifiers \ + -weak_framework NearbyInteraction \ # keep the above list of weak_framework # 1. grouped by iOS versions; diff --git a/tools/mtouch/Target.mtouch.cs b/tools/mtouch/Target.mtouch.cs index 70fddb2a9fef..843e59c1f2ab 100644 --- a/tools/mtouch/Target.mtouch.cs +++ b/tools/mtouch/Target.mtouch.cs @@ -1471,11 +1471,10 @@ public NativeLinkTask NativeLink (BuildTasks build_tasks, Abi abi, string output linker_flags.AddOtherFlag ("-shared"); linker_flags.AddOtherFlag ("-install_name", $"@rpath/{App.ExecutableName}.framework/{App.ExecutableName}"); } else { - string mainlib; + string mainlib = null; if (App.IsWatchExtension) { - mainlib = "libwatchextension.a"; linker_flags.AddOtherFlag ("-e", "_xamarin_watchextension_main"); - if (App.SdkVersion.Major >= 6) { + if (App.SdkVersion.Major >= 6 && App.DeploymentTarget.Major < 6) { // watchOS 6.0's WatchKit contains a WKExtensionMain function, and that's the entry point for Xcode-compiled watch extensions. // To make watch extensions work on earlier watchOS versions, there's a libWKExtensionMainLegacy.a library with a // a WKExtensionMain function that does what's needed (Xcode links with this library when deployment target < 6.0). @@ -1488,8 +1487,10 @@ public NativeLinkTask NativeLink (BuildTasks build_tasks, Abi abi, string output } else { mainlib = "libapp.a"; } - var libmain = Path.Combine (Driver.GetProductSdkLibDirectory (App), mainlib); - linker_flags.AddLinkWith (libmain, true); + if (mainlib != null) { + var libmain = Path.Combine (Driver.GetProductSdkLibDirectory (App), mainlib); + linker_flags.AddLinkWith (libmain, true); + } } var libmonodir = Driver.GetMonoLibraryDirectory (App); diff --git a/tools/mtouch/mtouch.cs b/tools/mtouch/mtouch.cs index 9c5f4f432542..553907b336b0 100644 --- a/tools/mtouch/mtouch.cs +++ b/tools/mtouch/mtouch.cs @@ -492,22 +492,46 @@ public static string GenerateMain (Target target, IEnumerable assembli sw.WriteLine ("\treturn rv;"); sw.WriteLine ("}"); + string extension_main = null; + if (app.Platform == ApplePlatform.WatchOS && app.IsWatchExtension) { + // We're building a watch extension, and we have multiple scenarios, depending on the watchOS version we're executing on: + // + // * watchOS 2.0 -> 5.*: we must call a `main` function provided in the WatchKit framework. + // * watchOS 6.0 -> * : we must call a `WKExtensionMain` function provided in the WatchKit framework. + // * watchOS 7.0 -> * : The `WKExtensionMain` function uses dlsym to find any `main` functions in the + // main executable, and calls that function (otherwise WKExtensionMain will call + // UIApplicationMain and normal startup occurs) + // + // * We can't call our entry point "main", because we call WKExtensionMain, and then we run into an + // infinite loop on watchOS 7.0. So we call it xamarin_watch_extension_main. + // * The watchOS 6+ SDK helpfully provides a static library (WKExtensionMainLegacy) that has a + // WKExtensionMain function, which we use when the deployment target is earlier than watchOS 6.0. + // This means that calling WKExtensionMain works everywhere (as long as we're using the + // watchOS 6+ SDK to build; otherwise we just call "main" directly and don't link with the + // WKExtensionMainLegacy library) + + if (app.SdkVersion.Major >= 6) { + extension_main = "WKExtensionMain"; + } else { + extension_main = "main"; + } + } + + if (!string.IsNullOrEmpty (extension_main)) { + sw.WriteLine ($"extern \"C\" {{ int {extension_main} (int argc, char* argv[]); }}"); + sw.WriteLine (); + } + + sw.WriteLine (); sw.WriteLine ("void xamarin_initialize_callbacks () __attribute__ ((constructor));"); sw.WriteLine ("void xamarin_initialize_callbacks ()"); sw.WriteLine ("{"); sw.WriteLine ("\txamarin_setup = xamarin_setup_impl;"); sw.WriteLine ("\txamarin_register_assemblies = xamarin_register_assemblies_impl;"); sw.WriteLine ("\txamarin_register_modules = xamarin_register_modules_impl;"); + if (!string.IsNullOrEmpty (extension_main)) + sw.WriteLine ($"\txamarin_extension_main = {extension_main};"); sw.WriteLine ("}"); - - if (app.Platform == ApplePlatform.WatchOS && app.SdkVersion.Major >= 6 && app.IsWatchExtension) { - sw.WriteLine (); - sw.WriteLine ("extern \"C\" { int WKExtensionMain (int argc, char* argv[]); }"); - sw.WriteLine ("int main (int argc, char *argv[])"); - sw.WriteLine ("{"); - sw.WriteLine ("\treturn WKExtensionMain (argc, argv);"); - sw.WriteLine ("}"); - } } WriteIfDifferent (main_source, sb.ToString (), true); } catch (ProductException) { diff --git a/tools/mtouch/xlf/Errors.cs.xlf b/tools/mtouch/xlf/Errors.cs.xlf index c547653078fd..efb8be81cd2d 100644 --- a/tools/mtouch/xlf/Errors.cs.xlf +++ b/tools/mtouch/xlf/Errors.cs.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - +
+ + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.de.xlf b/tools/mtouch/xlf/Errors.de.xlf index 6112c4b4e70f..23f98c6c8c09 100644 --- a/tools/mtouch/xlf/Errors.de.xlf +++ b/tools/mtouch/xlf/Errors.de.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - +
+ + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.es.xlf b/tools/mtouch/xlf/Errors.es.xlf index e20410cef7e6..d2539c17d461 100644 --- a/tools/mtouch/xlf/Errors.es.xlf +++ b/tools/mtouch/xlf/Errors.es.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - +
+ + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.fr.xlf b/tools/mtouch/xlf/Errors.fr.xlf index 0d641cfc8a50..d6b05e33b713 100644 --- a/tools/mtouch/xlf/Errors.fr.xlf +++ b/tools/mtouch/xlf/Errors.fr.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - + + + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.it.xlf b/tools/mtouch/xlf/Errors.it.xlf index d47f721d6b79..224ece11c25e 100644 --- a/tools/mtouch/xlf/Errors.it.xlf +++ b/tools/mtouch/xlf/Errors.it.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - + + + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.ja.xlf b/tools/mtouch/xlf/Errors.ja.xlf index 07299f49540d..059f1f3bb3bb 100644 --- a/tools/mtouch/xlf/Errors.ja.xlf +++ b/tools/mtouch/xlf/Errors.ja.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - + + + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.ko.xlf b/tools/mtouch/xlf/Errors.ko.xlf index 2608f82ef512..99d1ac277925 100644 --- a/tools/mtouch/xlf/Errors.ko.xlf +++ b/tools/mtouch/xlf/Errors.ko.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - + + + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.pl.xlf b/tools/mtouch/xlf/Errors.pl.xlf index d51fe5ad42c4..b5ca11e4629b 100644 --- a/tools/mtouch/xlf/Errors.pl.xlf +++ b/tools/mtouch/xlf/Errors.pl.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - + + + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.pt-BR.xlf b/tools/mtouch/xlf/Errors.pt-BR.xlf index 16ecc4d60164..34c61487e12c 100644 --- a/tools/mtouch/xlf/Errors.pt-BR.xlf +++ b/tools/mtouch/xlf/Errors.pt-BR.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - + + + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.ru.xlf b/tools/mtouch/xlf/Errors.ru.xlf index 3a227c379a13..8031bf13f1c6 100644 --- a/tools/mtouch/xlf/Errors.ru.xlf +++ b/tools/mtouch/xlf/Errors.ru.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - + + + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.tr.xlf b/tools/mtouch/xlf/Errors.tr.xlf index 6c08e7d6eb20..6b25bb0d4d9d 100644 --- a/tools/mtouch/xlf/Errors.tr.xlf +++ b/tools/mtouch/xlf/Errors.tr.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - + + + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.zh-Hans.xlf b/tools/mtouch/xlf/Errors.zh-Hans.xlf index 3faf117c4a56..5a11047d0338 100644 --- a/tools/mtouch/xlf/Errors.zh-Hans.xlf +++ b/tools/mtouch/xlf/Errors.zh-Hans.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - + + + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component diff --git a/tools/mtouch/xlf/Errors.zh-Hant.xlf b/tools/mtouch/xlf/Errors.zh-Hant.xlf index 98c61a02ac1f..03bb0347da83 100644 --- a/tools/mtouch/xlf/Errors.zh-Hant.xlf +++ b/tools/mtouch/xlf/Errors.zh-Hant.xlf @@ -2699,10 +2699,18 @@ The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - + The native linker failed to execute: {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new - - + + + + + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + Did not link with the framework '{0}', because the current {1} SDK does not contain support for this framework in the simulator. + This is a warning explaining why a native framework won't be referenced from the app when building for the simulator. The following are literal names and should not be translated: SDK + {0}: The name of the native framework + {1}: The current platform (will be either iOS, tvOS, watchOS or macOS). + Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component