Merge remote-tracking branch 'remotes/origin/xcode10' into xcode10-network

This commit is contained in:
Miguel de Icaza 2018-07-27 13:45:55 -04:00
Родитель 70ffd63b05 3bb8f82e19
Коммит b8cf7b2bd8
359 изменённых файлов: 3078 добавлений и 1946 удалений

Просмотреть файл

@ -44,7 +44,7 @@ endif
# TODO: reset to 0 after major/minor version bump (SRO) and increment for service releases and previews
# Note: if not reseted to 0 we can skip a version and start with .1 or .2
PACKAGE_VERSION_REV=1
PACKAGE_VERSION_REV=2
IOS_PACKAGE_VERSION_REV=$(PACKAGE_VERSION_REV)
IOS_PRODUCT=Xamarin.iOS
@ -59,8 +59,8 @@ IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_M
# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=10.0
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_10_Beta_3.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode10-beta3.app/Contents/Developer
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_10_Beta_4.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode10-beta4.app/Contents/Developer
XCODE94_VERSION=9.4
XCODE94_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_9.4.xip
@ -126,11 +126,11 @@ endif
XCODE_MAC_SDKROOT=$(XCODE_DEVELOPER_ROOT)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
XCODE94_MAC_SDKROOT=$(XCODE94_DEVELOPER_ROOT)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
MAC_CC=$(CCACHE)$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot $(XCODE_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC)
MAC_CXX=$(CCACHE)$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot $(XCODE_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC)
MAC_CC=$(CCACHE)$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot $(XCODE_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC) -stdlib=libc++
MAC_CXX=$(CCACHE)$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot $(XCODE_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC) -stdlib=libc++
MAC32_CC=$(CCACHE)$(XCODE94_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot $(XCODE94_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC)
MAC32_CXX=$(CCACHE)$(XCODE94_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot $(XCODE94_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC)
MAC32_CC=$(CCACHE)$(XCODE94_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot $(XCODE94_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC) -stdlib=libc++
MAC32_CXX=$(CCACHE)$(XCODE94_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot $(XCODE94_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC) -stdlib=libc++
# This is the temporary directory where the various builds are installed
BUILD_DESTDIR=$(abspath $(TOP)/builds/install)

2
external/mono поставляемый

@ -1 +1 @@
Subproject commit 10feb7c1d86bf82a1928706d3a905a38d111c58b
Subproject commit db33692ca02ab8cf75dbb2c44a64cce036e4ba9e

144
jenkins/Jenkinsfile поставляемый
Просмотреть файл

@ -171,21 +171,85 @@ def uploadFiles (glob, virtualPath)
])
}
def runXamarinMacTests (url, macOS)
// There must be a better way than this hack to show a
// message in red in the Jenkins Blue Ocean UI...
def echoError (message)
{
try {
error (message)
} catch (e) {
// Ignore
}
}
def indexOfElement (list, element)
{
for (def i = 0; i < list.size (); i++) {
if (list [i] == element)
return i
}
return -1
}
def runXamarinMacTests (url, macOS, maccore_hash, xamarin_macios_hash)
{
def failed = false
def workspace = "${env.HOME}/jenkins/workspace/xamarin-macios"
def failedTests = []
try {
echo ("Executing on ${env.NODE_NAME}")
echo ("URL: ${url}")
sh ("env")
sh ("rm -f *.zip")
sh ("curl -L '${url}' --output mac-test-package.zip")
sh ("rm -rf mac-test-package")
sh ("unzip -o mac-test-package.zip")
sh ("cd mac-test-package && ./system-dependencies.sh --provision-mono --ignore-autotools --ignore-xamarin-studio --ignore-xcode --ignore-osx --ignore-cmake")
sh ("make -C mac-test-package/tests exec-mac-dontlink")
sh ("make -C mac-test-package/tests exec-mac-apitest")
sh ("mkdir -p '${workspace}'")
dir ("${workspace}") {
// Download the script we need, and then execute it, so that we
// don't clone all of xamarin-macios to get a single file.
// Due to how github has implemented pull requests, this works
// even for pull requests from forks, since each commit in the pull request
// is also available from the main repository.
sh ("""
curl -fLO https://raw.githubusercontent.com/xamarin/xamarin-macios/${xamarin_macios_hash}/jenkins/prepare-packaged-macos-tests.sh
chmod +x prepare-packaged-macos-tests.sh
./prepare-packaged-macos-tests.sh '${url}' '${maccore_hash}'
""")
def tests = [ "dontlink", "apitest", "introspection", "linksdk", "linkall", "xammac_tests" ];
tests.each { test ->
def t = "${test}"
try {
timeout (time: 10, unit: 'MINUTES') {
sh ("make -C mac-test-package/tests exec-mac-${t} MONO_DEBUG=no-gdb-backtrace")
echo ("${t} succeeded")
}
} catch (error) {
echoError ("${t} failed with error: ${error}")
failed = true
failedTests.add (t)
}
}
}
} finally {
sh ("rm -rf mac-test-package *.zip")
sh ("rm -rf ${workspace}/mac-test-package ${workspace}/*.zip")
// Find and upload any crash reports
sh (script: """
rm -Rf ${workspace}/crash-reports
mkdir ${workspace}/crash-reports
find ~/Library/Logs/DiagnosticReports/ -mtime -10m -exec cp {} ${workspace}/crash-reports \\;
ls -la ${workspace}/crash-reports
""",
returnStatus: true /* Don't fail if something goes wrong */)
try {
if (findFiles (glob: "crash-reports/*").length > 0) {
archiveArtifacts ("${workspace}/crash-reports/*")
} else {
echo ("No crash reports found")
}
} catch (e) {
// Ignore any archiving errors.
}
}
if (failed) {
def failureMessage = "Xamarin.Mac tests on ${macOS} failed (${failedTests.join (', ')})"
manager.addErrorBadge (failureMessage)
error (failureMessage)
}
}
@ -419,9 +483,15 @@ timestamps {
echo ("Generator diff: ${reportPrefix}/generator-diff/index.html")
}
def hasXamarinMacTests = true
stage ("Package XM tests") {
currentStage = "${STAGE_NAME}"
sh ("make -C ${workspace}/xamarin-macios/tests package-tests")
def exitCode = sh (script: "make -C ${workspace}/xamarin-macios/tests package-tests", returnStatus: true)
if (exitCode != 0) {
hasXamarinMacTests = false
manager.addErrorBadge ("Failed to package Xamarin.Mac tests (exit code: ${exitCode}")
manager.buildUnstable ()
}
uploadFiles ("tests/*.zip", virtualPath)
}
@ -437,22 +507,46 @@ timestamps {
def builders = [:]
// Add test runs on older macOS versions
def url = "https://bosstoragemirror.blob.core.windows.net/wrench/${virtualPath}/tests/mac-test-package.zip"
def firstOS = sh (returnStdout: true, script: "grep ^MIN_OSX_SDK_VERSION= '${workspace}/xamarin-macios/Make.config' | sed 's/.*=//'").trim ().split ("\\.")[1].toInteger ()
def lastOS = sh (returnStdout: true, script: "grep ^OSX_SDK_VERSION= '${workspace}/xamarin-macios/Make.config' | sed 's/.*=//'").trim ().split ("\\.")[1].toInteger ()
for (os = firstOS; os < lastOS; os++) {
def macOS = "${os}" // Need to bind the label variable before the closure
builders ["XM tests on 10.${macOS}"] = {
try {
node ("xamarin-macios && macos-10.${macOS}") {
stage ("Running XM tests on '10.${macOS}'") {
runXamarinMacTests (url, "macOS 10.${macOS}")
if (hasXamarinMacTests) {
def url = "https://bosstoragemirror.blob.core.windows.net/wrench/${virtualPath}/tests/mac-test-package.zip"
def maccore_hash = sh (script: "grep NEEDED_MACCORE_VERSION ${workspace}/xamarin-macios/mk/xamarin.mk | sed 's/NEEDED_MACCORE_VERSION := //'", returnStdout: true).trim ()
// Get the min and current macOS version from Make.config,
// and calculate all the macOS versions in between (including both end points).
// The trims/splits/toIntegers at the end are to select the minor part of the macOS version number,
// then we just loop from the minor part of the min version to the minor part of the current version.
def firstOS = sh (returnStdout: true, script: "grep ^MIN_OSX_SDK_VERSION= '${workspace}/xamarin-macios/Make.config' | sed 's/.*=//'").trim ().split ("\\.")[1].toInteger ()
def lastOS = sh (returnStdout: true, script: "grep ^OSX_SDK_VERSION= '${workspace}/xamarin-macios/Make.config' | sed 's/.*=//'").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):
// excludedOSes.add (14)
// 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 = indexOfElement (excludedOSes, os) >= 0
def nodeText = excluded ? " XM tests not executed on 10.${macOS} " : "XM tests on 10.${macOS}"
builders [nodeText] = {
try {
if (excluded) {
echo (nodeText)
} else {
node ("xamarin-macios && macos-10.${macOS}") {
stage ("Running XM tests on '10.${macOS}'") {
runXamarinMacTests (url, "macOS 10.${macOS}", maccore_hash, gitHash)
}
}
}
} catch (err) {
currentStage = "Running XM tests on '10.${macOS}'"
def msg = err.getMessage ();
if (msg == "")
msg = "Xamarin.Mac tests on 10.${macOS} failed"
appendFileComment ("🔥 [${msg}](${env.RUN_DISPLAY_URL}) 🔥\n")
throw err
}
} catch (err) {
currentStage = "Running XM tests on '10.${macOS}'"
appendFileComment ("🔥 [Xamarin.Mac tests on 10.${macOS} failed](${env.RUN_DISPLAY_URL}) 🔥\n")
throw err
}
}
}

Просмотреть файл

@ -7,3 +7,29 @@ be executed is as follows:
* build.sh : Builds the project.
* run-tests.sh : Runs the tests.
* build-api-diff.sh : Builds the API diff.
# Jenkinsfile
This file contains the logic to run on our internal Jenkins, available here: http://xamarin-jenkins/blue/organizations/jenkins/macios/activity
The Jenkins job is a multi-branch pipeline job, it will execute in the
following conditions:
* For all branches in the xamarin org (not forks) that has a
jenkins/Jenkinsfile file.
* For all pull requests from people with write access (also conditional on
having a jenkins/Jenkinsfile file).
In very broad strokes, the Jenkins job will:
* Checkout xamarin-macios
* Build
* Create packages, upload them to Azure and publish the links to the packages
as GitHub statuses.
* Run our test suite.
* Run selected Xamarin.Mac tests on all macOS versions we support. This is
done in parallel with the normal test run.
If a particular macOS version must be excluded temporarily from testing,
search Jenkinsfile for `excludedOSes` and follow the instructions you'll
find.

Просмотреть файл

@ -0,0 +1,46 @@
#!/bin/bash -e
# don't change the current directory here
URL=$1
MACCORE_HASH=$2
if test -z "$URL"; then
echo "First argument must be the url for the packaged mac tests."
exit 1
fi
if test -z "$MACCORE_HASH"; then
echo "Second argument must be the maccore hash."
exit 1
fi
# Allow some bot-specific configuration.
# Some bots use this to change PATH to where a custom version of ruby is installed.
if test -f ~/.jenkins-profile; then
# SC1090: Can't follow non-constant source. Use a directive to specify location.
# shellcheck disable=SC1090
source ~/.jenkins-profile;
fi
env
rm -f -- ./*.zip
curl -fL "$URL" --output mac-test-package.zip
rm -rf mac-test-package
unzip -o mac-test-package.zip
cd mac-test-package && ./system-dependencies.sh --provision-mono --ignore-autotools --ignore-xamarin-studio --ignore-xcode --ignore-osx --ignore-cmake
# fetch script to install provisioning profiles and run it
if test -d maccore; then
cd maccore
if ! git fetch origin; then
cd ..
rm -Rf maccore
fi
fi
if ! test -d maccore; then
git clone git@github.com:xamarin/maccore
cd maccore
fi
git reset --hard "$MACCORE_HASH"
cd ..
./maccore/tools/install-qa-provisioning-profiles.sh

Просмотреть файл

@ -1,5 +1,5 @@
ifdef ENABLE_XAMARIN
NEEDED_MACCORE_VERSION := a49e4f2ca17086ddebade8100a1a06d2c816a63d
NEEDED_MACCORE_VERSION := f8b60dc6f04442ef006c018288446a047d2b359f
NEEDED_MACCORE_BRANCH := xcode10
MACCORE_DIRECTORY := maccore

Просмотреть файл

@ -639,6 +639,7 @@ Copyright (C) 2014 Xamarin. All rights reserved.
IntermediateOutputPath="$(IntermediateOutputPath)"
ProjectDir="$(MSBuildProjectDirectory)"
ResourcePrefix="$(XamMacResourcePrefix)"
SdkPlatform="MacOSX"
SdkDevPath="$(_SdkDevPath)"
SdkRoot="$(_SdkRoot)"
SdkVersion="$(MacOSXSdkVersion)">

Просмотреть файл

@ -0,0 +1,27 @@
namespace Xamarin.MacDev.Tasks
{
public static class PlatformUtils
{
public static string GetTargetPlatform (string sdkPlatform, bool isWatchApp)
{
switch (sdkPlatform) {
case "iPhoneSimulator":
return isWatchApp ? "watchsimulator" : "iphonesimulator";
case "iPhoneOS":
return isWatchApp ? "watchos" : "iphoneos";
case "MacOSX":
return "macosx";
case "WatchSimulator":
return "watchsimulator";
case "WatchOS":
return "watchos";
case "AppleTVSimulator":
return "appletvsimulator";
case "AppleTVOS":
return "appletvos";
}
return null;
}
}
}

Просмотреть файл

@ -178,29 +178,10 @@ namespace Xamarin.MacDev.Tasks
args.Add ("--minimum-deployment-target", minimumDeploymentTarget);
switch (SdkPlatform) {
case "iPhoneSimulator":
args.Add ("--platform", IsWatchApp ? "watchsimulator" : "iphonesimulator");
break;
case "iPhoneOS":
args.Add ("--platform", IsWatchApp ? "watchos" : "iphoneos");
break;
case "MacOSX":
args.Add ("--platform", "macosx");
break;
case "WatchSimulator":
args.Add ("--platform", "watchsimulator");
break;
case "WatchOS":
args.Add ("--platform", "watchos");
break;
case "AppleTVSimulator":
args.Add ("--platform", "appletvsimulator");
break;
case "AppleTVOS":
args.Add ("--platform", "appletvos");
break;
}
var platform = PlatformUtils.GetTargetPlatform (SdkPlatform, IsWatchApp);
if (platform != null)
args.Add ("--platform", platform);
}
IEnumerable<ITaskItem> GetCompiledBundleResources (PDictionary output, string intermediateBundleDir)

Просмотреть файл

@ -21,6 +21,8 @@ namespace Xamarin.MacDev.Tasks
[Required]
public string IntermediateOutputPath { get; set; }
public bool IsWatchApp { get; set; }
[Required]
public string ProjectDir { get; set; }
@ -33,6 +35,9 @@ namespace Xamarin.MacDev.Tasks
[Required]
public string SdkDevPath { get; set; }
[Required]
public string SdkPlatform { get; set; }
[Required]
public string SdkRoot { get; set; }
@ -106,7 +111,16 @@ namespace Xamarin.MacDev.Tasks
args.Add ("-o");
args.AddQuoted (Path.GetFullPath (output));
args.AddQuotedFormat ("--sdk-root={0}", SdkRoot);
args.AddQuotedFormat ("--target-version-{0}={1}", OperatingSystem, SdkVersion);
if (AppleSdkSettings.XcodeVersion.Major >= 10) {
var platform = PlatformUtils.GetTargetPlatform (SdkPlatform, IsWatchApp);
if (platform != null)
args.Add ("--target-platform", platform);
args.AddQuotedFormat ("--target-version={0}", SdkVersion);
} else {
args.AddQuotedFormat ("--target-version-{0}={1}", OperatingSystem, SdkVersion);
}
args.AddQuotedFormat ("--target-build-dir={0}", Path.GetFullPath (intermediate));
var startInfo = GetProcessStartInfo (environment, GetFullPathToTool (), args.ToString ());

Просмотреть файл

@ -54,6 +54,7 @@
<!-- Mono has a different implementation of the Move task, so when building on a Mac we need to include XBuildMoveTaskBase.cs -->
<Compile Include="MsBuildTasks\MoveTaskBase.cs" Condition="'$(OS)' == 'Windows_NT'" />
<Compile Include="MsBuildTasks\XBuildMoveTaskBase.cs" Condition="'$(OS)' != 'Windows_NT'" />
<Compile Include="PlatformUtils.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="MsBuildTasks\CopyBase.cs" />

Просмотреть файл

@ -1281,6 +1281,8 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)"
ProjectDir="$(MSBuildProjectDirectory)"
ResourcePrefix="$(IPhoneResourcePrefix)"
IsWatchApp="$(IsWatchApp)"
SdkPlatform="$(_SdkPlatform)"
SdkDevPath="$(_SdkDevPath)"
SdkRoot="$(_SdkRoot)"
SdkVersion="$(MtouchSdkVersion)">

Просмотреть файл

@ -154,11 +154,6 @@ namespace Xamarin.iOS.Tasks
[Test]
public void RebuildWatchAppNoChanges ()
{
if (config == "Release") {
// https://trello.com/c/pvuuoF6b/115-41119081-clang-cant-compile-in-xcode-10-beta-1-something-that-compiled-fine-with-xcode-94-error-in-backend-unsupported-calling-c
Assert.Ignore ("Radar: 41119081");
}
bool expectedCodesignResults = Platform != "iPhoneSimulator";
BuildProject ("MyWatch2Container", Platform, config, clean: true);
@ -177,11 +172,6 @@ namespace Xamarin.iOS.Tasks
[Test]
public void CodesignAfterModifyingWatchApp2Test ()
{
if (config == "Release") {
// https://trello.com/c/pvuuoF6b/115-41119081-clang-cant-compile-in-xcode-10-beta-1-something-that-compiled-fine-with-xcode-94-error-in-backend-unsupported-calling-c
Assert.Ignore ("Radar: 41119081");
}
var csproj = BuildProject ("MyWatch2Container", Platform, config, clean: true);
var testsDir = Path.GetDirectoryName (Path.GetDirectoryName (csproj));
var appexProjectDir = Path.Combine (testsDir, "MyWatchKit2Extension");

Просмотреть файл

@ -2450,26 +2450,6 @@ namespace AppKit {
Full
}
// Convenience enum for string values in ObjC
public enum NSSharingServiceName : int {
PostOnFacebook,
PostOnTwitter,
PostOnSinaWeibo,
ComposeEmail,
ComposeMessage,
SendViaAirDrop,
AddToSafariReadingList,
AddToIPhoto,
AddToAperture,
UseAsTwitterProfileImage,
UseAsDesktopPicture,
PostImageOnFlickr,
PostVideoOnVimeo,
PostVideoOnYouku,
PostVideoOnTudou,
CloudSharing
}
[Flags]
[Native]
public enum NSTypesetterControlCharacterAction : ulong {

Просмотреть файл

@ -8,58 +8,10 @@ namespace AppKit
{
public static NSSharingService GetSharingService (NSSharingServiceName service)
{
switch (service) {
case NSSharingServiceName.PostOnFacebook:
return NSSharingService.GetSharingService(NSSharingServiceNamePostOnFacebook);
case NSSharingServiceName.PostOnTwitter:
return NSSharingService.GetSharingService(NSSharingServiceNamePostOnTwitter);
case NSSharingServiceName.PostOnSinaWeibo:
return NSSharingService.GetSharingService(NSSharingServiceNamePostOnSinaWeibo);
case NSSharingServiceName.ComposeEmail:
return NSSharingService.GetSharingService(NSSharingServiceNameComposeEmail);
case NSSharingServiceName.ComposeMessage:
return NSSharingService.GetSharingService(NSSharingServiceNameComposeMessage);
case NSSharingServiceName.SendViaAirDrop:
return NSSharingService.GetSharingService(NSSharingServiceNameSendViaAirDrop);
case NSSharingServiceName.AddToSafariReadingList:
return NSSharingService.GetSharingService(NSSharingServiceNameAddToSafariReadingList);
case NSSharingServiceName.AddToIPhoto:
return NSSharingService.GetSharingService(NSSharingServiceNameAddToIPhoto);
case NSSharingServiceName.AddToAperture:
return NSSharingService.GetSharingService(NSSharingServiceNameAddToAperture);
case NSSharingServiceName.UseAsTwitterProfileImage:
return NSSharingService.GetSharingService(NSSharingServiceNameUseAsTwitterProfileImage);
case NSSharingServiceName.UseAsDesktopPicture:
return NSSharingService.GetSharingService(NSSharingServiceNameUseAsDesktopPicture);
case NSSharingServiceName.PostImageOnFlickr:
return NSSharingService.GetSharingService(NSSharingServiceNamePostImageOnFlickr);
case NSSharingServiceName.PostVideoOnVimeo:
return NSSharingService.GetSharingService(NSSharingServiceNamePostVideoOnVimeo);
case NSSharingServiceName.PostVideoOnYouku:
return NSSharingService.GetSharingService(NSSharingServiceNamePostVideoOnYouku);
case NSSharingServiceName.PostVideoOnTudou:
return NSSharingService.GetSharingService(NSSharingServiceNamePostVideoOnTudou);
case NSSharingServiceName.CloudSharing:
return NSSharingService.GetSharingService (NSSharingServiceNameCloudSharing);
default:
var constant = service.GetConstant ();
if (constant == null)
return null;
}
return NSSharingService.GetSharingService (constant);
}
}
}

Просмотреть файл

@ -333,7 +333,7 @@ namespace CoreServices {
return _AuthenticationSchemeDigest.Handle;
case AuthenticationScheme.OAuth1:
if (_AuthenticationSchemeOAuth1 == null)
throw new NotSupportedException ("requires iOS 7.0 or OSX 10.9");
throw new NotSupportedException ("Requires iOS 7.0 or macOS 10.9 and lower than iOS 12 or macOS 10.14");
return _AuthenticationSchemeOAuth1.Handle;
default:
throw new ArgumentException ();

Просмотреть файл

@ -52,5 +52,6 @@ namespace ObjCRuntime {
// WatchOS 5
public const string NaturalLanguageLibrary = "/System/Library/Frameworks/Frameworks/NaturalLanguage.framework/NaturalLanguage";
public const string MediaPlayerLibrary = "/System/Library/Frameworks/MediaPlayer.framework/MediaPlayer";
}
}

Просмотреть файл

@ -209,6 +209,7 @@ namespace CoreBluetooth {
#if MONOMAC
// workaround for 27160443 – Trello: https://trello.com/c/oqB27JA6
// try new constant (10.13+) and fallback to the old/misnamed one
[Mac (10, 13)]
public static NSString CharacteristicValidRangeString {
get {
return CBUUIDCharacteristicValidRangeString ?? CBUUIDValidRangeString;

Просмотреть файл

@ -0,0 +1,24 @@
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using ObjCRuntime;
using CoreFoundation;
using Foundation;
namespace CoreMidi {
[NoWatch, NoTV, Mac (10,14, onlyOn64: true), iOS (12,0)]
[StructLayout (LayoutKind.Sequential)]
public struct MidiCIDeviceIdentification {
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
public byte[] Manufacturer;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
public byte[] Family;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
public byte[] ModelNumber;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
public byte[] RevisionLevel;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
public byte[] Reserved;
}
}

Просмотреть файл

@ -45,6 +45,7 @@ using Foundation;
using MidiObjectRef = System.Int32;
using MidiClientRef = System.Int32;
using MidiDeviceRef = System.Int32;
using MidiDeviceListRef = System.Int32;
using MidiPortRef = System.Int32;
using MidiEndpointRef = System.Int32;
using MidiEntityRef = System.Int32;
@ -221,6 +222,9 @@ namespace CoreMidi {
internal static IntPtr kMIDIPropertyTransmitsNotes;
internal static IntPtr kMIDIPropertyTransmitsProgramChanges;
internal static IntPtr kMIDIPropertyUniqueID;
internal static IntPtr kMIDIDriverPropertyUsesSerial;
internal static IntPtr kMIDIPropertyFactoryPatchNameFile;
internal static IntPtr kMIDIPropertyUserPatchNameFile;
static MidiObject ()
{
@ -273,6 +277,9 @@ namespace CoreMidi {
kMIDIPropertyTransmitsNotes = Dlfcn.GetIntPtr (midiLibrary, "kMIDIPropertyTransmitsNotes");
kMIDIPropertyTransmitsProgramChanges = Dlfcn.GetIntPtr (midiLibrary, "kMIDIPropertyTransmitsProgramChanges");
kMIDIPropertyUniqueID = Dlfcn.GetIntPtr (midiLibrary, "kMIDIPropertyUniqueID");
kMIDIDriverPropertyUsesSerial = Dlfcn.GetIntPtr (midiLibrary, "kMIDIDriverPropertyUsesSerial");
kMIDIPropertyFactoryPatchNameFile = Dlfcn.GetIntPtr (midiLibrary, "kMIDIPropertyFactoryPatchNameFile");
kMIDIPropertyUserPatchNameFile = Dlfcn.GetIntPtr (midiLibrary, "kMIDIPropertyUserPatchNameFile");
}
#if XAMCORE_2_0
@ -1446,6 +1453,10 @@ namespace CoreMidi {
[DllImport (Constants.CoreMidiLibrary)]
extern static MidiEntityRef MIDIDeviceGetEntity (MidiDeviceRef handle, nint item);
[NoiOS]
[DllImport (Constants.CoreMidiLibrary)]
extern static int MIDIDeviceAddEntity (MidiDeviceRef device, /* CFString */ IntPtr name, bool embedded, nuint numSourceEndpoints, nuint numDestinationEndpoints, MidiEntityRef newEntity);
public MidiEntity GetEntity (nint entityIndex)
{
if (handle == MidiObject.InvalidRef)
@ -1456,6 +1467,16 @@ namespace CoreMidi {
return new MidiEntity (h);
}
[NoiOS]
public int Add (string name, bool embedded, nuint numSourceEndpoints, nuint numDestinationEndpoints, MidiEntity newEntity)
{
if (handle == MidiObject.InvalidRef)
throw new ObjectDisposedException ("handle");
using (NSString nsName = new NSString (name)) {
return MIDIDeviceAddEntity (handle, nsName.Handle, embedded, numSourceEndpoints, numDestinationEndpoints, newEntity.Handle);
}
}
public nint EntityCount {
get {
return MIDIDeviceGetNumberOfEntities (handle);
@ -1498,6 +1519,34 @@ namespace CoreMidi {
}
}
public bool UsesSerial {
get {
return GetInt (kMIDIDriverPropertyUsesSerial) != 0;
}
set {
SetInt (kMIDIDriverPropertyUsesSerial, value ? 1 : 0);
}
}
public string FactoryPatchNameFile {
get {
return GetString (kMIDIPropertyFactoryPatchNameFile);
}
set {
SetString (kMIDIPropertyFactoryPatchNameFile, value);
}
}
public string UserPatchNameFile {
get {
return GetString (kMIDIPropertyUserPatchNameFile);
}
set {
SetString (kMIDIPropertyUserPatchNameFile, value);
}
}
public int AdvanceScheduleTimeMuSec {
get {
return GetInt (kMIDIPropertyAdvanceScheduleTimeMuSec);
@ -1838,6 +1887,65 @@ namespace CoreMidi {
internal MidiDevice (MidiDeviceRef handle, bool owns) : base (handle, owns)
{
}
#endif // !COREBUILD
}
public class MidiDeviceList : MidiObject {
#if !COREBUILD && MONOMAC
[DllImport (Constants.CoreMidiLibrary)]
static extern nuint MIDIDeviceListGetNumberOfDevices (MidiDeviceListRef devList);
[DllImport (Constants.CoreMidiLibrary)]
static extern MidiDeviceRef MIDIDeviceListGetDevice (MidiDeviceListRef devList, nuint index);
[DllImport (Constants.CoreMidiLibrary)]
static extern int MIDIDeviceListAddDevice (MidiDeviceListRef devList, MidiDeviceRef dev);
[DllImport (Constants.CoreMidiLibrary)]
static extern int MIDIDeviceListDispose (MidiDeviceListRef devList);
internal MidiDeviceList (MidiDeviceListRef handle) : base (handle)
{
}
internal MidiDeviceList (MidiDeviceListRef handle, bool owns) : base (handle, owns)
{
}
public nuint GetNumberOfDevices ()
{
if (handle == MidiObject.InvalidRef)
throw new ObjectDisposedException ("handle");
return MIDIDeviceListGetNumberOfDevices (handle);
}
public MidiDevice Get (nuint index)
{
if (handle == MidiObject.InvalidRef)
throw new ObjectDisposedException ("handle");
var h = MIDIDeviceListGetDevice (handle, index);
if (h == MidiObject.InvalidRef)
return null;
return new MidiDevice (h);
}
public int Add (MidiDevice device)
{
if (handle == MidiObject.InvalidRef)
throw new ObjectDisposedException ("handle");
return MIDIDeviceListAddDevice (handle, device.Handle);
}
internal override void DisposeHandle ()
{
if (handle != MidiObject.InvalidRef){
if (owns)
MIDIDeviceListDispose (handle);
handle = MidiObject.InvalidRef;
}
}
#endif // !COREBUILD
}

Просмотреть файл

@ -899,6 +899,8 @@ namespace Foundation {
Video,
Background,
Voice,
[Mac (10,14)][iOS (12,0)][Watch (5,0)][TV (12,0)]
ResponsiveData,
[Mac (10,12)][iOS (10,0)][Watch (3,0)][TV (10,0)]
CallSignaling = 11,
}

Просмотреть файл

@ -10,7 +10,7 @@ using Foundation;
namespace GameController {
[iOS (10,0), TV (9,0), Mac (10,9, onlyOn64: true)]
[iOS (10,0), TV (9,0), Mac (10,12, onlyOn64: true)]
// GCMicroGamepadSnapshot.h
// float_t are 4 bytes (at least for ARM64)
[StructLayout (LayoutKind.Sequential, Pack = 1)]
@ -44,8 +44,10 @@ namespace GameController {
// GCGamepadSnapshot.h
[DllImport (Constants.GameControllerLibrary)]
[Mac (10, 12)]
static extern bool GCMicroGamepadSnapShotDataV100FromNSData (out GCMicroGamepadSnapShotDataV100 snapshotData, /* NSData */ IntPtr data);
[Mac (10, 12)]
public static bool TryGetSnapshotData (NSData data, out GCMicroGamepadSnapShotDataV100 snapshotData)
{
return GCMicroGamepadSnapShotDataV100FromNSData (out snapshotData, data == null ? IntPtr.Zero : data.Handle);

Просмотреть файл

@ -7,7 +7,7 @@
// Copyright 2018 Microsoft Corporation.
//
#if XAMCORE_2_0 && !MONOMAC && !WATCH // We must remove !WATCH when MediaPlayer is enabled in watchOS
#if XAMCORE_2_0 && !MONOMAC
using System;
using Foundation;
using ObjCRuntime;

Просмотреть файл

@ -8,31 +8,13 @@ namespace Intents {
public partial class INSetClimateSettingsInCarIntent {
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
public INSetClimateSettingsInCarIntent (bool? enableFan, bool? enableAirConditioner, bool? enableClimateControl, bool? enableAutoMode, INCarAirCirculationMode airCirculationMode, NSNumber fanSpeedIndex, NSNumber fanSpeedPercentage, INRelativeSetting relativeFanSpeedSetting, NSMeasurement<NSUnitTemperature> temperature, INRelativeSetting relativeTemperatureSetting, INCarSeat climateZone) :
this (enableFan.HasValue ? new NSNumber (enableFan.Value) : null, enableAirConditioner.HasValue ? new NSNumber (enableAirConditioner.Value) : null,
enableClimateControl.HasValue ? new NSNumber (enableClimateControl.Value) : null, enableAutoMode.HasValue ? new NSNumber (enableAutoMode.Value) : null,
airCirculationMode, fanSpeedIndex, fanSpeedPercentage, relativeFanSpeedSetting, temperature, relativeTemperatureSetting, climateZone)
{
}
// if/when we update the generator to allow this pattern we can move this back
// into bindings and making them virtual (not a breaking change)
public bool? EnableFan {
get { return _EnableFan == null ? null : (bool?) _EnableFan.BoolValue; }
}
public bool? EnableAirConditioner {
get { return _EnableAirConditioner == null ? null : (bool?) _EnableAirConditioner.BoolValue; }
}
public bool? EnableClimateControl {
get { return _EnableClimateControl == null ? null : (bool?) _EnableClimateControl.BoolValue; }
}
public bool? EnableAutoMode {
get { return _EnableAutoMode == null ? null : (bool?) _EnableAutoMode.BoolValue; }
}
}
}

Просмотреть файл

@ -8,17 +8,11 @@ namespace Intents {
public partial class INSetDefrosterSettingsInCarIntent {
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
public INSetDefrosterSettingsInCarIntent (bool? enable, INCarDefroster defroster) :
this (enable.HasValue ? new NSNumber (enable.Value) : null, defroster)
{
}
// if/when we update the generator to allow this pattern we can move this back
// into bindings and making them virtual (not a breaking change)
public bool? Enable {
get { return _Enable == null ? null : (bool?) _Enable.BoolValue; }
}
}
}

Просмотреть файл

@ -9,12 +9,13 @@ namespace Intents {
public partial class INSetProfileInCarIntent {
[DesignatedInitializer]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
public INSetProfileInCarIntent (NSNumber profileNumber, string profileLabel, bool? defaultProfile) :
this (profileNumber, profileLabel, defaultProfile.HasValue ? new NSNumber (defaultProfile.Value) : null)
{
}
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
protected INSetProfileInCarIntent (NSNumber profileNumber, string profileLabel, NSNumber defaultProfile)
{
// Apple created this change in 10,2
@ -23,13 +24,6 @@ namespace Intents {
else
InitializeHandle (InitWithProfileNumberLabel (profileNumber, profileLabel, defaultProfile));
}
// if/when we update the generator to allow this pattern we can move this back
// into bindings and making them virtual (not a breaking change)
public bool? DefaultProfile {
get { return _DefaultProfile == null ? null : (bool?) _DefaultProfile.BoolValue; }
}
}
}

Просмотреть файл

@ -8,25 +8,11 @@ namespace Intents {
public partial class INSetSeatSettingsInCarIntent {
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
public INSetSeatSettingsInCarIntent (bool? enableHeating, bool? enableCooling, bool? enableMassage, INCarSeat seat, NSNumber level, INRelativeSetting relativeLevelSetting) :
this (enableHeating.HasValue ? new NSNumber (enableHeating.Value) : null, enableCooling.HasValue ? new NSNumber (enableCooling.Value) : null, enableMassage.HasValue ? new NSNumber (enableMassage.Value) : null, seat, level, relativeLevelSetting)
{
}
// if/when we update the generator to allow this pattern we can move this back
// into bindings and making them virtual (not a breaking change)
public bool? EnableCooling {
get { return _EnableCooling == null ? null : (bool?) _EnableCooling.BoolValue; }
}
public bool? EnableHeating {
get { return _EnableHeating == null ? null : (bool?) _EnableHeating.BoolValue; }
}
public bool? EnableMassage {
get { return _EnableMassage == null ? null : (bool?) _EnableMassage.BoolValue; }
}
}
}

Просмотреть файл

@ -9,7 +9,7 @@
// Copyright 2011-2012 Xamarin, Inc
//
#if !TVOS && !MONOMAC
#if !TVOS && !MONOMAC && !WATCH
using System;
using System.Collections;

Просмотреть файл

@ -9,7 +9,7 @@
// Copyright 2011-2012, 2014-2015 Xamarin, Inc
//
#if !TVOS && !MONOMAC
#if !TVOS && !MONOMAC && !WATCH
using System;
using Foundation;

Просмотреть файл

@ -6,7 +6,7 @@
// Copyright 2011-2015 Xamarin, Inc.
//
#if !TVOS && !MONOMAC
#if !TVOS && !MONOMAC && !WATCH
using System;
using System.Runtime.InteropServices;

Просмотреть файл

@ -18,6 +18,7 @@ namespace MediaPlayer {
[Native]
[NoMac]
[NoTV]
[NoWatch]
[Deprecated (PlatformName.iOS, 9, 0)]
public enum MPMoviePlaybackState : long {
Stopped,
@ -32,6 +33,7 @@ namespace MediaPlayer {
[Native]
[NoMac]
[NoTV]
[NoWatch]
[Deprecated (PlatformName.iOS, 9, 0)]
public enum MPMovieLoadState : long {
Unknown = 0,
@ -43,6 +45,7 @@ namespace MediaPlayer {
// NSInteger -> MPMoviePlayerController.h
[NoMac]
[NoTV]
[NoWatch]
[Deprecated (PlatformName.iOS, 9, 0)]
[Native]
public enum MPMovieRepeatMode : long {
@ -53,6 +56,7 @@ namespace MediaPlayer {
[Native]
[NoMac]
[NoTV]
[NoWatch]
[Deprecated (PlatformName.iOS, 9, 0)]
public enum MPMovieControlStyle : long {
None, Embedded, Fullscreen, Default = Embedded
@ -61,6 +65,7 @@ namespace MediaPlayer {
// NSInteger -> MPMoviePlayerController.h
[NoMac]
[NoTV]
[NoWatch]
[Deprecated (PlatformName.iOS, 9, 0)]
[Native]
public enum MPMovieFinishReason : long {
@ -70,6 +75,7 @@ namespace MediaPlayer {
// NSInteger -> MPMoviePlayerController.h
[NoMac]
[NoTV]
[NoWatch]
[Deprecated (PlatformName.iOS, 9, 0)]
[Native]
[Flags]
@ -82,6 +88,7 @@ namespace MediaPlayer {
// NSInteger -> MPMoviePlayerController.h
[NoMac]
[NoTV]
[NoWatch]
[Deprecated (PlatformName.iOS, 9, 0)]
[Native]
public enum MPMovieSourceType : long {
@ -91,6 +98,7 @@ namespace MediaPlayer {
// NSInteger -> MPMoviePlayerController.h
[NoMac]
[NoTV]
[NoWatch]
[Deprecated (PlatformName.iOS, 9, 0)]
[Native]
public enum MPMovieTimeOption : long {
@ -100,6 +108,7 @@ namespace MediaPlayer {
// NSUInteger -> MPMediaItem.h
[Native]
[NoWatch]
[Flags]
public enum MPMediaType : ulong {
#if !XAMCORE_2_0
@ -145,6 +154,7 @@ namespace MediaPlayer {
[Native]
[Flags]
[NoTV]
[NoWatch]
public enum MPMediaPlaylistAttribute : long {
None = 0,
OnTheGo = (1 << 0), // if set, the playlist was created on a device rather than synced from iTunes
@ -156,6 +166,7 @@ namespace MediaPlayer {
[Native]
[NoMac]
[NoTV]
[NoWatch]
public enum MPMediaGrouping : long {
Title,
Album,
@ -171,6 +182,7 @@ namespace MediaPlayer {
[Native]
[NoMac]
[NoTV]
[NoWatch]
public enum MPMediaPredicateComparison : long {
EqualsTo,
Contains
@ -179,6 +191,7 @@ namespace MediaPlayer {
// NSInteger -> MPMoviePlayerController.h
[NoMac]
[NoTV]
[NoWatch]
[Deprecated (PlatformName.iOS, 9, 0)]
[Native]
public enum MPMovieScalingMode : long {
@ -199,6 +212,7 @@ namespace MediaPlayer {
// NSInteger -> /MPMusicPlayerController.h
[NoMac]
[NoTV]
[NoWatch]
[Deprecated (PlatformName.iOS, 9, 0)]
[Native]
public enum MPMusicPlaybackState : long {
@ -213,6 +227,7 @@ namespace MediaPlayer {
// NSInteger -> /MPMusicPlayerController.h
[Native]
[NoMac]
[NoWatch]
[NoTV]
public enum MPMusicRepeatMode : long {
Default,
@ -225,6 +240,7 @@ namespace MediaPlayer {
[Native]
[NoMac]
[NoTV]
[NoWatch]
public enum MPMusicShuffleMode : long {
Default,
Off,
@ -235,6 +251,7 @@ namespace MediaPlayer {
public delegate void MPMediaItemEnumerator (string property, NSObject value, ref bool stop);
[Mac (10,12,2)]
[Watch (5,0)]
[Native]
public enum MPShuffleType : long
{
@ -244,6 +261,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2)]
[Watch (5,0)]
[Native]
public enum MPRepeatType : long
{
@ -254,6 +272,7 @@ namespace MediaPlayer {
[Mac (10,12,2)]
[iOS (10,0)]
[Watch (5,0)]
[Native]
public enum MPChangeLanguageOptionSetting : long
{
@ -266,6 +285,7 @@ namespace MediaPlayer {
[Native]
[Mac (10,12,2)]
[iOS (7,1)]
[Watch (5,0)]
public enum MPRemoteCommandHandlerStatus : long {
Success = 0,
NoSuchContent = 100,
@ -280,6 +300,7 @@ namespace MediaPlayer {
[Native]
[Mac (10,12,2)]
[iOS (7,1)]
[Watch (5,0)]
public enum MPSeekCommandEventType : ulong {
BeginSeeking,
EndSeeking
@ -287,6 +308,7 @@ namespace MediaPlayer {
[Mac (10,12,2)]
[iOS (9,0)]
[Watch (5,0)]
[Native]
public enum MPNowPlayingInfoLanguageOptionType : ulong {
Audible,
@ -294,6 +316,7 @@ namespace MediaPlayer {
}
[NoMac]
[NoWatch]
[iOS (9,3)]
[Native]
[ErrorDomain ("MPErrorDomain")]
@ -311,6 +334,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[iOS (9,3)]
[Native]
public enum MPMediaLibraryAuthorizationStatus : long {
@ -323,6 +347,7 @@ namespace MediaPlayer {
[Mac (10,12,2)]
[iOS (10,0)]
[TV (10,0)]
[Watch (5,0)]
[Native]
public enum MPNowPlayingInfoMediaType : ulong
{
@ -332,6 +357,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2)]
[Watch (5,0)]
[NoiOS]
[NoTV]
[Native]

Просмотреть файл

@ -32,6 +32,7 @@ using ObjCRuntime;
using Foundation;
namespace OpenGL {
[Deprecated (PlatformName.MacOSX, 10, 14, message : "Use 'Metal' Framework instead.")]
public class CGLContext : INativeObject, IDisposable {
IntPtr handle;

Просмотреть файл

@ -21,9 +21,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using ObjCRuntime;
namespace OpenGL {
[Deprecated (PlatformName.MacOSX, 10, 14, message : "Use 'Metal' Framework instead.")]
public enum CGLErrorCode : uint
{
NoError = 0, /* no error */
@ -48,6 +50,7 @@ namespace OpenGL {
}
[Deprecated (PlatformName.MacOSX, 10, 14, message : "Use 'Metal' Framework instead.")]
public enum CGLPixelFormatAttribute : uint
{
AllRenderers = 1,

Просмотреть файл

@ -32,6 +32,7 @@ using ObjCRuntime;
using Foundation;
namespace OpenGL {
[Deprecated (PlatformName.MacOSX, 10, 14, message : "Use 'Metal' Framework instead.")]
public class CGLPixelFormat : INativeObject, IDisposable {
internal IntPtr handle;

Просмотреть файл

@ -198,4 +198,12 @@ namespace PassKit {
BillingContactInvalid,
ShippingAddressUnserviceable,
}
[iOS (12,0)]
[NoWatch]
[Native]
public enum PKAddPaymentPassStyle : ulong {
Payment,
Access,
}
}

Просмотреть файл

@ -17,6 +17,23 @@ namespace SceneKit
{
public partial class SCNPhysicsShape
{
public static SCNPhysicsShape Create (SCNPhysicsShape [] shapes, SCNMatrix4 [] transforms)
{
if (shapes == null)
throw new ArgumentNullException ("shapes");
if (transforms == null)
throw new ArgumentNullException ("transforms");
var t = new NSValue [transforms.Length];
for (var i = 0; i < t.Length; i++)
t [i] = NSValue.FromSCNMatrix4 (transforms [i]);
return Create (shapes, t);
}
#if !XAMCORE_4_0
[Obsolete ("Use the 'Create' method that takes a 'SCNMatrix4 []'.")]
public static SCNPhysicsShape Create (SCNPhysicsShape [] shapes, SCNVector3 [] transforms)
{
if (shapes == null)
@ -31,6 +48,7 @@ namespace SceneKit
return Create (shapes, t);
}
#endif
public static SCNPhysicsShape Create (SCNGeometry geometry,
SCNPhysicsShapeType? shapeType = null,

Просмотреть файл

@ -0,0 +1,54 @@
//
// UIDocumentBrowserViewController.cs
//
// Copyright 2018 Microsoft
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if IOS
using System;
using Foundation;
using ObjCRuntime;
namespace UIKit {
public partial class UIDocumentBrowserViewController
{
static bool CheckSystemVersion () {
#if IOS
return UIKit.UIDevice.CurrentDevice.CheckSystemVersion (12, 0);
#else
#error Unknown platform
#endif
}
public virtual UIDocumentBrowserTransitionController GetTransitionController (NSUrl documentUrl)
{
if (CheckSystemVersion ())
return _NewGetTransitionController (documentUrl);
return _DeprecatedGetTransitionController (documentUrl);
}
}
}
#endif

Просмотреть файл

@ -4,6 +4,7 @@ using ObjCRuntime;
namespace WebKit {
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
public enum DomCssRuleType : ushort {
Unknown = 0,
Style = 1,
@ -18,6 +19,7 @@ namespace WebKit {
NamespaceRule = 10,
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
public enum DomCssValueType : ushort {
Inherit = 0,
PrimitiveValue = 1,
@ -25,6 +27,7 @@ namespace WebKit {
Custom = 3
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[Flags]
public enum DomDocumentPosition : ushort {
Disconnected = 0x01,
@ -35,6 +38,7 @@ namespace WebKit {
ImplementationSpecific = 0x20
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
public enum DomNodeType : ushort {
Element = 1,
Attribute = 2,
@ -50,6 +54,7 @@ namespace WebKit {
Notation = 12
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
public enum DomRangeCompareHow : ushort {
StartToStart = 0,
StartToEnd = 1,
@ -62,6 +67,7 @@ namespace WebKit {
DocumentViewer, DocumentBrowser, PrimaryWebBrowser
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
public enum DomEventPhase : ushort {
Capturing = 1, AtTarget, Bubbling
}
@ -104,6 +110,7 @@ namespace WebKit {
}
// Used as an 'unsigned int' parameter
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
public enum DomKeyLocation : uint {
Standard = 0,
Left = 1,
@ -112,6 +119,7 @@ namespace WebKit {
}
// Used as an 'int' parameter
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
public enum DomDelta : int {
Pixel = 0,
Line = 1,

Просмотреть файл

@ -757,7 +757,7 @@ namespace AppKit {
[Mac (10, 7), Field ("NSApplicationLaunchRemoteNotificationKey")]
NSString LaunchRemoteNotificationKey { get; }
[Mac (10, 7), Field ("NSApplicationLaunchUserNotificationKey")]
[Mac (10, 8), Field ("NSApplicationLaunchUserNotificationKey")]
NSString LaunchUserNotificationKey { get; }
[Notification, Field ("NSApplicationDidFinishRestoringWindowsNotification")]
@ -8466,10 +8466,6 @@ namespace AppKit {
[Export ("initWithData:")]
IntPtr Constructor (NSData attribs);
// TODO: wrap the CLContext and take a CLContext here instead.
//[Export ("initWithCGLPixelFormatObj:")]
//IntPtr Constructor (IntPtr cglContextHandle);
[Export ("getValues:forAttribute:forVirtualScreen:")]
void GetValue (ref int /* GLint = int32_t */ vals, NSOpenGLPixelFormatAttribute attrib, int /* GLint = int32_t */ screen);
@ -16612,8 +16608,7 @@ namespace AppKit {
}
[BaseType (typeof (NSResponder))]
// NSCoding is gone from Xcode 10 headers but API break to remove. Likely a mistake 41370178
interface NSViewController : NSUserInterfaceItemIdentification, NSCoding, NSEditor, NSSeguePerforming
interface NSViewController : NSResponder, NSUserInterfaceItemIdentification, NSEditor, NSSeguePerforming
#if XAMCORE_2_0
, NSExtensionRequestHandling
#endif
@ -18507,7 +18502,6 @@ namespace AppKit {
[BaseType (typeof (NSTextField))]
interface NSSecureTextField
// : NSViewToolTipOwner Header claims NSViewToolTipOwner but runtime does not respond - radar 41367075
{
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frameRect);
@ -22274,58 +22268,88 @@ namespace AppKit {
[Mac (10,9)]
[Export ("attachmentFileURLs", ArgumentSemantic.Copy)]
NSUrl [] AttachmentFileUrls { get; }
// Constants
NSUrl [] AttachmentFileUrls { get; }
}
[Field ("NSSharingServiceNamePostOnFacebook")][Internal]
NSString NSSharingServiceNamePostOnFacebook { get; }
[Field ("NSSharingServiceNamePostOnTwitter")][Internal]
NSString NSSharingServiceNamePostOnTwitter { get; }
[Field ("NSSharingServiceNamePostOnSinaWeibo")][Internal]
NSString NSSharingServiceNamePostOnSinaWeibo { get; }
[Field ("NSSharingServiceNameComposeEmail")][Internal]
NSString NSSharingServiceNameComposeEmail { get; }
[Field ("NSSharingServiceNameComposeMessage")][Internal]
NSString NSSharingServiceNameComposeMessage { get; }
[Field ("NSSharingServiceNameSendViaAirDrop")][Internal]
NSString NSSharingServiceNameSendViaAirDrop { get; }
[Field ("NSSharingServiceNameAddToSafariReadingList")][Internal]
NSString NSSharingServiceNameAddToSafariReadingList { get; }
[Field ("NSSharingServiceNameAddToIPhoto")][Internal]
NSString NSSharingServiceNameAddToIPhoto { get; }
[Field ("NSSharingServiceNameAddToAperture")][Internal]
NSString NSSharingServiceNameAddToAperture { get; }
[Field ("NSSharingServiceNameUseAsTwitterProfileImage")][Internal]
NSString NSSharingServiceNameUseAsTwitterProfileImage { get; }
[Field ("NSSharingServiceNameUseAsDesktopPicture")][Internal]
NSString NSSharingServiceNameUseAsDesktopPicture { get; }
[Field ("NSSharingServiceNamePostImageOnFlickr")][Internal]
NSString NSSharingServiceNamePostImageOnFlickr { get; }
[Field ("NSSharingServiceNamePostVideoOnVimeo")][Internal]
NSString NSSharingServiceNamePostVideoOnVimeo { get; }
[Field ("NSSharingServiceNamePostVideoOnYouku")][Internal]
NSString NSSharingServiceNamePostVideoOnYouku { get; }
[Field ("NSSharingServiceNamePostVideoOnTudou")][Internal]
NSString NSSharingServiceNamePostVideoOnTudou { get; }
[Mac (10, 8)]
enum NSSharingServiceName {
[Mac (10, 12)]
[Field ("NSSharingServiceNameCloudSharing")][Internal]
NSString NSSharingServiceNameCloudSharing { get; }
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
[Field ("NSSharingServiceNamePostOnFacebook")]
PostOnFacebook,
[Field ("NSSharingServiceNamePostOnTwitter")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
PostOnTwitter,
[Field ("NSSharingServiceNamePostOnSinaWeibo")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
PostOnSinaWeibo,
[Field ("NSSharingServiceNameComposeEmail")]
ComposeEmail,
[Field ("NSSharingServiceNameComposeMessage")]
ComposeMessage,
[Field ("NSSharingServiceNameSendViaAirDrop")]
SendViaAirDrop,
[Field ("NSSharingServiceNameAddToSafariReadingList")]
AddToSafariReadingList,
[Field ("NSSharingServiceNameAddToIPhoto")]
AddToIPhoto,
[Field ("NSSharingServiceNameAddToAperture")]
AddToAperture,
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
[Field ("NSSharingServiceNameUseAsTwitterProfileImage")]
UseAsTwitterProfileImage,
[Field ("NSSharingServiceNameUseAsDesktopPicture")]
UseAsDesktopPicture,
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
[Field ("NSSharingServiceNamePostImageOnFlickr")]
PostImageOnFlickr,
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
[Field ("NSSharingServiceNamePostVideoOnVimeo")]
PostVideoOnVimeo,
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
[Field ("NSSharingServiceNamePostVideoOnYouku")]
PostVideoOnYouku,
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
[Field ("NSSharingServiceNamePostVideoOnTudou")]
PostVideoOnTudou,
[Mac (10,12)]
[Field ("NSSharingServiceNameCloudSharing")]
CloudSharing,
[Mac (10,9)]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
[Field ("NSSharingServiceNamePostOnTencentWeibo")]
PostOnTencentWeibo,
[Mac (10,9)]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
[Field ("NSSharingServiceNamePostOnLinkedIn")]
PostOnLinkedIn,
[Mac (10,9)]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
[Field ("NSSharingServiceNameUseAsFacebookProfileImage")]
UseAsFacebookProfileImage,
[Mac (10,9)]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the proprietary SDK instead.")]
[Field ("NSSharingServiceNameUseAsLinkedInProfileImage")]
UseAsLinkedInProfileImage,
}
[Mac (10, 8)]
@ -25978,6 +26002,7 @@ namespace AppKit {
}
#endif
[Deprecated (PlatformName.MacOSX, 10, 14, message : "Use 'Metal' Framework instead.")]
[BaseType (typeof(CAOpenGLLayer))]
interface NSOpenGLLayer
{
@ -26014,6 +26039,7 @@ namespace AppKit {
interface INSUserInterfaceValidations {}
[Protocol]
[Mac (10,11)]
interface NSUserInterfaceValidations
{
[Abstract]

Просмотреть файл

@ -67,6 +67,7 @@ namespace ARKit {
InvalidWorldMap = 302,
InvalidConfiguration = 303,
InsufficientFeatures = 400,
ObjectMergeFailed = 401,
FileIOFailed = 500,
}
@ -169,6 +170,11 @@ namespace ARKit {
[Export ("initWithName:transform:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
IntPtr Constructor (string name, Matrix4 transform);
// Inlined from 'ARAnchorCopying' protocol (we can't have constructors in interfaces)
[iOS (12,0)]
[Export ("initWithAnchor:")]
IntPtr Constructor (ARAnchor anchor);
}
[iOS (11,0)]
@ -321,6 +327,10 @@ namespace ARKit {
[BaseType (typeof (ARAnchor))]
[DisableDefaultCtor]
interface ARPlaneAnchor {
// Inlined from 'ARAnchorCopying' protocol (we can't have constructors in interfaces)
[iOS (12,0)]
[Export ("initWithAnchor:")]
IntPtr Constructor (ARAnchor anchor);
// [Export ("initWithTransform:")] marked as NS_UNAVAILABLE
@ -700,11 +710,6 @@ namespace ARKit {
[Export ("maximumNumberOfTrackedImages")]
nint MaximumNumberOfTrackedImages { get; set; }
[iOS (12,0)]
[Static]
[Export ("objectDetectionSupported")]
bool ObjectDetectionSupported { [Bind ("isObjectDetectionSupported")] get; }
[iOS (12,0)]
[Export ("detectionObjects", ArgumentSemantic.Copy)]
NSSet<ARReferenceObject> DetectionObjects { get; set; }
@ -1025,6 +1030,11 @@ namespace ARKit {
[BaseType (typeof(ARAnchor))]
[DisableDefaultCtor]
interface ARFaceAnchor : ARTrackable {
// Inlined from 'ARAnchorCopying' protocol (we can't have constructors in interfaces)
[iOS (12,0)]
[Export ("initWithAnchor:")]
IntPtr Constructor (ARAnchor anchor);
#if !XAMCORE_4_0
[Obsolete ("Constructor marked as unavailable.")]
[Export ("init")]
@ -1137,6 +1147,11 @@ namespace ARKit {
[BaseType (typeof(ARAnchor))]
[DisableDefaultCtor]
interface ARImageAnchor : ARTrackable {
// Inlined from 'ARAnchorCopying' protocol (we can't have constructors in interfaces)
[iOS (12,0)]
[Export ("initWithAnchor:")]
IntPtr Constructor (ARAnchor anchor);
[Export ("referenceImage", ArgumentSemantic.Strong)]
ARReferenceImage ReferenceImage { get; }
}
@ -1189,6 +1204,11 @@ namespace ARKit {
[BaseType (typeof(ARAnchor))]
[DisableDefaultCtor]
interface AREnvironmentProbeAnchor {
// Inlined from 'ARAnchorCopying' protocol (we can't have constructors in interfaces)
[iOS (12,0)]
[Export ("initWithAnchor:")]
IntPtr Constructor (ARAnchor anchor);
[Export ("initWithTransform:extent:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
IntPtr Constructor (Matrix4 transform, Vector3 extent);
@ -1245,11 +1265,15 @@ namespace ARKit {
NSSet<ARReferenceObject> GetReferenceObjects (string resourceGroupName, [NullAllowed] NSBundle bundle);
[Export ("exportObjectToURL:previewImage:error:")]
bool ExportObject (NSUrl url, [NullAllowed] UIImage previewImage, [NullAllowed] out NSError error);
bool Export (NSUrl url, [NullAllowed] UIImage previewImage, [NullAllowed] out NSError error);
[Export ("referenceObjectByApplyingTransform:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
ARReferenceObject GetReferenceObject (Matrix4 transform);
ARReferenceObject ApplyTransform (Matrix4 transform);
[Export ("referenceObjectByMergingObject:error:")]
[return: NullAllowed]
ARReferenceObject Merge (ARReferenceObject @object, [NullAllowed] out NSError error);
[iOS (12,0)]
[Field ("ARReferenceObjectArchiveExtension")]
@ -1261,6 +1285,11 @@ namespace ARKit {
[BaseType (typeof(ARAnchor))]
[DisableDefaultCtor]
interface ARObjectAnchor {
// Inlined from 'ARAnchorCopying' protocol (we can't have constructors in interfaces)
[iOS (12,0)]
[Export ("initWithAnchor:")]
IntPtr Constructor (ARAnchor anchor);
[Export ("referenceObject", ArgumentSemantic.Strong)]
ARReferenceObject ReferenceObject { get; }
}

Просмотреть файл

@ -2258,7 +2258,7 @@ namespace AVFoundation {
[Async]
[Watch (5,0), NoTV, NoMac, NoiOS]
[Export ("activateWithOptions:completionHandler:")]
void Activate (AVAudioSessionActivationOptions options, Action<NSError> handler);
void Activate (AVAudioSessionActivationOptions options, Action<bool, NSError> handler);
}
[iOS (6,0)]
@ -5540,7 +5540,7 @@ namespace AVFoundation {
NSString FormatHlsMetadata { get; }
#endif
[iOS (9,3)][Mac (10, 11, 3)]
[iOS (9,3)][Mac (10, 12)]
[TV (9,2)]
[Field ("AVMetadataKeySpaceHLSDateRange")]
NSString KeySpaceHlsDateRange { get; }
@ -9039,6 +9039,29 @@ namespace AVFoundation {
}
#endif
[NoTV, NoMac, NoWatch, iOS (12,0)]
[Internal]
[Static]
interface AVCapturePhotoSettingsThumbnailFormatKeys {
[Field ("AVVideoCodecKey")]
NSString CodecKey { get; }
[Field ("AVVideoWidthKey")]
NSString WidthKey { get; }
[Field ("AVVideoHeightKey")]
NSString HeightKey { get; }
}
[NoTV, NoMac, NoWatch, iOS (12,0)]
[StrongDictionary ("AVCapturePhotoSettingsThumbnailFormatKeys")]
interface AVCapturePhotoSettingsThumbnailFormat {
NSString Codec { get; set; }
NSNumber Width { get; set; }
NSNumber Height { get; set; }
}
[NoWatch]
[NoTV, NoMac, iOS (10,0)]
[BaseType (typeof(NSObject))]
@ -9146,12 +9169,28 @@ namespace AVFoundation {
NSString[] _GetAvailableEmbeddedThumbnailPhotoCodecTypes { get; }
[iOS (11, 0)]
[Wrap ("Array.ConvertAll (_GetAvailableEmbeddedThumbnailPhotoCodecTypes, s => AVVideoCodecTypeExtensions.GetValue (s))")]
[Wrap ("Array.ConvertAll (_GetAvailableEmbeddedThumbnailPhotoCodecTypes, s => AVVideoCodecTypeExtensions.GetValue (s))", IsVirtual = true)]
#if !XAMCORE_4_0
[Obsolete ("Use 'AvailableEmbeddedThumbnailPhotoCodecTypes' instead.")]
AVVideoCodecType[] GetAvailableEmbeddedThumbnailPhotoCodecTypes { get; }
[iOS (11, 0)]
[Wrap ("Array.ConvertAll (_GetAvailableEmbeddedThumbnailPhotoCodecTypes, s => AVVideoCodecTypeExtensions.GetValue (s))", IsVirtual = true)]
#endif
AVVideoCodecType[] AvailableEmbeddedThumbnailPhotoCodecTypes { get; }
#if XAMCORE_4_0
[iOS (11, 0)]
[NullAllowed, Export ("embeddedThumbnailPhotoFormat", ArgumentSemantic.Copy)]
NSDictionary WeakEmbeddedThumbnailPhotoFormat { get; set; }
[Warp ("WeakEmbeddedThumbnailPhotoFormat")]
AVCapturePhotoSettingsThumbnailFormat EmbeddedThumbnailPhotoFormat { get; set; }
#else
[iOS (11, 0)]
[NullAllowed, Export ("embeddedThumbnailPhotoFormat", ArgumentSemantic.Copy)]
NSDictionary EmbeddedThumbnailPhotoFormat { get; set; }
#endif
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("portraitEffectsMatteDeliveryEnabled")]
@ -9160,6 +9199,19 @@ namespace AVFoundation {
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("embedsPortraitEffectsMatteInPhoto")]
bool EmbedsPortraitEffectsMatteInPhoto { get; set; }
[BindAs (typeof (AVVideoCodecType []))]
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("availableRawEmbeddedThumbnailPhotoCodecTypes")]
NSString[] AvailableRawEmbeddedThumbnailPhotoCodecTypes { get; }
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[NullAllowed, Export ("rawEmbeddedThumbnailPhotoFormat", ArgumentSemantic.Copy)]
NSDictionary WeakRawEmbeddedThumbnailPhotoFormat { get; set; }
[Wrap ("WeakRawEmbeddedThumbnailPhotoFormat")]
AVCapturePhotoSettingsThumbnailFormat RawEmbeddedThumbnailPhotoFormat { get; set; }
}
#if !MONOMAC
@ -9228,6 +9280,10 @@ namespace AVFoundation {
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("portraitEffectsMatteDimensions")]
CMVideoDimensions PortraitEffectsMatteDimensions { get; }
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("rawEmbeddedThumbnailDimensions")]
CMVideoDimensions RawEmbeddedThumbnailDimensions { get; }
}
#if !MONOMAC
@ -10298,7 +10354,8 @@ namespace AVFoundation {
[Export ("seekToDate:")]
void Seek (NSDate date);
[iOS (6,0), Mac (10,7)]
[iOS (6,0)]
[Mac (10,9)] // Header says 10.7, but it's a lie
[Export ("seekToDate:completionHandler:")]
[Async]
void Seek (NSDate date, AVCompletion onComplete);
@ -10493,14 +10550,14 @@ namespace AVFoundation {
[Export ("items", ArgumentSemantic.Copy)]
AVMetadataItem[] Items { get; }
[iOS (9,3)][Mac (10,11,3)]
[iOS (9,3)][Mac (10,12)]
[TV (9,2)]
[NullAllowed, Export ("classifyingLabel")]
string ClassifyingLabel { get; }
[iOS (9,3)]
[TV (9,2)]
[Mac (10,11,3)]
[Mac (10,12)]
[NullAllowed, Export ("uniqueID")]
string UniqueID { get; }
}
@ -10810,17 +10867,17 @@ namespace AVFoundation {
AVInterstitialTimeRange[] InterstitialTimeRanges { get; set; }
#endregion
[iOS (9,3)][Mac (10,11,3)]
[iOS (9,3)][Mac (10,12)]
[TV (9,2)]
[Export ("addMediaDataCollector:")]
void AddMediaDataCollector (AVPlayerItemMediaDataCollector collector);
[iOS (9,3)][Mac (10,11,3)]
[iOS (9,3)][Mac (10,12)]
[TV (9,2)]
[Export ("removeMediaDataCollector:")]
void RemoveMediaDataCollector (AVPlayerItemMediaDataCollector collector);
[iOS (9,3)][Mac (10,11,3)]
[iOS (9,3)][Mac (10,12)]
[TV (9,2)]
[Export ("mediaDataCollectors")]
AVPlayerItemMediaDataCollector[] MediaDataCollectors { get; }
@ -12069,6 +12126,7 @@ namespace AVFoundation {
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface AVOutputSettingsAssistant {
[Mac (10, 10)]
[Static, Export ("availableOutputSettingsPresets")]
string [] AvailableOutputSettingsPresets { get; }
@ -12105,6 +12163,7 @@ namespace AVFoundation {
[Export ("sourceVideoAverageFrameDuration", ArgumentSemantic.Copy)]
CMTime SourceVideoAverageFrameDuration { get; set; }
[Mac (10, 10)]
[Export ("sourceVideoMinFrameDuration", ArgumentSemantic.Copy)]
CMTime SourceVideoMinFrameDuration { get; set; }

Просмотреть файл

@ -263,11 +263,11 @@ namespace CarPlay {
[Abstract]
[Export ("application:didConnectCarInterfaceController:toWindow:")]
void DidConnectCarInterfaceController (UIApplication application, CPInterfaceController interfaceController, CPMapContentWindow window);
void DidConnectCarInterfaceController (UIApplication application, CPInterfaceController interfaceController, CPWindow window);
[Abstract]
[Export ("application:didDisconnectCarInterfaceController:fromWindow:")]
void DidDisconnectCarInterfaceController (UIApplication application, CPInterfaceController interfaceController, CPMapContentWindow window);
void DidDisconnectCarInterfaceController (UIApplication application, CPInterfaceController interfaceController, CPWindow window);
[Export ("application:didSelectNavigationAlert:")]
void DidSelectNavigationAlert (UIApplication application, CPNavigationAlert navigationAlert);
@ -335,8 +335,8 @@ namespace CarPlay {
[DisableDefaultCtor]
interface CPListTemplate : CPBarButtonProviding {
[Export ("initWithSections:")]
IntPtr Constructor (CPListSection [] sections);
[Export ("initWithTitle:sections:")]
IntPtr Constructor ([NullAllowed] string title, CPListSection[] sections);
[Wrap ("WeakDelegate")]
[NullAllowed]
@ -349,7 +349,7 @@ namespace CarPlay {
CPListSection [] Sections { get; }
[NullAllowed, Export ("title")]
string Title { get; set; }
string Title { get; }
[Export ("updateSections:")]
void UpdateSections (CPListSection [] sections);
@ -766,7 +766,7 @@ namespace CarPlay {
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (UIWindow))]
interface CPMapContentWindow {
interface CPWindow {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);

Просмотреть файл

@ -167,6 +167,16 @@ namespace Contacts {
[Export ("predicateForContactsMatchingName:")]
NSPredicate GetPredicateForContacts (string matchingName);
[Watch (4,0), Mac (10,13), iOS (11,0)]
[Static]
[Export ("predicateForContactsMatchingEmailAddress:")]
NSPredicate GetPredicateForContactsMatchingEmailAddress (string emailAddress);
[Watch (4,0), Mac (10,13), iOS (11,0)]
[Static]
[Export ("predicateForContactsMatchingPhoneNumber:")]
NSPredicate GetPredicateForContacts (CNPhoneNumber phoneNumber);
[Static]
[Export ("predicateForContactsWithIdentifiers:")]
NSPredicate GetPredicateForContacts (string [] identifiers);

Просмотреть файл

@ -1465,6 +1465,7 @@ namespace CoreAnimation {
}
#if MONOMAC
[Deprecated (PlatformName.MacOSX, 10, 14, message : "Use 'Metal' Framework instead.")]
[BaseType (typeof (CALayer))]
interface CAOpenGLLayer {
[Export ("layer"), New, Static]

Просмотреть файл

@ -195,6 +195,7 @@ namespace CoreBluetooth {
[Field ("CBAdvertisementDataServiceUUIDsKey")]
NSString ServiceUuidsKey { get; }
[Mac (10, 9)]
[Field ("CBAdvertisementDataOverflowServiceUUIDsKey")]
NSString OverflowServiceUuidsKey { get; }
@ -226,14 +227,17 @@ namespace CoreBluetooth {
[Static, Internal]
interface RestoredStateKeys {
[iOS (7,0)]
[Mac (10,13)]
[Field ("CBCentralManagerRestoredStatePeripheralsKey")]
NSString PeripheralsKey { get; }
[iOS (7,0)]
[Mac (10,13)]
[Field ("CBCentralManagerRestoredStateScanServicesKey")]
NSString ScanServicesKey { get; }
[iOS (7,0)]
[Mac (10,13)]
[Field ("CBCentralManagerRestoredStateScanOptionsKey")]
NSString ScanOptionsKey { get; }
}
@ -675,6 +679,9 @@ namespace CoreBluetooth {
#if MONOMAC
[Internal]
[Field ("CBUUIDValidRangeString")]
[Introduced (PlatformName.MacOSX, 10, 12)]
[Deprecated (PlatformName.MacOSX, 10, 13)]
[Obsoleted (PlatformName.MacOSX, 10, 13)]
NSString CBUUIDValidRangeString { get; }
[Internal]

Просмотреть файл

@ -313,6 +313,8 @@ namespace CoreData
[Deprecated (PlatformName.iOS, 11, 0, message : "Use 'NSEntityDescription.Indexes' instead.")]
[Mac (10, 7)]
[Deprecated (PlatformName.MacOSX, 10, 13, message : "Use 'NSEntityDescription.Indexes' instead.")]
[Deprecated (PlatformName.TvOS, 9, 0, message : "Use 'NSEntityDescription.Indexes' instead.")]
[Deprecated (PlatformName.WatchOS, 4, 0, message : "Use 'NSEntityDescription.Indexes' instead.")]
NSPropertyDescription [] CompoundIndexes { get; set; }
[Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)]
@ -1795,6 +1797,7 @@ namespace CoreData
NSDictionary MetadataForPersistentStoreOfType (NSString storeType, NSUrl url, out NSError error);
[iOS (7,0)]
[Mac (10, 9)]
[Static, Export ("metadataForPersistentStoreOfType:URL:options:error:")]
[return: NullAllowed]
NSDictionary<NSString, NSObject> GetMetadata (string storeType, NSUrl url, [NullAllowed] NSDictionary options, out NSError error);
@ -1804,6 +1807,7 @@ namespace CoreData
bool SetMetadata (NSDictionary metadata, NSString storeType, NSUrl url, out NSError error);
[iOS (7,0)]
[Mac (10,9)]
[Static, Export ("setMetadata:forPersistentStoreOfType:URL:options:error:")]
bool SetMetadata ([NullAllowed] NSDictionary<NSString, NSObject> metadata, string storeType, NSUrl url, [NullAllowed] NSDictionary options, out NSError error);
@ -2175,6 +2179,8 @@ namespace CoreData
[Export ("indexed")]
[Deprecated (PlatformName.iOS, 11, 0, message : "Use 'NSEntityDescription.Indexes' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 13, message : "Use 'NSEntityDescription.Indexes' instead.")]
[Deprecated (PlatformName.TvOS, 9, 0, message : "Use 'NSEntityDescription.Indexes' instead.")]
[Deprecated (PlatformName.WatchOS, 4, 0, message : "Use 'NSEntityDescription.Indexes' instead.")]
bool Indexed { [Bind ("isIndexed")] get; set; }
[Export ("versionHash")]

Просмотреть файл

@ -204,10 +204,6 @@ namespace CoreImage {
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CIContext {
// When we bind OpenGL add these:
//[Export ("contextWithCGLContext:pixelFormat:colorSpace:options:")]
//CIContext ContextWithCGLContextpixelFormatcolorSpaceoptions (CGLContextObj ctx, CGLPixelFormatObj pf, CGColorSpaceRef cs, NSDictionary dict, );
#if !MONOMAC || XAMCORE_2_0
[iOS (9,0)][Mac (10,11)]
[Static]
@ -361,13 +357,6 @@ namespace CoreImage {
[Export ("contextForOfflineGPUAtIndex:")]
[Static]
CIContext FromOfflineGpu (int gpuIndex);
// When we bind CGLContext
//+(CIContext *)contextForOfflineGPUAtIndex:(unsigned int)index
// colorSpace:(nullable CGColorSpaceRef)colorSpace
// options:(nullable CI_DICTIONARY(NSString*,id) *)options
// sharedContext:(nullable CGLContextObj)sharedContext NS_AVAILABLE_MAC(10_10);
#endif
[iOS (9,0)][Mac (10,11)]
@ -5512,4 +5501,12 @@ namespace CoreImage {
[CoreImageFilterProperty ("inputModel")]
MLModel Model { get; set; }
}
[CoreImageFilter]
[iOS (12,0)]
[TV (12,0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (CIFilter))]
interface CISaliencyMapFilter {
}
}

Просмотреть файл

@ -144,4 +144,83 @@ namespace CoreMidi {
MidiEndpoint DestinationEndPoint { get; }
}
#endif
[NoWatch, NoTV, Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject), Name="MIDICIProfile")]
[DisableDefaultCtor]
interface MidiCIProfile : NSSecureCoding
{
[Export ("name")]
string Name { get; }
[Export ("profileID")]
NSData ProfileId { get; }
[Export ("initWithData:name:")]
IntPtr Constructor (NSData data, string inName);
}
[NoWatch, NoTV, Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject), Name="MIDICIProfileState")]
[DisableDefaultCtor]
interface MidiCIProfileState : NSSecureCoding
{
[Export ("enabledProfiles")]
MidiCIProfile[] EnabledProfiles { get; }
[Export ("disabledProfiles")]
MidiCIProfile[] DisabledProfiles { get; }
[Export ("initWithEnabledProfiles:disabledProfiles:")]
IntPtr Constructor (MidiCIProfile[] enabled, MidiCIProfile[] disabled);
}
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);
[NoWatch, NoTV, Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject), Name="MIDICISession")]
[DisableDefaultCtor]
interface MidiCISession
{
[Export ("initWithMIDIEntity:dataReadyHandler:")]
IntPtr Constructor (uint entity, Action handler);
[Export ("entity")]
uint Entity { get; }
[Export ("supportsProfileCapability")]
bool SupportsProfileCapability { get; }
[Export ("supportsPropertyCapability")]
bool SupportsPropertyCapability { get; }
[Export ("deviceIdentification")]
MidiCIDeviceIdentification DeviceIdentification { get; }
[Export ("profileStateForChannel:")]
MidiCIProfileState GetProfileState (byte channel);
[Export ("enableProfile:onChannel:error:")]
bool EnableProfile (MidiCIProfile profile, byte channel, [NullAllowed] out NSError outError);
[Export ("disableProfile:onChannel:error:")]
bool DisableProfile (MidiCIProfile profile, byte channel, [NullAllowed] out NSError outError);
[NullAllowed, Export ("profileChangedCallback", ArgumentSemantic.Assign)]
MidiCIProfileChangedHandler ProfileChangedCallback { get; set; }
[Export ("hasProperty:onChannel:responseHandler:")]
void HasProperty (NSData inquiry, byte channel, MidiCIPropertyResponseHandler handler);
[Export ("getProperty:onChannel:responseHandler:")]
void GetProperty (NSData inquiry, byte channel, MidiCIPropertyResponseHandler handler);
[Export ("setProperty:onChannel:responseHandler:")]
void SetProperty (NSData inquiry, byte channel, MidiCIPropertyResponseHandler handler);
[NullAllowed, Export ("propertyChangedCallback", ArgumentSemantic.Assign)]
MidiCIPropertyChangedHandler PropertyChangedCallback { get; set; }
}
}

Просмотреть файл

@ -47,6 +47,7 @@ namespace CoreML {
IO = 3,
[Watch (4,2), TV (11,2), Mac (10,13,2, onlyOn64: true), iOS (11,2)]
CustomLayer = 4,
CustomModel = 5,
}
[Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)]

Просмотреть файл

@ -561,7 +561,10 @@ namespace CoreMotion {
[Export ("queryTremorFromDate:toDate:withHandler:")]
void QueryTremor (NSDate fromDate, NSDate toDate, CMTremorResultHandler handler);
[Export ("lastProcessedDate")]
[NullAllowed, Export ("lastProcessedDate")]
NSDate LastProcessedDate { get; }
[NullAllowed, Export ("monitorKinesiasExpirationDate")]
NSDate MonitorKinesiasExpirationDate { get; }
}
}

Просмотреть файл

@ -120,12 +120,12 @@ namespace CoreVideo {
[Static]
[Wrap ("CVImageBufferYCbCrMatrix.DciP3.GetConstant ()")]
[iOS (9,0), Mac (10,11)]
[iOS (9,0), Mac (10,12)]
NSString YCbCrMatrix_DCI_P3 { get; }
[Static]
[Wrap ("CVImageBufferYCbCrMatrix.P3D65.GetConstant ()")]
[iOS (9,0), Mac (10,11)]
[iOS (9,0), Mac (10,12)]
NSString YCbCrMatrix_P3_D65 { get; }
[Static]
@ -348,11 +348,11 @@ namespace CoreVideo {
Smpte240M1995,
[Field ("kCVImageBufferYCbCrMatrix_DCI_P3")]
[iOS (9,0), Mac (10,11)]
[iOS (9,0), Mac (10,12)]
DciP3,
[Field ("kCVImageBufferYCbCrMatrix_P3_D65")]
[iOS (9,0), Mac (10,11)]
[iOS (9,0), Mac (10,12)]
P3D65,
[Field ("kCVImageBufferYCbCrMatrix_ITU_R_2020")]

Просмотреть файл

@ -47,6 +47,16 @@ namespace FinderSync {
[Async, Mac (10,13, onlyOn64 : true)]
[Export ("setTagData:forItemWithURL:completion:")]
void SetTagData ([NullAllowed] NSData tagData, NSUrl itemUrl, Action<NSError> completion);
[Mac (10, 14, onlyOn64: true)]
[Static]
[Export ("extensionEnabled")]
bool ExtensionEnabled { [Bind ("isExtensionEnabled")] get; }
[Mac (10,14, onlyOn64: true)]
[Static]
[Export ("showExtensionManagementInterface")]
void ShowExtensionManagementInterface ();
}
[Mac (10, 10, onlyOn64: true)]

Просмотреть файл

@ -2274,18 +2274,52 @@ namespace Foundation
[DisableDefaultCtor]
interface NSKeyedArchiver {
[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)]
[Export ("initRequiringSecureCoding:")]
IntPtr Constructor (bool requiresSecureCoding);
// hack so we can decorate the default .ctor with availability attributes
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")]
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'NSKeyedArchiver (bool)' instead.")]
[iOS (10,0)][TV (10,0)][Watch (3,0)][Mac (10,12)]
[Export ("init")]
IntPtr Constructor ();
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")]
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'NSKeyedArchiver (bool)' instead.")]
[Export ("initForWritingWithMutableData:")]
IntPtr Constructor (NSMutableData data);
[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)]
[Static]
[Export ("archivedDataWithRootObject:requiringSecureCoding:error:")]
[return: NullAllowed]
#if XAMCORE_4_0
NSData GetArchivedData (NSObject @object, bool requiresSecureCoding, [NullAllowed] out NSError error);
#else
NSData ArchivedDataWithRootObject (NSObject @object, bool requiresSecureCoding, [NullAllowed] out NSError error);
#endif
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")]
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")]
[Export ("archivedDataWithRootObject:")]
[Static]
#if XAMCORE_4_0
NSData GetArchivedData (NSObject root);
#else
NSData ArchivedDataWithRootObject (NSObject root);
#endif
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")]
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")]
[Export ("archiveRootObject:toFile:")]
[Static]
bool ArchiveRootObjectToFile (NSObject root, string file);
@ -2332,20 +2366,64 @@ namespace Foundation
// Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[NSKeyedUnarchiver init]: cannot use -init for initialization
[DisableDefaultCtor]
interface NSKeyedUnarchiver {
[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)]
[Export ("initForReadingFromData:error:")]
IntPtr Constructor (NSData data, [NullAllowed] out NSError error);
[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)]
[Static]
[Export ("unarchivedObjectOfClass:fromData:error:")]
[return: NullAllowed]
NSObject GetUnarchivedObject (Class cls, NSData data, [NullAllowed] out NSError error);
[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)]
[Static]
[Wrap ("GetUnarchivedObject (new Class (type), data, out error)")]
[return: NullAllowed]
NSObject GetUnarchivedObject (Type type, NSData data, [NullAllowed] out NSError error);
[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)]
[Static]
[Export ("unarchivedObjectOfClasses:fromData:error:")]
[return: NullAllowed]
NSObject GetUnarchivedObject (NSSet<Class> classes, NSData data, [NullAllowed] out NSError error);
[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)]
[Static]
[Wrap ("GetUnarchivedObject (new NSSet<Class> (Array.ConvertAll (types, t => new Class (t))), data, out error)")]
[return: NullAllowed]
NSObject GetUnarchivedObject (Type [] types, NSData data, [NullAllowed] out NSError error);
[Export ("initForReadingWithData:")]
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'NSKeyedUnarchiver (NSData, out NSError)' instead.")]
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'NSKeyedUnarchiver (NSData, out NSError)' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'NSKeyedUnarchiver (NSData, out NSError)' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'NSKeyedUnarchiver (NSData, out NSError)' instead.")]
[MarshalNativeExceptions]
IntPtr Constructor (NSData data);
[Static, Export ("unarchiveObjectWithData:")]
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")]
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'GetUnarchivedObject ()' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'GetUnarchivedObject ()' instead.")]
[MarshalNativeExceptions]
NSObject UnarchiveObject (NSData data);
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")]
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'GetUnarchivedObject ()' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'GetUnarchivedObject ()' instead.")]
[Static, Export ("unarchiveTopLevelObjectWithData:error:")]
[iOS (9,0), Mac(10,11)]
// FIXME: [MarshalNativeExceptions]
NSObject UnarchiveTopLevelObject (NSData data, out NSError error);
[Static, Export ("unarchiveObjectWithFile:")]
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")]
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'GetUnarchivedObject ()' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'GetUnarchivedObject ()' instead.")]
[MarshalNativeExceptions]
NSObject UnarchiveFile (string file);
@ -5131,6 +5209,26 @@ namespace Foundation
[Watch (5,0), NoTV, NoMac, iOS (12,0)]
[NullAllowed, Export ("suggestedInvocationPhrase")]
string SuggestedInvocationPhrase { get; set; }
[Watch (5, 0), NoTV, NoMac, iOS (12, 0)]
[Export ("eligibleForPrediction")]
bool EligibleForPrediction { [Bind ("isEligibleForPrediction")] get; set; }
[Watch (5, 0), NoTV, NoMac, iOS (12, 0)]
[NullAllowed, Export ("persistentIdentifier")]
string PersistentIdentifier { get; set; }
[Watch (5,0), NoTV, NoMac, iOS (12,0)]
[Static]
[Async]
[Export ("deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler:")]
void DeleteSavedUserActivities (string[] persistentIdentifiers, Action handler);
[Watch (5,0), NoTV, NoMac, iOS (12,0)]
[Static]
[Async]
[Export ("deleteAllSavedUserActivitiesWithCompletionHandler:")]
void DeleteAllSavedUserActivities (Action handler);
}
[iOS (8,0)][Mac (10,10, onlyOn64 : true)] // same as NSUserActivity
@ -10539,11 +10637,11 @@ namespace Foundation
[Export ("SCNVector4Value")]
SCNVector4 Vector4Value { get; }
[iOS (8,0)][Mac (10,9, onlyOn64 : true)]
[iOS (8,0)][Mac (10,10, onlyOn64 : true)]
[Static, Export ("valueWithSCNMatrix4:")]
NSValue FromSCNMatrix4 (SCNMatrix4 matrix);
[iOS (8,0)][Mac (10,9, onlyOn64 : true)]
[iOS (8,0)][Mac (10,10, onlyOn64 : true)]
[Export ("SCNMatrix4Value")]
SCNMatrix4 SCNMatrix4Value { get; }
@ -10619,12 +10717,37 @@ namespace Foundation
[Field ("NSIsNotNilTransformerName")]
NSString IsNotNilTransformerName { get; }
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")]
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")]
[Field ("NSUnarchiveFromDataTransformerName")]
NSString UnarchiveFromDataTransformerName { get; }
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")]
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")]
[Field ("NSKeyedUnarchiveFromDataTransformerName")]
NSString KeyedUnarchiveFromDataTransformerName { get; }
[Watch (5, 0), TV (12, 0), Mac (10, 14, onlyOn64: true), iOS (12, 0)]
[Field ("NSSecureUnarchiveFromDataTransformerName")]
NSString SecureUnarchiveFromDataTransformerName { get; }
}
// Class [] return value is currently broken - https://github.com/xamarin/xamarin-macios/issues/4441
// [Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
// [BaseType (typeof(NSValueTransformer))]
// interface NSSecureUnarchiveFromDataTransformer {
// [Static]
// [Export ("allowedTopLevelClasses", ArgumentSemantic.Copy)]
// Class[] AllowedTopLevelClasses { get; }
//
// [Static]
// [Wrap ("Array.ConvertAll (AllowedTopLevelClasses, c => Class.Lookup (c))")]
// Type [] AllowedTopLevelTypes { get; }
// }
[BaseType (typeof (NSValue))]
// init returns NIL

Просмотреть файл

@ -515,6 +515,7 @@ COREMEDIA_SOURCES = \
# CoreMidi
COREMIDI_CORE_SOURCES = \
CoreMidi/MidiCIDeviceIdentification.cs \
CoreMidi/MidiServices.cs \
CoreMidi/MidiThruConnection.cs \
CoreMidi/MidiThruConnectionParams.cs \
@ -864,6 +865,9 @@ HOMEKIT_SOURCES = \
IAD_API_SOURCES = \
iAd/iAd.cs \
IAD_SOURCES = \
iAd/ADBannerView.cs \
# ImageIO
IMAGEIO_API_SOURCES = \
@ -1449,6 +1453,7 @@ UIKIT_SOURCES = \
UIKit/UIContentSizeCategory.cs \
UIKit/UIControl.cs \
UIKit/UIDevice.cs \
UIKit/UIDocumentBrowserViewController.cs \
UIKit/UIDocumentInteractionController.cs \
UIKit/UIDocumentMenuViewController.cs \
UIKit/UIDocumentPickerViewController.cs \
@ -1869,6 +1874,7 @@ WATCHOS_FRAMEWORKS = \
ImageIO \
Intents \
MapKit \
MediaPlayer \
MobileCoreServices \
NaturalLanguage \
PassKit \

Просмотреть файл

@ -379,7 +379,7 @@ namespace GameController {
bool AllowsRotation { get; set; }
}
[Mac (10,9, onlyOn64: true)]
[Mac (10,12, onlyOn64: true)]
[iOS (10,0)]
[TV (9,0)]
[BaseType (typeof (GCMicroGamepad))]
@ -394,7 +394,7 @@ namespace GameController {
IntPtr Constructor (GCController controller, NSData data);
}
[Mac (10,11, onlyOn64: true)]
[Mac (10,12, onlyOn64: true)]
[iOS (10,0)]
[TV (9,0)]
[BaseType (typeof (UIViewController))]

Просмотреть файл

@ -373,7 +373,7 @@ namespace GameKit {
[NoTV]
[NoWatch]
[iOS (7,0)][Mac (10,8)]
[iOS (7,0)][Mac (10,10)]
[Export ("loadImageWithCompletionHandler:")]
[Async]
void LoadImage ([NullAllowed] GKImageLoadedHandler completionHandler);
@ -511,11 +511,12 @@ namespace GameKit {
IntPtr Constructor (string identifier, GKPlayer player);
[NoWatch]
[iOS (7,0)][Mac (10,8)]
[iOS (7,0)][Mac (10,10)]
[Deprecated (PlatformName.iOS, 8, 0, message : "Use the overload that takes a 'GKPlayer' instead.")]
[Export ("initWithLeaderboardIdentifier:forPlayer:")]
IntPtr Constructor (string identifier, string playerID);
[iOS (7,0)][Mac (10,8)]
[iOS (7,0)][Mac (10,10)]
[Internal][NullAllowed]
[Export ("initWithLeaderboardIdentifier:")]
IntPtr InitWithLeaderboardIdentifier (string identifier);

Просмотреть файл

@ -368,6 +368,10 @@ namespace HealthKit {
[Export ("isHealthDataAvailable")]
bool IsHealthDataAvailable { get; }
[NoWatch, iOS (12, 0)]
[Export ("supportsHealthRecords")]
bool SupportsHealthRecords { get; }
// FIXME NS_EXTENSION_UNAVAILABLE("Not available to extensions") ;
[Export ("authorizationStatusForType:")]
HKAuthorizationStatus GetAuthorizationStatus (HKObjectType type);
@ -2409,17 +2413,46 @@ namespace HealthKit {
[NullAllowed, Export ("endDate")]
NSDate EndDate { get; }
[Deprecated (PlatformName.WatchOS, 3, 0, message: "Use HKWorkoutSession (HKWorkoutConfiguration, out NSError)")]
[Deprecated (PlatformName.WatchOS, 3, 0, message: "Use HKWorkoutSession (HKHealthStore, HKWorkoutConfiguration, out NSError) instead.")]
[Export ("initWithActivityType:locationType:")]
IntPtr Constructor (HKWorkoutActivityType activityType, HKWorkoutSessionLocationType locationType);
[Watch (3,0)]
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use HKWorkoutSession (HKHealthStore, HKWorkoutConfiguration, out NSError) instead.")]
[Export ("initWithConfiguration:error:")]
IntPtr Constructor (HKWorkoutConfiguration workoutConfiguration, out NSError error);
[Watch (5,0)]
[Export ("initWithHealthStore:configuration:error:")]
IntPtr Constructor (HKHealthStore healthStore, HKWorkoutConfiguration workoutConfiguration, [NullAllowed] out NSError error);
[Watch (5,0)]
[Export ("prepare")]
void Prepare ();
[Watch (5,0)]
[Export ("startActivityWithDate:")]
void StartActivity ([NullAllowed] NSDate date);
[Watch (5,0)]
[Export ("stopActivityWithDate:")]
void StopActivity ([NullAllowed] NSDate date);
[Watch (5,0)]
[Export ("end")]
void End ();
[Watch (5,0)]
[Export ("pause")]
void Pause ();
[Watch (5,0)]
[Export ("resume")]
void Resume ();
[Watch (5,0)]
[Export ("associatedWorkoutBuilder")]
HKLiveWorkoutBuilder AssociatedWorkoutBuilder { get; }
}
[NoiOS]

15
src/iAd/ADBannerView.cs Normal file
Просмотреть файл

@ -0,0 +1,15 @@
using System.Runtime.InteropServices;
using CoreGraphics;
using ObjCRuntime;
namespace iAd {
public partial class ADBannerView {
[DllImport (Constants.iAdLibrary)]
static extern CGSize ADClampedBannerSize (CGSize size);
public static CGSize GetClampedBannerSize (CGSize size) {
return ADClampedBannerSize (size);
}
}
}

Просмотреть файл

@ -295,4 +295,20 @@ namespace iAd {
[Export ("cancelPreroll")]
void CancelPreroll ();
}
[iOS (12,0)]
[NoWatch]
[DisableDefaultCtor]
[BaseType (typeof (UIViewController))]
interface ADInterstitialAdPresentationViewController {
// inlined ctor
[Export ("initWithNibName:bundle:")]
IntPtr Constructor ([NullAllowed] string nibName, [NullAllowed] NSBundle bundle);
[Export ("initForInterstitialAd:")]
IntPtr Constructor (ADInterstitialAd interstitialAd);
[Export ("shouldTestVisibilityAtPoint:")]
bool ShouldTestVisibility (CGPoint point);
}
}

Просмотреть файл

@ -247,6 +247,8 @@ namespace Intents {
ImageProxyInvalid = 6006,
ImageProxyTimeout = 6007,
ImageServiceFailure = 6008,
ImageScalingFailed = 6009,
PermissionDenied = 6010,
VoiceShortcutCreationFailed = 7000,
VoiceShortcutGetFailed = 7001,
VoiceShortcutDeleteFailed = 7002,
@ -382,8 +384,10 @@ namespace Intents {
[Native]
public enum INPersonSuggestionType : long {
[iOS (12,0), Mac (10,14, onlyOn64: true), Watch (5,0)]
None = 0,
SocialProfile = 1,
InstantMessageAddress
InstantMessageAddress,
}
[iOS (10, 0)]
@ -1450,6 +1454,13 @@ namespace Intents {
OnlyPredictSuggestedIntents = 1,
}
[Watch (5,0), NoTV, NoMac, iOS (12,0)]
[Native]
public enum INRelevantShortcutRole : long {
Action,
Information,
}
[iOS (10, 0)]
[Mac (10, 12, 0, PlatformArchitecture.Arch64)]
[Watch (3, 2)]
@ -5182,33 +5193,44 @@ namespace Intents {
[BaseType (typeof (INIntent))]
interface INSetClimateSettingsInCarIntent {
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
[Protected]
[Export ("initWithEnableFan:enableAirConditioner:enableClimateControl:enableAutoMode:airCirculationMode:fanSpeedIndex:fanSpeedPercentage:relativeFanSpeedSetting:temperature:relativeTemperatureSetting:climateZone:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] NSNumber enableFan, [NullAllowed] NSNumber enableAirConditioner, [NullAllowed] NSNumber enableClimateControl, [NullAllowed] NSNumber enableAutoMode, INCarAirCirculationMode airCirculationMode, [NullAllowed] NSNumber fanSpeedIndex, [NullAllowed] NSNumber fanSpeedPercentage, INRelativeSetting relativeFanSpeedSetting, [NullAllowed] NSMeasurement<NSUnitTemperature> temperature, INRelativeSetting relativeTemperatureSetting, INCarSeat climateZone);
[Internal]
[iOS (12,0)]
[Export ("initWithEnableFan:enableAirConditioner:enableClimateControl:enableAutoMode:airCirculationMode:fanSpeedIndex:fanSpeedPercentage:relativeFanSpeedSetting:temperature:relativeTemperatureSetting:climateZone:carName:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] [BindAs (typeof (bool?))] NSNumber enableFan, [NullAllowed] [BindAs (typeof (bool?))] NSNumber enableAirConditioner, [NullAllowed] [BindAs (typeof (bool?))] NSNumber enableClimateControl, [NullAllowed] [BindAs (typeof (bool?))] NSNumber enableAutoMode, INCarAirCirculationMode airCirculationMode, [NullAllowed] [BindAs (typeof (int?))] NSNumber fanSpeedIndex, [NullAllowed] [BindAs (typeof (double?))] NSNumber fanSpeedPercentage, INRelativeSetting relativeFanSpeedSetting, [NullAllowed] NSMeasurement<NSUnitTemperature> temperature, INRelativeSetting relativeTemperatureSetting, INCarSeat climateZone, [NullAllowed] INSpeakableString carName);
[BindAs (typeof (bool?))]
[NullAllowed, Export ("enableFan", ArgumentSemantic.Copy)]
NSNumber _EnableFan { get; }
NSNumber EnableFan { get; }
[Internal]
[BindAs (typeof (bool?))]
[NullAllowed, Export ("enableAirConditioner", ArgumentSemantic.Copy)]
NSNumber _EnableAirConditioner { get; }
NSNumber EnableAirConditioner { get; }
[Internal]
[BindAs (typeof (bool?))]
[NullAllowed, Export ("enableClimateControl", ArgumentSemantic.Copy)]
NSNumber _EnableClimateControl { get; }
NSNumber EnableClimateControl { get; }
[Internal]
[BindAs (typeof (bool?))]
[NullAllowed, Export ("enableAutoMode", ArgumentSemantic.Copy)]
NSNumber _EnableAutoMode { get; }
NSNumber EnableAutoMode { get; }
[Export ("airCirculationMode", ArgumentSemantic.Assign)]
INCarAirCirculationMode AirCirculationMode { get; }
#if XAMCORE_4_0 // Adding BindAs is a breaking change
[BindAs (typeof (int?))]
#endif
[NullAllowed, Export ("fanSpeedIndex", ArgumentSemantic.Copy)]
NSNumber FanSpeedIndex { get; }
#if XAMCORE_4_0 // Adding BindAs is a breaking change
[BindAs (typeof (double?))]
#endif
[NullAllowed, Export ("fanSpeedPercentage", ArgumentSemantic.Copy)]
NSNumber FanSpeedPercentage { get; }
@ -5223,6 +5245,10 @@ namespace Intents {
[Export ("climateZone", ArgumentSemantic.Assign)]
INCarSeat ClimateZone { get; }
[iOS (12,0)]
[NullAllowed, Export ("carName", ArgumentSemantic.Copy)]
INSpeakableString CarName { get; }
}
[iOS (10, 0)]
@ -5276,6 +5302,10 @@ namespace Intents {
[Export ("resolveClimateZoneForSetClimateSettingsInCar:withCompletion:")]
void ResolveClimateZone (INSetClimateSettingsInCarIntent intent, Action<INCarSeatResolutionResult> completion);
[iOS (12,0)]
[Export ("resolveCarNameForSetClimateSettingsInCar:withCompletion:")]
void ResolveCarName (INSetClimateSettingsInCarIntent intent, Action<INSpeakableStringResolutionResult> completion);
}
[iOS (10, 0)]
@ -5299,17 +5329,26 @@ namespace Intents {
[BaseType (typeof (INIntent))]
interface INSetDefrosterSettingsInCarIntent {
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
[Protected]
[Export ("initWithEnable:defroster:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] NSNumber enable, INCarDefroster defroster);
[Internal]
[iOS (12,0)]
[Export ("initWithEnable:defroster:carName:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] [BindAs (typeof (bool?))] NSNumber enable, INCarDefroster defroster, [NullAllowed] INSpeakableString carName);
[BindAs (typeof (bool?))]
[NullAllowed, Export ("enable", ArgumentSemantic.Copy)]
NSNumber _Enable { get; }
NSNumber Enable { get; }
[Export ("defroster", ArgumentSemantic.Assign)]
INCarDefroster Defroster { get; }
[iOS (12,0)]
[NullAllowed, Export ("carName", ArgumentSemantic.Copy)]
INSpeakableString CarName { get; }
}
[iOS (10, 0)]
@ -5336,6 +5375,10 @@ namespace Intents {
[Export ("resolveDefrosterForSetDefrosterSettingsInCar:withCompletion:")]
void ResolveDefroster (INSetDefrosterSettingsInCarIntent intent, Action<INCarDefrosterResolutionResult> completion);
[iOS (12,0)]
[Export ("resolveCarNameForSetDefrosterSettingsInCar:withCompletion:")]
void ResolveCarName (INSetDefrosterSettingsInCarIntent intent, Action<INSpeakableStringResolutionResult> completion);
}
[iOS (10, 0)]
@ -5418,10 +5461,19 @@ namespace Intents {
[Export ("initWithProfileNumber:profileLabel:defaultProfile:"), Internal]
IntPtr InitWithProfileNumberLabel ([NullAllowed] NSNumber profileNumber, [NullAllowed] string profileLabel, [NullAllowed] NSNumber defaultProfile);
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
[iOS (10, 2)]
[Export ("initWithProfileNumber:profileName:defaultProfile:"), Internal]
IntPtr InitWithProfileNumberName ([NullAllowed] NSNumber profileNumber, [NullAllowed] string profileName, [NullAllowed] NSNumber defaultProfile);
[iOS (12,0)]
[Export ("initWithProfileNumber:profileName:defaultProfile:carName:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] [BindAs (typeof (int?))] NSNumber profileNumber, [NullAllowed] string profileName, [NullAllowed] [BindAs (typeof (bool?))] NSNumber defaultProfile, [NullAllowed] INSpeakableString carName);
#if XAMCORE_4_0 // Breaking change
[BindAs (typeof (int?))]
#endif
[NullAllowed, Export ("profileNumber", ArgumentSemantic.Copy)]
NSNumber ProfileNumber { get; }
@ -5433,9 +5485,13 @@ namespace Intents {
[NullAllowed, Export ("profileName")]
string ProfileName { get; }
[Internal]
[BindAs (typeof (bool?))]
[NullAllowed, Export ("defaultProfile", ArgumentSemantic.Copy)]
NSNumber _DefaultProfile { get; }
NSNumber DefaultProfile { get; }
[iOS (12, 0)]
[NullAllowed, Export ("carName", ArgumentSemantic.Copy)]
INSpeakableString CarName { get; }
}
[iOS (10, 0)]
@ -5464,6 +5520,10 @@ namespace Intents {
[Export ("resolveDefaultProfileForSetProfileInCar:withCompletion:")]
void ResolveDefaultProfile (INSetProfileInCarIntent intent, Action<INBooleanResolutionResult> completion);
[iOS (12,0)]
[Export ("resolveCarNameForSetProfileInCar:withCompletion:")]
void ResolveCarName (INSetProfileInCarIntent intent, Action<INSpeakableStringResolutionResult> completion);
[iOS (10, 2)]
[Export ("resolveProfileNameForSetProfileInCar:withCompletion:")]
void ResolveProfileName (INSetProfileInCarIntent intent, Action<INStringResolutionResult> completion);
@ -5566,31 +5626,43 @@ namespace Intents {
[BaseType (typeof (INIntent))]
interface INSetSeatSettingsInCarIntent {
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
[Protected] // allow subclassing
[Export ("initWithEnableHeating:enableCooling:enableMassage:seat:level:relativeLevelSetting:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] NSNumber enableHeating, [NullAllowed] NSNumber enableCooling, [NullAllowed] NSNumber enableMassage, INCarSeat seat, [NullAllowed] NSNumber level, INRelativeSetting relativeLevelSetting);
[Internal]
[iOS (12,0)]
[Export ("initWithEnableHeating:enableCooling:enableMassage:seat:level:relativeLevelSetting:carName:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] [BindAs (typeof (bool?))] NSNumber enableHeating, [NullAllowed] [BindAs (typeof (bool?))] NSNumber enableCooling, [NullAllowed] [BindAs (typeof (bool?))] NSNumber enableMassage, INCarSeat seat, [NullAllowed] [BindAs (typeof (int?))] NSNumber level, INRelativeSetting relativeLevelSetting, [NullAllowed] INSpeakableString carName);
[BindAs (typeof (bool?))]
[NullAllowed, Export ("enableHeating", ArgumentSemantic.Copy)]
NSNumber _EnableHeating { get; }
NSNumber EnableHeating { get; }
[Internal]
[BindAs (typeof (bool?))]
[NullAllowed, Export ("enableCooling", ArgumentSemantic.Copy)]
NSNumber _EnableCooling { get; }
NSNumber EnableCooling { get; }
[Internal]
[BindAs (typeof (bool?))]
[NullAllowed, Export ("enableMassage", ArgumentSemantic.Copy)]
NSNumber _EnableMassage { get; }
NSNumber EnableMassage { get; }
[Export ("seat", ArgumentSemantic.Assign)]
INCarSeat Seat { get; }
#if XAMCORE_4_0
[BindAs (typeof (int?))]
#endif
[NullAllowed, Export ("level", ArgumentSemantic.Copy)]
NSNumber Level { get; }
[Export ("relativeLevelSetting", ArgumentSemantic.Assign)]
INRelativeSetting RelativeLevelSetting { get; }
[iOS (12,0)]
[NullAllowed, Export ("carName", ArgumentSemantic.Copy)]
INSpeakableString CarName { get; }
}
[iOS (10, 0)]
@ -5629,6 +5701,10 @@ namespace Intents {
[Export ("resolveRelativeLevelSettingForSetSeatSettingsInCar:withCompletion:")]
void ResolveRelativeLevelSetting (INSetSeatSettingsInCarIntent intent, Action<INRelativeSettingResolutionResult> completion);
[iOS (12,0)]
[Export ("resolveCarNameForSetSeatSettingsInCar:withCompletion:")]
void ResolveCarName (INSetSeatSettingsInCarIntent intent, Action<INSpeakableStringResolutionResult> completion);
}
[iOS (10, 0)]
@ -6641,6 +6717,16 @@ namespace Intents {
[NullAllowed, Export ("distanceRemaining", ArgumentSemantic.Copy)]
NSMeasurement<NSUnitLength> DistanceRemaining { get; set; }
[Watch (5,0), iOS (12,0)]
[BindAs (typeof (bool?))]
[NullAllowed, Export ("charging", ArgumentSemantic.Copy)]
NSNumber Charging { get; set; }
[Watch (5,0), iOS (12,0)]
[BindAs (typeof (double?))]
[NullAllowed, Export ("minutesToFull", ArgumentSemantic.Copy)]
NSNumber MinutesToFull { get; set; }
}
[iOS (10, 3)]
@ -8885,6 +8971,9 @@ namespace Intents {
[NullAllowed, Export ("watchTemplate", ArgumentSemantic.Copy)]
INDefaultCardTemplate WatchTemplate { get; set; }
[Export ("shortcutRole", ArgumentSemantic.Assign)]
INRelevantShortcutRole ShortcutRole { get; set; }
[Export ("shortcut", ArgumentSemantic.Copy)]
INShortcut Shortcut { get; }

Просмотреть файл

@ -34,6 +34,15 @@ namespace IntentsUI {
GenericAction,
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Native]
public enum INUIAddVoiceShortcutButtonStyle : ulong {
White = 0,
WhiteOutline,
Black,
BlackOutline,
}
[iOS (11,0)]
delegate void INUIHostedViewControllingConfigureViewHandler (bool success, NSSet<INParameter> configuredParameters, CGSize desiredSize);
@ -149,6 +158,15 @@ namespace IntentsUI {
[Export ("editVoiceShortcutViewControllerDidCancel:")]
void DidCancel (INUIEditVoiceShortcutViewController controller);
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (UIButton))]
[DisableDefaultCtor]
interface INUIAddVoiceShortcutButton {
[Export ("initWithStyle:")]
IntPtr Constructor (INUIAddVoiceShortcutButtonStyle style);
}
}
#endif

Просмотреть файл

@ -24,8 +24,9 @@ namespace MediaPlayer {
#if XAMCORE_2_0 || !MONOMAC
[Mac (10,12,2, onlyOn64: true)] // type exists only to expose fields
[BaseType (typeof (NSObject))]
#if XAMCORE_2_0 && IOS
#if IOS || WATCH
// introduced in 4.2
[Watch (5,0)]
interface MPMediaEntity : NSSecureCoding {
#else
interface MPMediaItem : NSSecureCoding {
@ -47,10 +48,15 @@ namespace MediaPlayer {
[Field ("MPMediaEntityPropertyPersistentID")]
NSString PropertyPersistentID { get; }
#if XAMCORE_2_0 && IOS
[NoiOS, NoMac, NoTV, Watch (5,0)]
[Export ("persistentID")]
ulong PersistentID { get; }
#if IOS || WATCH
}
#if MONOMAC || TVOS
#if MONOMAC || TVOS || WATCH
[Mac (10,12,2, onlyOn64: true)]
[Watch (5,0)]
[Static]
#else
[BaseType (typeof (MPMediaEntity))]
@ -59,11 +65,13 @@ namespace MediaPlayer {
#endif
[NoMac]
[NoTV]
[NoWatch]
[Export ("persistentIDPropertyForGroupingType:")][Static]
string GetPersistentIDProperty (MPMediaGrouping groupingType);
[NoMac]
[NoTV]
[NoWatch]
[Export ("titlePropertyForGroupingType:")][Static]
string GetTitleProperty (MPMediaGrouping groupingType);
@ -228,6 +236,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[Watch (5,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface MPMediaItemArtwork {
@ -266,6 +275,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
// Objective-C exception thrown. Name: MPMediaItemCollectionInitException Reason: -init is not supported, use -initWithItems:
[DisableDefaultCtor]
#if XAMCORE_2_0 && IOS
@ -303,6 +313,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[BaseType (typeof (NSObject))]
interface MPMediaLibrary : NSSecureCoding {
[Static, Export ("defaultMediaLibrary")]
@ -348,7 +359,7 @@ namespace MediaPlayer {
void GetPlaylist (NSUuid uuid, [NullAllowed] MPMediaPlaylistCreationMetadata creationMetadata, Action<MPMediaPlaylist, NSError> completionHandler);
}
#if !MONOMAC
#if !MONOMAC && !WATCH
[NoTV]
[BaseType (typeof (UIViewController), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(MPMediaPickerControllerDelegate)})]
interface MPMediaPickerController {
@ -397,6 +408,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[BaseType (typeof (MPMediaItemCollection))]
// Objective-C exception thrown. Name: MPMediaItemCollectionInitException Reason: -init is not supported, use -initWithItems:
[DisableDefaultCtor]
@ -445,7 +457,7 @@ namespace MediaPlayer {
void AddMediaItems (MPMediaItem[] mediaItems, [NullAllowed] Action<NSError> completionHandler);
}
[NoMac]
[NoMac, Watch (5,0)]
[Static]
interface MPMediaPlaylistProperty {
[Field ("MPMediaPlaylistPropertyPersistentID")]
@ -473,6 +485,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[BaseType (typeof (NSObject))]
interface MPMediaQuery : NSSecureCoding, NSCopying {
[DesignatedInitializer]
@ -561,12 +574,14 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[BaseType (typeof (NSObject))]
interface MPMediaPredicate : NSSecureCoding {
}
[NoMac]
[NoTV]
[NoWatch]
[BaseType (typeof (MPMediaPredicate))]
interface MPMediaPropertyPredicate {
[Static, Export ("predicateWithValue:forProperty:")]
@ -587,6 +602,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0)]
[BaseType (typeof (NSObject))]
interface MPMovieAccessLog : NSCopying {
@ -602,6 +618,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0)]
[BaseType (typeof (NSObject))]
interface MPMovieErrorLog : NSCopying {
@ -617,6 +634,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0)]
[BaseType (typeof (NSObject))]
interface MPMovieAccessLogEvent : NSCopying {
@ -665,6 +683,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0)]
[BaseType (typeof (NSObject))]
interface MPMovieErrorLogEvent : NSCopying {
@ -691,6 +710,7 @@ namespace MediaPlayer {
}
[NoMac]
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0)]
interface MPMoviePlayerFinishedEventArgs {
[Export ("MPMoviePlayerPlaybackDidFinishReasonUserInfoKey")]
@ -698,6 +718,7 @@ namespace MediaPlayer {
}
#if !MONOMAC
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0)]
interface MPMoviePlayerFullScreenEventArgs {
[Export ("MPMoviePlayerFullscreenAnimationDurationUserInfoKey")]
@ -707,6 +728,7 @@ namespace MediaPlayer {
UIViewAnimationCurve AnimationCurve { get; }
}
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0)]
interface MPMoviePlayerThumbnailEventArgs {
[Export ("MPMoviePlayerThumbnailImageKey")]
@ -721,6 +743,7 @@ namespace MediaPlayer {
#endif
[NoMac]
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0)]
interface MPMoviePlayerTimedMetadataEventArgs {
[Export ("MPMoviePlayerTimedMetadataUserInfoKey")]
@ -729,6 +752,7 @@ namespace MediaPlayer {
// no [Model] yet... it can be easily created in user code (all abstract) if needed
[NoMac]
[Watch (5,0)]
[Protocol]
interface MPMediaPlayback {
[Abstract]
@ -772,255 +796,322 @@ namespace MediaPlayer {
void EndSeeking ();
}
#if !MONOMAC
#if !MONOMAC
#if WATCH
[Static]
interface MPMoviePlayerController {
#else
[NoTV]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[BaseType (typeof (NSObject))]
interface MPMoviePlayerController : MPMediaPlayback {
#endif
[NoWatch]
[DesignatedInitializer]
[Export ("initWithContentURL:")]
IntPtr Constructor (NSUrl url);
[NoWatch]
[Export ("backgroundColor", ArgumentSemantic.Retain)]
// <quote>You should avoid using this property. It is available only when you use the initWithContentURL: method to initialize the movie player controller object.</quote>
[Availability (Deprecated = Platform.iOS_3_2, Obsoleted = Platform.iOS_8_0, Message = "Do not use; this API was removed and is not always available.")]
UIColor BackgroundColor { get; set; }
[NoWatch]
[Export ("scalingMode")]
MPMovieScalingMode ScalingMode { get; set; }
[NoWatch]
[Export ("movieControlMode")]
[Availability (Deprecated = Platform.iOS_3_2, Obsoleted = Platform.iOS_8_0, Message = "Do not use; this API was removed.")]
MPMovieControlMode MovieControlMode { get; set; }
[NoWatch]
[Export ("initialPlaybackTime")]
double InitialPlaybackTime { get; set; }
[NoWatch]
[NullAllowed] // by default this property is null
[Export ("contentURL", ArgumentSemantic.Copy)]
NSUrl ContentUrl { get; set; }
[NoWatch]
[Export ("view")]
UIView View { get; }
[NoWatch]
[Export ("backgroundView")]
UIView BackgroundView { get; }
[NoWatch]
[Export ("playbackState")]
MPMoviePlaybackState PlaybackState { get; }
[NoWatch]
[Export ("loadState")]
MPMovieLoadState LoadState { get; }
[NoWatch]
[Export ("controlStyle")]
MPMovieControlStyle ControlStyle { get; set; }
[NoWatch]
[Export ("repeatMode")]
MPMovieRepeatMode RepeatMode { get; set; }
[NoWatch]
[Export ("shouldAutoplay")]
bool ShouldAutoplay { get; set; }
[NoWatch]
[Export ("useApplicationAudioSession")]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
bool UseApplicationAudioSession { get; set; }
[NoWatch]
[Export ("fullscreen")]
bool Fullscreen { [Bind ("isFullscreen")] get; set; }
[NoWatch]
[Export ("setFullscreen:animated:")]
void SetFullscreen (bool fullscreen, bool animated);
[NoWatch]
[Export ("allowsAirPlay")]
bool AllowsAirPlay { get; set; }
[NoWatch]
[Export ("airPlayVideoActive")]
bool AirPlayVideoActive { [Bind ("isAirPlayVideoActive")] get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0)]
[Export ("accessLog")]
MPMovieAccessLog AccessLog { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0)]
[Export ("errorLog")]
MPMovieErrorLog ErrorLog { get; }
// Brought it from the MPMediaPlayback.h
[NoWatch]
[Export ("thumbnailImageAtTime:timeOption:")]
[Availability (Deprecated = Platform.iOS_7_0, Message = "Use 'RequestThumbnails' instead.")]
UIImage ThumbnailImageAt (double time, MPMovieTimeOption timeOption);
[NoWatch]
[Export ("requestThumbnailImagesAtTimes:timeOption:")]
void RequestThumbnails (NSNumber [] doubleNumbers, MPMovieTimeOption timeOption);
[NoWatch]
[Export ("cancelAllThumbnailImageRequests")]
void CancelAllThumbnailImageRequests ();
//
// From interface MPMovieProperties
//
[NoWatch]
[Export ("movieMediaTypes")]
MPMovieMediaType MovieMediaTypes { get; }
[NoWatch]
[Export ("movieSourceType")]
MPMovieSourceType SourceType { get; set; }
[NoWatch]
[Export ("duration")]
double Duration { get; }
[NoWatch]
[Export ("playableDuration")]
double PlayableDuration { get; }
[NoWatch]
[Export ("naturalSize")]
CGSize NaturalSize { get; }
[NoWatch]
[Export ("endPlaybackTime")]
double EndPlaybackTime { get; set; }
[NoWatch]
[Export ("timedMetadata")]
MPTimedMetadata [] TimedMetadata { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerScalingModeDidChangeNotification")]
[Notification]
NSString ScalingModeDidChangeNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerPlaybackDidFinishNotification")]
[Notification (typeof (MPMoviePlayerFinishedEventArgs))]
NSString PlaybackDidFinishNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerPlaybackDidFinishReasonUserInfoKey")] // NSNumber (MPMovieFinishReason)
NSString PlaybackDidFinishReasonUserInfoKey { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerPlaybackStateDidChangeNotification")]
[Notification]
NSString PlaybackStateDidChangeNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerLoadStateDidChangeNotification")]
[Notification]
NSString LoadStateDidChangeNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerNowPlayingMovieDidChangeNotification")]
[Notification]
NSString NowPlayingMovieDidChangeNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerWillEnterFullscreenNotification")]
[Notification (typeof (MPMoviePlayerFullScreenEventArgs))]
[Notification]
NSString WillEnterFullscreenNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerDidEnterFullscreenNotification")]
[Notification]
NSString DidEnterFullscreenNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerWillExitFullscreenNotification")]
[Notification (typeof (MPMoviePlayerFullScreenEventArgs))]
NSString WillExitFullscreenNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerDidExitFullscreenNotification")]
[Notification]
NSString DidExitFullscreenNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerFullscreenAnimationDurationUserInfoKey")]
NSString FullscreenAnimationDurationUserInfoKey { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerFullscreenAnimationCurveUserInfoKey")]
NSString FullscreenAnimationCurveUserInfoKey { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMovieMediaTypesAvailableNotification")]
[Notification]
NSString TypesAvailableNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMovieSourceTypeAvailableNotification")]
[Notification]
NSString SourceTypeAvailableNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMovieDurationAvailableNotification")]
[Notification]
NSString DurationAvailableNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMovieNaturalSizeAvailableNotification")]
[Notification]
NSString NaturalSizeAvailableNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerThumbnailImageRequestDidFinishNotification")]
[Notification (typeof (MPMoviePlayerThumbnailEventArgs))]
NSString ThumbnailImageRequestDidFinishNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerThumbnailImageKey")]
NSString ThumbnailImageKey { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerThumbnailTimeKey")]
NSString ThumbnailTimeKey { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerThumbnailErrorKey")]
NSString ThumbnailErrorKey { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerTimedMetadataUpdatedNotification")]
[Notification (typeof (MPMoviePlayerTimedMetadataEventArgs))]
NSString TimedMetadataUpdatedNotification { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerTimedMetadataUserInfoKey")]
NSString TimedMetadataUserInfoKey { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerTimedMetadataKeyName")]
NSString TimedMetadataKeyName { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerTimedMetadataKeyInfo")]
NSString TimedMetadataKeyInfo { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerTimedMetadataKeyMIMEType")]
NSString TimedMetadataKeyMIMEType { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerTimedMetadataKeyDataType")]
NSString TimedMetadataKeyDataType { get; }
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMoviePlayerTimedMetadataKeyLanguageCode")]
NSString TimedMetadataKeyLanguageCode { get; }
[Watch (5,0)]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[Field ("MPMediaPlaybackIsPreparedToPlayDidChangeNotification")]
[Notification]
NSString MediaPlaybackIsPreparedToPlayDidChangeNotification { get; }
[iOS (6,0)]
[NoWatch]
[Export ("readyForDisplay")]
bool ReadyForDisplay { get; }
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[iOS (6,0)]
[NoWatch]
[Field ("MPMoviePlayerReadyForDisplayDidChangeNotification")]
[Notification]
NSString MoviePlayerReadyForDisplayDidChangeNotification { get; }
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
[NoWatch]
[Field ("MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification")]
[Notification]
NSString MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification { get; }
@ -1029,6 +1120,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[Availability (Deprecated = Platform.iOS_9_0)]
[BaseType (typeof (NSObject))]
// Objective-C exception thrown. Name: NSGenericException Reason: MPTimedMetadata cannot be created directly
@ -1054,7 +1146,7 @@ namespace MediaPlayer {
NSDictionary AllMetadata { get; }
}
#if !MONOMAC
#if !MONOMAC && !WATCH
[NoTV]
[BaseType (typeof (UIViewController))]
[Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")]
@ -1075,6 +1167,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface MPMusicPlayerController : MPMediaPlayback {
@ -1173,7 +1266,7 @@ namespace MediaPlayer {
NSString VolumeDidChangeNotification { get; }
}
#if !MONOMAC
#if !MONOMAC && !WATCH
[NoTV]
[BaseType (typeof (UIView))]
interface MPVolumeView {
@ -1257,6 +1350,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[BaseType (typeof (NSObject))]
// Objective-C exception thrown. Name: NSInvalidArgumentException Reason: MPMediaQuerySection is a read-only object
[DisableDefaultCtor]
@ -1268,7 +1362,7 @@ namespace MediaPlayer {
string Title { get; }
}
[Mac (10,12,2, onlyOn64: true)]
[Mac (10,12,2, onlyOn64: true), Watch (5,0)]
[BaseType (typeof (NSObject))]
// Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -init is not supported, use +defaultCenter
[DisableDefaultCtor]
@ -1343,6 +1437,7 @@ namespace MediaPlayer {
[iOS (11,0)]
[TV (11,0)]
[Mac (10,13, onlyOn64: true)]
[Watch (5,0)]
[Field ("MPNowPlayingInfoPropertyServiceIdentifier")]
NSString PropertyServiceIdentifier { get; }
@ -1375,6 +1470,7 @@ namespace MediaPlayer {
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[NoWatch]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // crash if used
interface MPContentItem {
@ -1417,6 +1513,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[iOS (7,1)]
[BaseType (typeof (NSObject))]
[Model]
@ -1457,6 +1554,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[iOS (7,1)]
[BaseType (typeof (NSObject))]
[Model]
@ -1481,6 +1579,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[iOS (7,1)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // NSInvalidArgumentException Reason: -init is invalid. Use +sharedManager. <- [sic]
@ -1524,6 +1623,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[iOS (8,4)]
[BaseType (typeof(NSObject))]
interface MPPlayableContentManagerContext {
@ -1547,7 +1647,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // NSGenericException Reason: MPRemoteCommands cannot be initialized externally.
interface MPRemoteCommand {
@ -1569,7 +1669,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (MPRemoteCommand))]
[DisableDefaultCtor] // NSGenericException Reason: MPChangePlaybackRateCommands cannot be initialized externally.
interface MPChangePlaybackRateCommand {
@ -1579,7 +1679,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (8,0)]
[iOS (8,0), Watch (5,0)]
[BaseType (typeof(MPRemoteCommand))]
[DisableDefaultCtor] // NSGenericException Reason: MPChangeShuffleModeCommand cannot be initialized externally.
interface MPChangeShuffleModeCommand
@ -1589,7 +1689,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (8,0)]
[iOS (8,0), Watch (5,0)]
[BaseType (typeof(MPRemoteCommand))]
[DisableDefaultCtor] // NSGenericException Reason: MPChangeRepeatModeCommand cannot be initialized externally.
interface MPChangeRepeatModeCommand
@ -1599,7 +1699,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (MPRemoteCommand))]
[DisableDefaultCtor] // NSGenericException Reason: MPFeedbackCommands cannot be initialized externally.
interface MPFeedbackCommand {
@ -1616,7 +1716,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (MPRemoteCommand))]
[DisableDefaultCtor] // NSGenericException Reason: MPRatingCommands cannot be initialized externally.
interface MPRatingCommand {
@ -1629,7 +1729,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (MPRemoteCommand))]
[DisableDefaultCtor] // NSGenericException Reason: MPSkipIntervalCommands cannot be initialized externally.
interface MPSkipIntervalCommand {
@ -1642,7 +1742,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface MPRemoteCommandCenter {
@ -1718,7 +1818,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // NSGenericException Reason: MPRemoteCommandEvents cannot be initialized externally.
interface MPRemoteCommandEvent {
@ -1731,7 +1831,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (MPRemoteCommandEvent))]
[DisableDefaultCtor] // NSGenericException Reason: MPChangePlaybackRateCommandEvents cannot be initialized externally.
interface MPChangePlaybackRateCommandEvent {
@ -1741,7 +1841,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (MPRemoteCommandEvent))]
[DisableDefaultCtor] // NSGenericException Reason: MPRatingCommandEvents cannot be initialized externally.
interface MPRatingCommandEvent {
@ -1751,7 +1851,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (MPRemoteCommandEvent))]
[DisableDefaultCtor] // Name: NSGenericException Reason: MPSeekCommandEvents cannot be initialized externally.
interface MPSeekCommandEvent {
@ -1761,7 +1861,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (MPRemoteCommandEvent))]
[DisableDefaultCtor] // NSGenericException Reason: MPSkipIntervalCommandEvents cannot be initialized externally.
interface MPSkipIntervalCommandEvent {
@ -1771,7 +1871,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (7,1)]
[iOS (7,1), Watch (5,0)]
[BaseType (typeof (MPRemoteCommandEvent))]
[DisableDefaultCtor]
interface MPFeedbackCommandEvent {
@ -1781,7 +1881,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (9,0)]
[iOS (9,0), Watch (5,0)]
[BaseType (typeof (MPRemoteCommandEvent))]
[DisableDefaultCtor] // NSGenericException Reason: MPChangeLanguageOptionCommandEvents cannot be initialized externally.
interface MPChangeLanguageOptionCommandEvent {
@ -1795,7 +1895,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (8,0)]
[iOS (8,0), Watch (5,0)]
[BaseType (typeof(MPRemoteCommandEvent))]
[DisableDefaultCtor] // NSGenericException Reason: MPChangeShuffleModeCommandEvent cannot be initialized externally.
interface MPChangeShuffleModeCommandEvent
@ -1810,7 +1910,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (8,0)]
[iOS (8,0), Watch (5,0)]
[BaseType (typeof(MPRemoteCommandEvent))]
[DisableDefaultCtor] // NSGenericException Reason: MPChangeRepeatModeCommandEvent cannot be initialized externally.
interface MPChangeRepeatModeCommandEvent
@ -1825,7 +1925,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (9,0)]
[iOS (9,0), Watch (5,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // pre-emptive
interface MPNowPlayingInfoLanguageOption {
@ -1858,7 +1958,7 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (9,0)]
[iOS (9,0), Watch (5,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // pre-emptive
interface MPNowPlayingInfoLanguageOptionGroup {
@ -1877,6 +1977,7 @@ namespace MediaPlayer {
[Mac (10,12,2, onlyOn64: true)]
[iOS (9,0)]
[Watch (5,0)]
[Static]
// not [Internal] since they are exposed as an NSString[] property in MPNowPlayingInfoLanguageOption
interface MPLanguageOptionCharacteristics {
@ -1912,14 +2013,14 @@ namespace MediaPlayer {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (9,1)]
[iOS (9,1), Watch (5,0)]
[BaseType (typeof (MPRemoteCommand))]
[DisableDefaultCtor] // Objective-C exception thrown. Name: NSGenericException Reason: MPChangePlaybackPositionCommands cannot be initialized externally.
interface MPChangePlaybackPositionCommand {
}
[Mac (10,12,2, onlyOn64: true)]
[iOS (9,1)]
[iOS (9,1), Watch (5,0)]
[BaseType (typeof (MPRemoteCommandEvent))]
[DisableDefaultCtor] // Objective-C exception thrown. Name: NSGenericException Reason: MPChangePlaybackPositionCommandEvents cannot be initialized externally.
interface MPChangePlaybackPositionCommandEvent {
@ -1929,6 +2030,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV][iOS (9,3)]
[NoWatch]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface MPMediaPlaylistCreationMetadata {
@ -1949,6 +2051,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[iOS (10,1)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject))]
@ -1961,6 +2064,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[iOS (10,1)]
[BaseType (typeof(MPMusicPlayerQueueDescriptor))]
interface MPMusicPlayerMediaItemQueueDescriptor
@ -1989,6 +2093,7 @@ namespace MediaPlayer {
[NoMac]
[NoTV]
[NoWatch]
[iOS (10,1)]
[BaseType (typeof(MPMusicPlayerQueueDescriptor))]
interface MPMusicPlayerStoreQueueDescriptor
@ -2011,6 +2116,7 @@ namespace MediaPlayer {
[NoTV]
[NoMac]
[NoWatch]
[iOS (10,3)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
@ -2026,6 +2132,7 @@ namespace MediaPlayer {
[NoTV]
[NoMac]
[NoWatch]
[iOS (10,3)]
[BaseType (typeof(MPMusicPlayerControllerQueue))]
interface MPMusicPlayerControllerMutableQueue
@ -2039,6 +2146,7 @@ namespace MediaPlayer {
[NoTV]
[NoMac]
[NoWatch]
[iOS (10,3)]
[BaseType (typeof(MPMusicPlayerController))]
interface MPMusicPlayerApplicationController
@ -2050,6 +2158,7 @@ namespace MediaPlayer {
[NoTV][NoMac]
[iOS (11,0)]
[NoWatch]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface MPMusicPlayerPlayParameters : NSSecureCoding {
@ -2061,6 +2170,7 @@ namespace MediaPlayer {
}
[NoTV][NoMac]
[NoWatch]
[iOS (11,0)]
[BaseType (typeof (MPMusicPlayerQueueDescriptor))]
[DisableDefaultCtor]
@ -2084,9 +2194,10 @@ namespace MediaPlayer {
interface IMPSystemMusicPlayerController {}
[NoTV][NoMac]
[iOS (11,0)]
[iOS (11,0), Watch (5,0)]
[Protocol]
interface MPSystemMusicPlayerController {
[NoWatch]
[Abstract]
[Export ("openToPlayQueueDescriptor:")]
void OpenToPlay (MPMusicPlayerQueueDescriptor queueDescriptor);

Просмотреть файл

@ -1253,7 +1253,7 @@ namespace MetalPerformanceShaders {
[iOS (10,0)][TV (10,0)][Mac (10, 13, onlyOn64: true)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface MPSImageDescriptor {
interface MPSImageDescriptor : NSCopying {
[Export ("width")]
nuint Width { get; set; }
@ -3240,7 +3240,7 @@ namespace MetalPerformanceShaders {
[TV (11,0), Mac (10, 13, onlyOn64: true), iOS (11,0)]
[Protocol, Model]
[BaseType (typeof (NSObject), Name = "MPSCNNConvolutionDataSource")]
interface MPSCnnConvolutionDataSource {
interface MPSCnnConvolutionDataSource : NSCopying {
[Abstract]
[Export ("dataType")]
MPSDataType DataType { get; }

Просмотреть файл

@ -250,6 +250,7 @@ namespace ModelIO {
[Static]
[Export ("placeLightProbesWithDensity:heuristic:usingIrradianceDataSource:")]
[Mac (10, 12)]
MDLLightProbe[] PlaceLightProbes (float density, MDLProbePlacement type, IMDLLightProbeIrradianceDataSource dataSource);
}

Просмотреть файл

@ -620,6 +620,10 @@ namespace PassKit {
[NoWatch] // Radar: https://trello.com/c/MvaHEZlc
[Export ("requiresFelicaSecureElement")]
bool RequiresFelicaSecureElement { get; set; }
[iOS (12, 0)]
[Export ("style", ArgumentSemantic.Assign)]
PKAddPaymentPassStyle Style { get; set; }
}
[iOS (9,0)]
@ -838,6 +842,18 @@ namespace PassKit {
[iOS (10,3), Watch (3,2)]
[Field ("PKPaymentNetworkIDCredit")]
NSString IDCredit { get; }
[iOS (12,0), Watch (5,0)]
[Field ("PKPaymentNetworkElectron")]
NSString Electron { get; }
[iOS (12,0), Watch (5,0)]
[Field ("PKPaymentNetworkMaestro")]
NSString Maestro { get; }
[iOS (12,0), Watch (5,0)]
[Field ("PKPaymentNetworkVPay")]
NSString VPay { get; }
}
#if !WATCH
@ -855,6 +871,10 @@ namespace PassKit {
[Export ("initWithPaymentButtonType:paymentButtonStyle:")]
[DesignatedInitializer]
IntPtr Constructor (PKPaymentButtonType type, PKPaymentButtonStyle style);
[iOS (12, 0)]
[Export ("cornerRadius")]
nfloat CornerRadius { get; set; }
}
[iOS (9,0)]

Просмотреть файл

@ -508,9 +508,13 @@ namespace PdfKit {
}
[iOS (11,0)]
[DisableDefaultCtor]
[BaseType (typeof (PdfAction), Name = "PDFActionResetForm")]
interface PdfActionResetForm {
//has a public Init ???
// - (instancetype)init NS_DESIGNATED_INITIALIZER;
[Export ("init")]
[DesignatedInitializer]
IntPtr Constructor ();
//NSArray of NSString
[Export ("fields"), NullAllowed]
@ -571,9 +575,12 @@ namespace PdfKit {
[Export ("userName")]
string UserName { get; set; }
[NoiOS]
[Export ("popup")]
#if MONOMAC
PdfAnnotationPopup Popup { get; set; }
#else
PdfAnnotation Popup { get; set; }
#endif
[Export ("shouldDisplay")]
bool ShouldDisplay { get; set; }
@ -1041,6 +1048,7 @@ namespace PdfKit {
[Export ("fieldName")]
string FieldName { get; set; }
[Mac (10, 8)]
[Export ("attributedStringValue")]
NSAttributedString AttributedStringValue { get; set; }
@ -1082,6 +1090,10 @@ namespace PdfKit {
[BaseType (typeof (NSObject), Name = "PDFDestination")]
interface PdfDestination : NSCopying {
[Mac (10,13)] // This used to be a calculated macro and promoted to an actual field in 10.13.
[Field ("kPDFDestinationUnspecifiedValue")]
nfloat UnspecifiedValue { get; }
[DesignatedInitializer]
[Export ("initWithPage:atPoint:")]
IntPtr Constructor (PdfPage page, CGPoint point);
@ -1103,6 +1115,7 @@ namespace PdfKit {
//Add attributes for delegates/events
[iOS (11,0)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "PDFDocument", Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (PdfDocumentDelegate) })]
interface PdfDocument : NSCopying {
@ -1146,6 +1159,11 @@ namespace PdfKit {
[Notification]
NSString DidEndPageWriteNotification { get; }
// - (instancetype)init NS_DESIGNATED_INITIALIZER;
[Export ("init")]
[DesignatedInitializer]
IntPtr Constructor ();
[Export ("initWithURL:")]
[DesignatedInitializer]
IntPtr Constructor (NSUrl url);
@ -1397,9 +1415,15 @@ namespace PdfKit {
}
[iOS (11,0)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "PDFOutline")]
interface PdfOutline {
// - (instancetype)init NS_DESIGNATED_INITIALIZER;
[Export ("init")]
[DesignatedInitializer]
IntPtr Constructor ();
[Export ("document")]
PdfDocument Document { get; }
@ -1437,9 +1461,15 @@ namespace PdfKit {
}
[iOS (11,0)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "PDFPage")]
interface PdfPage : NSCopying {
// - (instancetype)init NS_DESIGNATED_INITIALIZER;
[Export ("init")]
[DesignatedInitializer]
IntPtr Constructor ();
[DesignatedInitializer]
[Export ("initWithImage:")]
IntPtr Constructor (NSImage image);
@ -1764,6 +1794,10 @@ namespace PdfKit {
[Export ("interpolationQuality", ArgumentSemantic.Assign)]
PdfInterpolationQuality InterpolationQuality { get; set; }
[iOS (12,0), Mac (10,14, onlyOn64: true)]
[Export ("pageShadowsEnabled")]
bool PageShadowsEnabled { get; [Bind ("enablePageShadows:")] set; }
[NoMac]
[Export ("usePageViewController:withViewOptions:")]
void UsePageViewController (bool enable, [NullAllowed] NSDictionary viewOptions);

Просмотреть файл

@ -1278,6 +1278,10 @@ namespace Photos
[Mac (10,14, onlyOn64: true)]
[Export ("setProjectPreviewImage:")]
void SetProjectPreviewImage (NSImage previewImage);
[Mac (10,14, onlyOn64: true)]
[Export ("removeAssets:")]
void RemoveAssets (PHAsset [] /*id<NSFastEnumeration>*/ assets); //a collection of PHAsset objects
}
[Mac (10,13, onlyOn64 : true)]

Просмотреть файл

@ -98,11 +98,11 @@ namespace QuartzComposer {
[Field ("QCCompositionInputDestinationImageKey")]
NSString InputDestinationImageKey { get; }
[Obsoleted (PlatformName.MacOSX, 14,0, message: "Field will return 'null'.")]
[Deprecated (PlatformName.MacOSX, 10,14, message: "Use 'Metal' instead.")]
[Field ("QCCompositionInputRSSFeedURLKey")]
NSString InputRSSFeedURLKey { get; }
[Obsoleted (PlatformName.MacOSX, 14,0, message: "Field will return 'null'.")]
[Deprecated (PlatformName.MacOSX, 10,14, message: "Use 'Metal' instead.")]
[Field ("QCCompositionInputRSSArticleDurationKey")]
NSString InputRSSArticleDurationKey { get; }
@ -160,7 +160,7 @@ namespace QuartzComposer {
[Field ("QCCompositionProtocolScreenSaver")]
NSString ProtocolScreenSaver { get; }
[Obsoleted (PlatformName.MacOSX, 14,0, message: "Field will return 'null'.")]
[Deprecated (PlatformName.MacOSX, 10,14, message: "Use 'Metal' instead.")]
[Field ("QCCompositionProtocolRSSVisualizer")]
NSString ProtocolRSSVisualizer { get; }

Просмотреть файл

@ -2836,7 +2836,7 @@ namespace SceneKit {
#if XAMCORE_2_0
[Abstract]
#endif
[Export ("delegate", ArgumentSemantic.Assign), NullAllowed]
[Export ("delegate", ArgumentSemantic.Weak), NullAllowed]
NSObject WeakSceneRendererDelegate { get; set; }
[Wrap ("WeakSceneRendererDelegate")]
@ -4144,7 +4144,7 @@ namespace SceneKit {
[Export ("timeStep")]
double TimeStep { get; set; }
[Export ("contactDelegate", ArgumentSemantic.UnsafeUnretained)]
[Export ("contactDelegate", ArgumentSemantic.Weak)]
[NullAllowed]
NSObject WeakContactDelegate { get; set; }

Просмотреть файл

@ -144,6 +144,7 @@ namespace SpriteKit {
[Static, Export ("node")]
SKNode Create ();
[Mac (10, 10)]
[Static]
[Export ("nodeWithFileNamed:")]
[return: NullAllowed]

Просмотреть файл

@ -213,7 +213,14 @@ namespace StoreKit {
[iOS (6,0)]
[Export ("downloadable")]
bool Downloadable { [Bind ("isDownloadable")] get; }
bool Downloadable {
#if !MONOMAC
// Xcode 10 beta 3 headers says this is how it works on macOS as well, but this is a breaking change for macOS, so it's probably wrong.
// https://trello.com/c/A34S0kLY/125-41782055-skproductdownloadable-crashes-on-macos-1011-when-compiled-with-xcode-10
[Bind ("isDownloadable")]
#endif
get;
}
[NoiOS]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'DownloadContentLengths' instead.")]

Просмотреть файл

@ -995,8 +995,8 @@ namespace TVMLKit {
[NullAllowed, Export ("artworkImageURL", ArgumentSemantic.Strong)]
NSUrl ArtworkImageUrl { get; }
[Export ("explicit")]
bool Explicit { [Bind ("isExplicit")] get; }
[Export ("explicitContent")]
bool ExplicitContent { [Bind ("isExplicitContent")] get; }
[Export ("resumeTime")]
/* NSInterval */ double ResumeTime { get; }

Просмотреть файл

@ -789,7 +789,7 @@ namespace UIKit {
[BaseType (typeof (NSObject))]
[DesignatedDefaultCtor]
[iOS (6,0)]
interface NSShadow : NSCoding, NSCopying {
interface NSShadow : NSSecureCoding, NSCopying {
[Export ("shadowOffset", ArgumentSemantic.Assign)]
CGSize ShadowOffset { get; set; }
@ -14630,6 +14630,7 @@ namespace UIKit {
}
[NoTV]
[Deprecated (PlatformName.iOS, 12, 0, message: "No longer supported; please adopt 'WKWebView'.")]
[BaseType (typeof (UIView), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UIWebViewDelegate)})]
interface UIWebView : UIScrollViewDelegate {
[Export ("initWithFrame:")]
@ -14734,6 +14735,7 @@ namespace UIKit {
}
[NoTV]
[Deprecated (PlatformName.iOS, 12, 0, message: "No longer supported; please adopt 'WKWebView' APIs.")]
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
@ -18251,14 +18253,20 @@ namespace UIKit {
[Export ("importDocumentAtURL:nextToDocumentAtURL:mode:completionHandler:")]
void ImportDocument (NSUrl documentUrl, NSUrl neighbourUrl, UIDocumentBrowserImportMode importMode, Action<NSUrl, NSError> completion);
[Internal] // got deprecated
[Export ("transitionControllerForDocumentURL:")]
UIDocumentBrowserTransitionController GetTransitionController (NSUrl documentUrl);
UIDocumentBrowserTransitionController _DeprecatedGetTransitionController (NSUrl documentUrl);
[Export ("customActions", ArgumentSemantic.Strong)]
UIDocumentBrowserAction[] CustomActions { get; set; }
[Export ("browserUserInterfaceStyle", ArgumentSemantic.Assign)]
UIDocumentBrowserUserInterfaceStyle BrowserUserInterfaceStyle { get; set; }
[Internal]
[iOS (12,0)]
[Export ("transitionControllerForDocumentAtURL:")]
UIDocumentBrowserTransitionController _NewGetTransitionController (NSUrl documentUrl);
}
interface IUIDocumentBrowserViewControllerDelegate {}
@ -18268,6 +18276,7 @@ namespace UIKit {
[Protocol, Model]
[BaseType (typeof(NSObject))]
interface UIDocumentBrowserViewControllerDelegate {
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'DidPickDocumentsAtUrls (UIDocumentBrowserViewController, NSUrl[])' instead.")]
[Export ("documentBrowser:didPickDocumentURLs:")]
void DidPickDocumentUrls (UIDocumentBrowserViewController controller, NSUrl[] documentUrls);
@ -18285,6 +18294,10 @@ namespace UIKit {
[Export ("documentBrowser:willPresentActivityViewController:")]
void WillPresent (UIDocumentBrowserViewController controller, UIActivityViewController activityViewController);
[iOS (12,0)]
[Export ("documentBrowser:didPickDocumentsAtURLs:")]
void DidPickDocumentsAtUrls (UIDocumentBrowserViewController controller, NSUrl[] documentUrls);
}
[NoTV, NoWatch]

Просмотреть файл

@ -59,6 +59,7 @@ namespace UserNotifications {
public enum UNNotificationCategoryOptions : ulong {
None = 0,
CustomDismissAction = (1 << 0),
[NoMac]
AllowInCarPlay = (2 << 0),
HiddenPreviewsShowTitle = (1 << 2),
HiddenPreviewsShowSubtitle = (1 << 3),
@ -339,7 +340,7 @@ namespace UserNotifications {
[Export ("categoryIdentifier")]
string CategoryIdentifier { get; }
[Unavailable (PlatformName.TvOS)]
[NoTV, NoMac]
[Export ("launchImageName")]
string LaunchImageName { get; }
@ -394,7 +395,7 @@ namespace UserNotifications {
[Export ("categoryIdentifier")]
string CategoryIdentifier { get; set; }
[Unavailable (PlatformName.TvOS)]
[NoTV, NoMac]
[Export ("launchImageName")]
string LaunchImageName { get; set; }
@ -547,8 +548,7 @@ namespace UserNotifications {
[Export ("lockScreenSetting")]
UNNotificationSetting LockScreenSetting { get; }
[Unavailable (PlatformName.TvOS)]
[Unavailable (PlatformName.WatchOS)]
[NoWatch, NoTV, NoMac]
[Export ("carPlaySetting")]
UNNotificationSetting CarPlaySetting { get; }
@ -670,7 +670,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[NoMac]
[Unavailable (PlatformName.TvOS)]
[BaseType (typeof (UNNotificationTrigger))]
[DisableDefaultCtor] // as per doc, use supplied method (CreateTrigger)

Просмотреть файл

@ -33,6 +33,7 @@ using JavaScriptCore;
namespace WebKit {
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (WebScriptObject), Name="DOMObject")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMObject init]: should never be used
partial interface DomObject : NSCopying {
@ -41,6 +42,7 @@ namespace WebKit {
/////////////////////////
// DomObject subclasses
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMAbstractView")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMAbstractView init]: should never be used
partial interface DomAbstractView {
@ -48,6 +50,7 @@ namespace WebKit {
DomDocument Document { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMCSSRule")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSRule init]: should never be used
partial interface DomCssRule {
@ -64,6 +67,7 @@ namespace WebKit {
DomCssRule ParentRule { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomCssRule), Name="DOMCSSCharsetRule")]
[DisableDefaultCtor]
partial interface DomCssCharsetRule {
@ -71,6 +75,7 @@ namespace WebKit {
string Encoding { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomCssRule), Name="DOMCSSFontFaceRule")]
[DisableDefaultCtor]
partial interface DomCssFontFaceRule {
@ -78,6 +83,7 @@ namespace WebKit {
DomCssStyleDeclaration Style { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomCssRule), Name="DOMCSSImportRule")]
[DisableDefaultCtor]
partial interface DomImportCssRule {
@ -91,6 +97,7 @@ namespace WebKit {
DomCssStyleSheet StyleSheet { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomCssRule), Name="DOMCSSMediaRule")]
[DisableDefaultCtor]
partial interface DomCssMediaRule {
@ -107,6 +114,7 @@ namespace WebKit {
void DeleteRule (uint index);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomCssRule), Name="DOMCSSPageRule")]
[DisableDefaultCtor]
partial interface DomCssPageRule {
@ -117,6 +125,7 @@ namespace WebKit {
DomCssStyleDeclaration Style { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomCssRule), Name="DOMCSSStyleRule")]
[DisableDefaultCtor]
partial interface DomCssStyleRule {
@ -127,11 +136,13 @@ namespace WebKit {
DomCssStyleDeclaration Style { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomCssRule), Name="DOMCSSUnknownRule")]
[DisableDefaultCtor]
partial interface DomCssUnknownRule {
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMCSSRuleList")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSRuleList init]: should never be used
partial interface DomCssRuleList {
@ -142,6 +153,7 @@ namespace WebKit {
DomCssRule GetItem (int /* unsigned int */ index);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMCSSStyleDeclaration")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSStyleDeclaration init]: should never be used
partial interface DomCssStyleDeclaration {
@ -179,6 +191,7 @@ namespace WebKit {
bool IsPropertyImplicit (string propertyName);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomStyleSheet), Name="DOMCSSStyleSheet")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSStyleSheet init]: should never be used
partial interface DomCssStyleSheet {
@ -204,6 +217,7 @@ namespace WebKit {
void RemoveRule (uint /* unsigned int */ index);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMCSSValue")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSValue init]: should never be used
partial interface DomCssValue {
@ -214,6 +228,7 @@ namespace WebKit {
DomCssValueType Type { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMHTMLCollection")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLCollection init]: should never be used
partial interface DomHtmlCollection {
@ -230,6 +245,7 @@ namespace WebKit {
DomNodeList GetTags (string name);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMImplementation")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMImplementation init]: should never be used
partial interface DomImplementation {
@ -249,6 +265,7 @@ namespace WebKit {
DomHtmlDocument CreateHtmlDocument (string title);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMMediaList")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMMediaList init]: should never be used
partial interface DomMediaList {
@ -268,6 +285,7 @@ namespace WebKit {
void AppendMedium (string newMedium);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMNamedNodeMap")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMNamedNodeMap init]: should never be used
partial interface DomNamedNodeMap {
@ -296,6 +314,7 @@ namespace WebKit {
DomNode RemoveNamedItemNS (string namespaceURI, string localName);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMNode")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMNode init]: should never be used
partial interface DomNode : DomEventTarget {
@ -401,6 +420,7 @@ namespace WebKit {
interface IDomNodeFilter {}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[Protocol, Model (AutoGeneratedName = true)]
[BaseType (typeof (NSObject), Name="DOMNodeFilter")]
interface DomNodeFilter {
@ -409,6 +429,7 @@ namespace WebKit {
short AcceptNode (DomNode n);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMNodeIterator")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomNodeIterator {
@ -440,6 +461,7 @@ namespace WebKit {
void Detach ();
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMNodeList")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMNodeList init]: should never be used
partial interface DomNodeList {
@ -450,6 +472,7 @@ namespace WebKit {
DomNode GetItem (int /* unsigned int */ index);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMRange")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMRange init]: should never be used
partial interface DomRange {
@ -544,6 +567,7 @@ namespace WebKit {
bool IsPointInRange (DomNode refNode, int /* int, not NSInteger */ offset);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMStyleSheet")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMStyleSheet init]: should never be used
partial interface DomStyleSheet {
@ -569,6 +593,7 @@ namespace WebKit {
DomMediaList Media { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMStyleSheetList")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMStyleSheetList init]: should never be used
partial interface DomStyleSheetList {
@ -582,6 +607,7 @@ namespace WebKit {
///////////////////////
// DomNode subclasses
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomNode), Name="DOMAttr")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMAttr init]: should never be used
partial interface DomAttr {
@ -601,6 +627,7 @@ namespace WebKit {
DomCssStyleDeclaration Style { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomNode), Name="DOMCharacterData")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCharacterData init]: should never be used
partial interface DomCharacterData {
@ -626,6 +653,7 @@ namespace WebKit {
void ReplaceData (uint /* unsigned int */ offset, uint /* unsigned int */ length, string data);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomNode), Name="DOMDocument")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMDocument init]: should never be used
partial interface DomDocument {
@ -834,11 +862,13 @@ namespace WebKit {
DomNodeList QuerySelectorAll (string selectors);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomNode), Name="DOMDocumentFragment")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMDocumentFragment init]: should never be used
partial interface DomDocumentFragment {
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomNode), Name="DOMDocumentType")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMDocumentType init]: should never be used
partial interface DomDocumentType {
@ -862,6 +892,7 @@ namespace WebKit {
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomNode), Name="DOMElement")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMElement init]: should never be used
partial interface DomElement {
@ -1010,11 +1041,13 @@ namespace WebKit {
void WebKitRequestFullScreen (ushort flags);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomNode), Name="DOMEntityReference")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMEntityReference init]: should never be used
partial interface DomEntityReference {
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject), Name = "DOMEventTarget")]
[Protocol]
[Model]
@ -1043,6 +1076,7 @@ namespace WebKit {
bool DispatchEvent (DomEvent evt);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMEvent")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMEvent init]: should never be used
partial interface DomEvent {
@ -1099,6 +1133,7 @@ namespace WebKit {
// Note: DOMMutationEvent is not bound since it is deprecated
// by the W3C to be replaced with Mutation Observers
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomEvent), Name = "DOMOverflowEvent")]
[DisableDefaultCtor]
partial interface DomOverflowEvent {
@ -1121,6 +1156,7 @@ namespace WebKit {
bool HasVerticalOverflow { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomEvent), Name = "DOMProgressEvent")]
[DisableDefaultCtor]
partial interface DomProgressEvent {
@ -1134,6 +1170,7 @@ namespace WebKit {
ulong Total { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomEvent), Name = "DOMUIEvent")]
[DisableDefaultCtor]
partial interface DomUIEvent {
@ -1171,6 +1208,7 @@ namespace WebKit {
int Which { get; } /* int, not NSInteger */
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomUIEvent), Name = "DOMKeyboardEvent")]
[DisableDefaultCtor]
partial interface DomKeyboardEvent {
@ -1223,6 +1261,7 @@ namespace WebKit {
int CharCode { get; } /* int, not NSInteger */
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomUIEvent), Name = "DOMMouseEvent")]
[DisableDefaultCtor]
partial interface DomMouseEvent {
@ -1285,6 +1324,7 @@ namespace WebKit {
DomNode ToElement { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomMouseEvent), Name = "DOMWheelEvent")]
[DisableDefaultCtor]
partial interface DomWheelEvent {
@ -1310,6 +1350,7 @@ namespace WebKit {
bool IsHorizontal { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject), Name="DOMEventListener")]
[Model]
[Protocol]
@ -1320,6 +1361,7 @@ namespace WebKit {
}
interface IDomEventListener {}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomCharacterData), Name="DOMProcessingInstruction")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMProcessingInstruction init]: should never be used
partial interface DomProcessingInstruction {
@ -1336,6 +1378,7 @@ namespace WebKit {
////////////////////////////////
// DomCharacterData subclasses
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomCharacterData), Name="DOMText")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMText init]: should never be used
partial interface DomText {
@ -1349,6 +1392,7 @@ namespace WebKit {
DomText ReplaceWholeText (string content);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomCharacterData), Name="DOMComment")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMComment init]: should never be used
partial interface DomComment {
@ -1357,6 +1401,7 @@ namespace WebKit {
///////////////////////////
// DomText subclasses
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomText), Name="DOMCDATASection")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCDATASection init]: should never be used
partial interface DomCDataSection {
@ -1365,6 +1410,7 @@ namespace WebKit {
///////////////////////////
// DomDocument subclasses
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomDocument), Name="DOMHTMLDocument")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLDocument init]: should never be used
partial interface DomHtmlDocument {
@ -1438,6 +1484,7 @@ namespace WebKit {
//////////////////////////
// DomElement subclasses
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLInputElement")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLElement init]: should never be used
partial interface DomHtmlInputElement {
@ -1529,6 +1576,7 @@ namespace WebKit {
void Click ();
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLTextAreaElement")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLElement init]: should never be used
partial interface DomHtmlTextAreaElement {
@ -1576,6 +1624,7 @@ namespace WebKit {
void Select ();
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomElement), Name="DOMHTMLElement")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLElement init]: should never be used
partial interface DomHtmlElement {
@ -1621,6 +1670,7 @@ namespace WebKit {
//////////////////////////////////////////////////////////////////
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
partial interface WebArchive : NSCoding, NSCopying {
[Export ("initWithMainResource:subresources:subframeArchives:")]
@ -1642,6 +1692,7 @@ namespace WebKit {
NSData Data { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
partial interface WebBackForwardList {
[Export ("addItem:")]
@ -1688,6 +1739,7 @@ namespace WebKit {
int Capacity { get; set; } /* int, not NSInteger */
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
partial interface WebDataSource {
[Export ("initWithRequest:")]
@ -1740,6 +1792,7 @@ namespace WebKit {
void AddSubresource (WebResource subresource);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
@ -1807,10 +1860,12 @@ namespace WebKit {
// }
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSUrlDownload))]
partial interface WebDownload {
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
[Model]
[Protocol (FormalSince = "10.11")]
@ -1819,6 +1874,7 @@ namespace WebKit {
NSWindow OnDownloadWindowForSheet (WebDownload download);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // invalid handle returned
partial interface WebFrame {
@ -1892,6 +1948,7 @@ namespace WebKit {
#endif
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[Model]
[Protocol (FormalSince = "10.11")]
[BaseType (typeof (NSObject))]
@ -1944,6 +2001,7 @@ namespace WebKit {
#endif
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSView))]
partial interface WebFrameView {
[Export ("initWithFrame:")]
@ -1973,6 +2031,7 @@ namespace WebKit {
bool AllowsScrolling { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
interface WebHistory {
[Export ("orderedLastVisitedDays")]
@ -2012,6 +2071,7 @@ namespace WebKit {
WebHistoryItem GetHistoryItemForUrl (NSUrl url);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
partial interface WebHistoryItem : NSCopying {
[Export ("initWithURLString:title:lastVisitedTimeInterval:")]
@ -2041,6 +2101,7 @@ namespace WebKit {
NSString ChangedNotification { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
[Model (AutoGeneratedName = true)]
[Protocol]
@ -2057,6 +2118,7 @@ namespace WebKit {
interface IWebOpenPanelResultListener {}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
[Model]
[Protocol (FormalSince = "10.11")]
@ -2074,6 +2136,7 @@ namespace WebKit {
void UnableToImplementPolicy (WebView webView, NSError error, WebFrame frame);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
[Model (AutoGeneratedName = true)]
[Protocol]
@ -2088,6 +2151,7 @@ namespace WebKit {
void Ignore ();
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
partial interface WebPreferences : NSCoding {
[Static]
@ -2201,6 +2265,7 @@ namespace WebKit {
string FrameName { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
[Model]
[Protocol (FormalSince = "10.11")]
@ -2233,6 +2298,7 @@ namespace WebKit {
void OnPlugInFailed (WebView sender, NSError error, WebDataSource dataSource);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
[Model]
[Protocol (FormalSince = "10.11")]
@ -2373,6 +2439,7 @@ namespace WebKit {
CGRect UIGetContentRect (WebView sender);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // crash on dispose, documented as "You can not create a WebScriptObject object directly."
partial interface WebScriptObject {
@ -2415,6 +2482,7 @@ namespace WebKit {
#endif
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (NSView),
Events=new Type [] {
typeof (WebFrameLoadDelegate),
@ -2801,6 +2869,7 @@ namespace WebKit {
NSString WebActionOriginalUrlKey { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMBlob")]
[DisableDefaultCtor]
partial interface DomBlob {
@ -2808,6 +2877,7 @@ namespace WebKit {
ulong Size { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomBlob), Name="DOMFile")]
[DisableDefaultCtor]
partial interface DomFile {
@ -2815,6 +2885,7 @@ namespace WebKit {
string Name { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMFileList")]
[DisableDefaultCtor]
partial interface DomFileList {
@ -2825,6 +2896,7 @@ namespace WebKit {
DomFile GetItem (int /* unsigned int */ index);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLFormElement")]
[DisableDefaultCtor]
partial interface DomHtmlFormElement {
@ -2875,6 +2947,7 @@ namespace WebKit {
DomFileList Files { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLAnchorElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlAnchorElement {
@ -2941,6 +3014,7 @@ namespace WebKit {
NSUrl AbsoluteImageUrl { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLAppletElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlAppletElement {
@ -2979,6 +3053,7 @@ namespace WebKit {
string Width { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLAreaElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlAreaElement {
@ -3030,6 +3105,7 @@ namespace WebKit {
NSUrl AbsoluteImageUrl { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLBRElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlBRElement {
@ -3038,6 +3114,7 @@ namespace WebKit {
string Clear { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLBaseElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlBaseElement {
@ -3049,6 +3126,7 @@ namespace WebKit {
string Target { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLBaseFontElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlBaseFontElement {
@ -3063,6 +3141,7 @@ namespace WebKit {
string Size { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLBodyElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlBodyElement {
@ -3086,6 +3165,7 @@ namespace WebKit {
string VLink { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLButtonElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlButtonElement {
@ -3119,6 +3199,7 @@ namespace WebKit {
void Click ();
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLDListElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlDListElement {
@ -3127,6 +3208,7 @@ namespace WebKit {
bool Compact { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLDirectoryElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlDirectoryElement {
@ -3135,6 +3217,7 @@ namespace WebKit {
bool Compact { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLDivElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlDivElement {
@ -3143,6 +3226,7 @@ namespace WebKit {
string Align { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLEmbedElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlEmbedElement {
@ -3166,6 +3250,7 @@ namespace WebKit {
int Width { get; set; } /* int, not NSInteger */
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLFieldSetElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlFieldSetElement {
@ -3174,6 +3259,7 @@ namespace WebKit {
DomHtmlFormElement Form { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLFontElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlFontElement {
@ -3188,6 +3274,7 @@ namespace WebKit {
string Size { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLFrameElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlFrameElement {
@ -3232,6 +3319,7 @@ namespace WebKit {
int Height { get; } /* int, not NSInteger */
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLFrameSetElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlFrameSetElement {
@ -3243,6 +3331,7 @@ namespace WebKit {
string Rows { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLHRElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlHRElement {
@ -3260,6 +3349,7 @@ namespace WebKit {
string Width { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLHeadElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlHeadElement {
@ -3268,6 +3358,7 @@ namespace WebKit {
string Profile { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLHeadingElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlHeadingElement {
@ -3276,6 +3367,7 @@ namespace WebKit {
string Align { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLHtmlElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlHtmlElement {
@ -3284,6 +3376,7 @@ namespace WebKit {
string Version { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLIFrameElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlIFrameElement {
@ -3325,6 +3418,7 @@ namespace WebKit {
DomAbstractView ContentWindow { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLImageElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlImageElement {
@ -3390,6 +3484,7 @@ namespace WebKit {
NSUrl AbsoluteImageUrl { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLLIElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlLIElement {
@ -3401,6 +3496,7 @@ namespace WebKit {
int Value { get; set; } /* int, not NSInteger */
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLLabelElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlLabelElement {
@ -3416,6 +3512,7 @@ namespace WebKit {
string AccessKey { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLLegendElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlLegendElement {
@ -3431,6 +3528,7 @@ namespace WebKit {
string AccessKey { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLLinkElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlLinkElement {
@ -3469,6 +3567,7 @@ namespace WebKit {
NSUrl AbsoluteImageUrl { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLMapElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlMapElement {
@ -3480,6 +3579,7 @@ namespace WebKit {
string Name { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLMarqueeElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlMarqueeElement {
@ -3491,6 +3591,7 @@ namespace WebKit {
void Stop ();
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLMenuElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlMenuElement {
@ -3499,6 +3600,7 @@ namespace WebKit {
bool Compact { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLMetaElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlMetaElement {
@ -3516,6 +3618,7 @@ namespace WebKit {
string Scheme { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLModElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlModElement {
@ -3527,6 +3630,7 @@ namespace WebKit {
string DateTime { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLOListElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlOListElement {
@ -3541,6 +3645,7 @@ namespace WebKit {
string Type { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLObjectElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlObjectElement {
@ -3603,6 +3708,7 @@ namespace WebKit {
NSUrl AbsoluteImageUrl { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLOptGroupElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlOptGroupElement {
@ -3614,6 +3720,7 @@ namespace WebKit {
string Label { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLOptionElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlOptionElement {
@ -3643,6 +3750,7 @@ namespace WebKit {
int Index { get; } /* int, not NSInteger */
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomObject), Name="DOMHTMLOptionsCollection")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlOptionsCollection {
@ -3666,6 +3774,7 @@ namespace WebKit {
DomNode GetItem (uint /* unsigned int */ index);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLParagraphElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlParagraphElement {
@ -3674,6 +3783,7 @@ namespace WebKit {
string Align { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLParamElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlParamElement {
@ -3691,6 +3801,7 @@ namespace WebKit {
string ValueType { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLPreElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlPreElement {
@ -3702,6 +3813,7 @@ namespace WebKit {
bool Wrap { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLQuoteElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlQuoteElement {
@ -3710,6 +3822,7 @@ namespace WebKit {
string Cite { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLScriptElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlScriptElement {
@ -3736,6 +3849,7 @@ namespace WebKit {
string Type { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLSelectElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlSelectElement {
@ -3789,6 +3903,7 @@ namespace WebKit {
void Remove (int /* int, not NSInteger */ index);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLStyleElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlStyleElement {
@ -3806,6 +3921,7 @@ namespace WebKit {
DomStyleSheet Sheet { get; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLTableCaptionElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlTableCaptionElement {
@ -3814,6 +3930,7 @@ namespace WebKit {
string Align { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLTableCellElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlTableCellElement {
@ -3864,6 +3981,7 @@ namespace WebKit {
string Width { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLTableColElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlTableColElement {
@ -3887,6 +4005,7 @@ namespace WebKit {
string Width { get; set; }
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLTableElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlTableElement {
@ -3958,6 +4077,7 @@ namespace WebKit {
void DeleteRow (int /* int, not NSInteger */ index);
}
[Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")]
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLTableRowElement")]
[DisableDefaultCtor] // ObjCException: +[<TYPE> init]: should never be used
interface DomHtmlTableRowElement {

Просмотреть файл

@ -57,24 +57,6 @@ namespace BCL.Tests
return new Version (major, minor, build);
}
// This method returns true if:
// system version >= specified version
// AND
// sdk version >= specified version
public static bool CheckSystemAndSDKVersion (int major, int minor)
{
#if __WATCHOS__
throw new Exception ("Can't get iOS System/SDK version on watchOS");
#else
if (!UIDevice.CurrentDevice.CheckSystemVersion (major, minor))
return false;
// Check if the SDK version we're built includes the version we're checking for
// We don't want to execute iOS7 tests on an iOS7 device when built with the iOS6 SDK.
return CheckSDKVersion (major, minor);
#endif
}
public static bool CheckSystemVersion (int major, int minor)
{
#if __WATCHOS__

Просмотреть файл

@ -472,5 +472,11 @@ namespace Xamarin.Tests
return Version.Parse (XcodeVersion).Major < 10;
}
}
public static string NuGetPackagesDirectory {
get {
return Path.Combine (RootPath, "packages");
}
}
}
}

Просмотреть файл

@ -11,6 +11,7 @@ using Contacts;
#endif
#if MONOMAC
using AppKit;
using EventKit;
#else
#if !__TVOS__ && !__WATCHOS__
using AddressBook;
@ -89,9 +90,9 @@ partial class TestRuntime
return new Version (major, minor, build);
}
public static void AssertXcodeVersion (int major, int minor)
public static void AssertXcodeVersion (int major, int minor, int build = 0)
{
if (CheckXcodeVersion (major, minor))
if (CheckXcodeVersion (major, minor, build))
return;
NUnit.Framework.Assert.Ignore ("Requires the platform version shipped with Xcode {0}.{1}", major, minor);
@ -378,6 +379,8 @@ partial class TestRuntime
case 4:
#if __IOS__
switch (minor) {
case 1:
return true; // iOS 4.3.2
case 5:
return CheckiOSSystemVersion (6, 0);
case 6:
@ -389,6 +392,8 @@ partial class TestRuntime
return true;
#elif MONOMAC
switch (minor) {
case 1:
return CheckMacSystemVersion (10, 7, 0);
case 5:
case 6:
return CheckMacSystemVersion (10, 8, 0);
@ -403,11 +408,47 @@ partial class TestRuntime
}
}
public static bool CheckSystemVersion (PlatformName platform, int major, int minor, int build = 0, bool throwIfOtherPlatform = true)
{
switch (platform) {
case PlatformName.iOS:
return CheckiOSSystemVersion (major, minor, throwIfOtherPlatform);
case PlatformName.MacOSX:
return CheckMacSystemVersion (major, minor, build, throwIfOtherPlatform);
case PlatformName.TvOS:
return ChecktvOSSystemVersion (major, minor, throwIfOtherPlatform);
case PlatformName.WatchOS:
return CheckWatchOSSystemVersion (major, minor, throwIfOtherPlatform);
default:
throw new Exception ($"Unknown platform: {platform}");
}
}
public static void AssertSystemVersion (PlatformName platform, int major, int minor, int build = 0, bool throwIfOtherPlatform = true)
{
switch (platform) {
case PlatformName.iOS:
AssertiOSSystemVersion (major, minor, throwIfOtherPlatform);
break;
case PlatformName.MacOSX:
AssertMacSystemVersion (major, minor, build, throwIfOtherPlatform);
break;
case PlatformName.TvOS:
AsserttvOSSystemVersion (major, minor, throwIfOtherPlatform);
break;
case PlatformName.WatchOS:
AssertWatchOSSystemVersion (major, minor, throwIfOtherPlatform);
break;
default:
throw new Exception ($"Unknown platform: {platform}");
}
}
// This method returns true if:
// system version >= specified version
// AND
// sdk version >= specified version
public static bool CheckiOSSystemVersion (int major, int minor, bool throwIfOtherPlatform = true)
static bool CheckiOSSystemVersion (int major, int minor, bool throwIfOtherPlatform = true)
{
#if __IOS__
return UIDevice.CurrentDevice.CheckSystemVersion (major, minor);
@ -418,7 +459,13 @@ partial class TestRuntime
#endif
}
public static bool CheckExactiOSSystemVersion (int major, int minor)
static void AssertiOSSystemVersion (int major, int minor, bool throwIfOtherPlatform = true)
{
if (!CheckiOSSystemVersion (major, minor, throwIfOtherPlatform))
NUnit.Framework.Assert.Ignore ($"This test requires iOS {major}.{minor}");
}
static bool CheckExactiOSSystemVersion (int major, int minor)
{
#if __IOS__
var version = Version.Parse (UIDevice.CurrentDevice.SystemVersion);
@ -432,7 +479,7 @@ partial class TestRuntime
// system version >= specified version
// AND
// sdk version >= specified version
public static bool ChecktvOSSystemVersion (int major, int minor, bool throwIfOtherPlatform = true)
static bool ChecktvOSSystemVersion (int major, int minor, bool throwIfOtherPlatform = true)
{
#if __TVOS__
return UIDevice.CurrentDevice.CheckSystemVersion (major, minor);
@ -443,11 +490,17 @@ partial class TestRuntime
#endif
}
static void AsserttvOSSystemVersion (int major, int minor, bool throwIfOtherPlatform = true)
{
if (!ChecktvOSSystemVersion (major, minor, throwIfOtherPlatform))
NUnit.Framework.Assert.Ignore ($"This test requires tvOS {major}.{minor}");
}
// This method returns true if:
// system version >= specified version
// AND
// sdk version >= specified version
public static bool CheckWatchOSSystemVersion (int major, int minor, bool throwIfOtherPlatform = true)
static bool CheckWatchOSSystemVersion (int major, int minor, bool throwIfOtherPlatform = true)
{
#if __WATCHOS__
return WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (major, minor);
@ -459,7 +512,15 @@ partial class TestRuntime
#endif
}
public static bool CheckMacSystemVersion (int major, int minor, int build = 0, bool throwIfOtherPlatform = true)
static void AssertWatchOSSystemVersion (int major, int minor, bool throwIfOtherPlatform = true)
{
if (CheckWatchOSSystemVersion (major, minor, throwIfOtherPlatform))
return;
NUnit.Framework.Assert.Ignore ($"This test requires watchOS {major}.{minor}");
}
static bool CheckMacSystemVersion (int major, int minor, int build = 0, bool throwIfOtherPlatform = true)
{
#if MONOMAC
return OSXVersion >= new Version (major, minor, build);
@ -470,25 +531,10 @@ partial class TestRuntime
#endif
}
// This method returns true if:
// system version >= specified version
// AND
// sdk version >= specified version
public static bool CheckSystemAndSDKVersion (int major, int minor)
static void AssertMacSystemVersion (int major, int minor, int build = 0, bool throwIfOtherPlatform = true)
{
#if __WATCHOS__
throw new Exception ("Can't get iOS System/SDK version on WatchOS.");
#elif MONOMAC
if (OSXVersion < new Version (major, minor))
return false;
#else
if (!UIDevice.CurrentDevice.CheckSystemVersion (major, minor))
return false;
#endif
// Check if the SDK version we're built includes the version we're checking for
// We don't want to execute iOS7 tests on an iOS7 device when built with the iOS6 SDK.
return CheckSDKVersion (major, minor);
if (!CheckMacSystemVersion (major, minor, build, throwIfOtherPlatform))
NUnit.Framework.Assert.Ignore ($"This test requires macOS {major}.{minor}.{build}");
}
public static bool CheckSDKVersion (int major, int minor)
@ -654,4 +700,49 @@ partial class TestRuntime
}
}
#endif // !MONOMAC && !__TVOS__
#if __MACOS__
public static void RequestEventStorePermission (EKEntityType entityType, bool assert_granted = false)
{
TestRuntime.AssertMacSystemVersion (10, 9, throwIfOtherPlatform: false);
var status = EKEventStore.GetAuthorizationStatus (entityType);
Console.WriteLine ("EKEventStore.GetAuthorizationStatus ({1}): {0}", status, entityType);
switch (status) {
case EKAuthorizationStatus.Authorized:
case EKAuthorizationStatus.Restricted:
return;
case EKAuthorizationStatus.NotDetermined:
// There's an instance method on EKEventStore to request permission,
// but creating the instance can end up blocking the app showing a permission dialog...
// (on Mavericks at least)
if (TestRuntime.CheckMacSystemVersion (10, 10))
return; // Crossing fingers that this won't hang.
NUnit.Framework.Assert.Ignore ("This test requires permission to access events, but there's no API to request access without potentially showing dialogs.");
break;
case EKAuthorizationStatus.Denied:
if (assert_granted)
NUnit.Framework.Assert.Ignore ("This test requires permission to access events.");
break;
}
}
#endif
#if __MACOS__
public static global::CoreGraphics.CGColor GetCGColor (NSColor color)
#else
public static global::CoreGraphics.CGColor GetCGColor (UIColor color)
#endif
{
#if __MACOS__
var components = new nfloat [color.ComponentCount];
color.GetComponents (out components);
NSApplication.CheckForIllegalCrossThreadCalls = false;
var cs = color.ColorSpace.ColorSpace;
NSApplication.CheckForIllegalCrossThreadCalls = true;
return new global::CoreGraphics.CGColor (cs, components);
#else
return color.CGColor;
#endif
}
}

Просмотреть файл

@ -219,6 +219,9 @@ namespace Introspection {
if (!TestRuntime.CheckXcodeVersion (9, 0))
prefix = Path.Combine (Path.GetDirectoryName (prefix), "PrivateFrameworks");
break;
case "PdfKit":
libname = "PDFKit";
break;
#endif
case "CoreAnimation":
// generated code uses QuartzCore correctly - even if the [Field] property is wrong

Просмотреть файл

@ -66,9 +66,9 @@ namespace Introspection {
// NSUnknownKeyException [<CIDepthOfField 0x158586970> valueForUndefinedKey:]: this class is not key value coding-compliant for the key inputPoint2.
case "CIDepthOfField":
return true;
// FIXME: Remove if fixed. Doesn't appear to exist in El Capitan. Reported in radar #22099780
// case "CIMaskedVariableBlur":
// cd .. return true;
// Apple does **not** document filters as API (like we do)
// uncomment calls to `GenerateBinding` to use introspection code to generate the skeleton binding code and complete it
// e.g. picking better types like `bool` instead of `NSNumber'
default:
return false;
}

Просмотреть файл

@ -195,7 +195,6 @@ namespace Introspection {
case "ARLightEstimate":
case "NSManagedObjectID":
// beta 2
case "NSShadow":
case "NSTextAttachment":
case "VSAccountMetadata":
case "VSAccountMetadataRequest":

Просмотреть файл

@ -166,6 +166,13 @@ namespace Introspection {
if (IntPtr.Size == 4 && Mac.CheckSystemVersion (10, 13)) // 32-bit removed unannounced in 10.13
return true;
break;
case "EventKit.EKEventStore":
case "MonoMac.EventKit.EKEventStore":
if (Mac.CheckSystemVersion (10, 9) && !Mac.CheckSystemVersion (10, 10)) {
// Calling the constructor on Mavericks will put up a permission dialog.
return true;
}
break;
}
switch (type.Namespace) {

Просмотреть файл

@ -76,17 +76,6 @@ namespace Introspection {
break;
}
break;
// Xcode 10
case "QCComposition":
switch (p.Name) {
case "InputRSSArticleDurationKey":
case "InputRSSFeedURLKey":
case "ProtocolRSSVisualizer":
if (Mac.CheckSystemVersion (10,14)); // radar 41125938
return true;
break;
}
break;
}
switch (p.Name) {
@ -167,9 +156,9 @@ namespace Introspection {
case "_AuthenticationSchemeOAuth1":
return true;
case "CBUUIDValidRangeString":
if (Mac.CheckSystemVersion (10, 13)); // radar 32858911
if (Mac.CheckSystemVersion (10, 13)) // radar 32858911
return true;
break;
goto default;
default:
return base.Skip (p);
}
@ -179,9 +168,9 @@ namespace Introspection {
{
switch (constantName) {
case "CBUUIDValidRangeString":
if (Mac.CheckSystemVersion (10, 13)); // radar 32858911
if (Mac.CheckSystemVersion (10, 13)) // radar 32858911
return true;
break;
goto default;
// Only there for API compat
case "kSecUseNoAuthenticationUI":
case "kSecUseOperationPrompt":
@ -197,13 +186,6 @@ namespace Introspection {
if (Mac.Is32BitMavericks)
return true;
goto default;
// Xcode 10
case "QCCompositionInputRSSFeedURLKey":
case "QCCompositionInputRSSArticleDurationKey":
case "QCCompositionProtocolRSSVisualizer":
if (Mac.CheckSystemVersion (10,14)); // radar 41125938
return true;
break;
default:
return base.Skip (constantName, libraryName);
}
@ -217,7 +199,12 @@ namespace Introspection {
case "NSAccessibilityNotifications":
return true;
case "AVFragmentedMovieTrack":
return notificationName == "AVFragmentedMovieTrackTimeRangeDidChangeNotification";
switch (notificationName) {
case "AVFragmentedMovieTrackTotalSampleDataLengthDidChangeNotification":
case "AVFragmentedMovieTrackTimeRangeDidChangeNotification":
return true;
}
break;
case "NSTask":
return notificationName == "NSTaskDidTerminateNotification";
#endif

Просмотреть файл

@ -237,6 +237,14 @@ namespace Introspection {
break;
}
break;
case "CAAction":
switch (type.Name) {
case "NSNull":
if (!Mac.CheckSystemVersion (10, 11)) // NSNull started implementing the CAAction protocol in 10.11
return true;
break;
}
break;
}
switch (type.Name) {

Просмотреть файл

@ -191,6 +191,10 @@ namespace Introspection {
if (!Mac.CheckSystemVersion (10, 9))
return true;
break;
case "MPSImageDescriptor":
if (!Mac.CheckSystemVersion (10, 14)) // Likely to be fixed when we do MPS binding
return true;
break;
}
break;
case "readingOptionsForType:pasteboard:":
@ -205,6 +209,12 @@ namespace Introspection {
return true;
}
break;
case "newWindowForTab:": // "This method can be implemented in the responder chain", optional but not protocol directly on NSResponder
switch (type.Name) {
case "NSViewController":
return true;
}
break;
}
switch (type.Namespace) {
@ -350,6 +360,15 @@ namespace Introspection {
if (Mac.IsAtLeast (10, 11))
return true;
break;
case "NSNull":
switch (selectorName) {
case "runActionForKey:object:arguments:":
// This comes from implementing the CAAction protocol, which started in 10.11.
if (!Mac.CheckSystemVersion (10, 11))
return true;
break;
}
break;
}
break;
case "MonoMac.AppKit":
@ -514,6 +533,8 @@ namespace Introspection {
case "delegate":
case "setDelegate:":
case "expectedPlayerCount":
case "chooseBestHostPlayerWithCompletionHandler:":
case "rematchWithCompletionHandler:":
return true;
}
break;
@ -528,6 +549,11 @@ namespace Introspection {
case "cancel":
case "queryPlayerGroupActivity:withCompletionHandler:":
case "queryActivityWithCompletionHandler:":
case "cancelInviteToPlayer:":
case "finishMatchmakingForMatch:":
case "matchForInvite:completionHandler:":
case "startBrowsingForNearbyPlayersWithReachableHandler:":
case "stopBrowsingForNearbyPlayers":
return true;
}
break;

Просмотреть файл

@ -72,7 +72,7 @@ namespace Introspection {
// 1. is the current SDK target (or a newer one)
var sdk = new Version (Constants.SdkVersion);
#if __WATCHOS__
if (!TestRuntime.CheckWatchOSSystemVersion (sdk.Major, sdk.Minor))
if (!TestRuntime.CheckSystemVersion (PlatformName.WatchOS, sdk.Major, sdk.Minor))
return true;
#elif __IOS__ || __TVOS__
if (!UIDevice.CurrentDevice.CheckSystemVersion (sdk.Major, sdk.Minor))

Просмотреть файл

@ -704,6 +704,7 @@ namespace Introspection {
case "UIAlertController":
case "PKPaymentButton":
case "PKAddPassButton":
case "INUIAddVoiceShortcutButton":
return true;
}
break;

Просмотреть файл

@ -33,15 +33,7 @@ namespace Introspection {
protected override bool Skip (Type type)
{
switch (type.Name) {
// iOS 12 beta 1 ?removed? some filters
// https://github.com/xamarin/xamarin-macios/issues/4189
case "CIAztecCodeGenerator":
case "CIBarcodeGenerator":
case "CICode128BarcodeGenerator":
case "CIPdf417BarcodeGenerator":
case "CIQRCodeGenerator":
if (TestRuntime.CheckXcodeVersion (10,0))
return true;
default:
break;
}
return base.Skip (type);

Просмотреть файл

@ -104,6 +104,8 @@
<Link>StringUtils.cs</Link>
</Compile>
<Compile Include="src\WarningTests.cs" />
<Compile Include="src\Unified45.cs" />
<Compile Include="src\System.ServiceModel\Net45.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />

Просмотреть файл

@ -4,6 +4,7 @@ using NUnit.Framework;
using Xamarin.MMP.Tests;
using Xamarin.Bundler;
using System.Text;
using Xamarin.Tests;
namespace MonoTouchFixtures.Net45 {
[TestFixture]
@ -17,7 +18,7 @@ namespace MonoTouchFixtures.Net45 {
File.Delete (testResults);
StringBuilder restoreOutput = new StringBuilder ();
int code = Driver.RunCommand ("mono", String.Format ("/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore {0}/packages.config", testFolder), output: restoreOutput);
int code = Driver.RunCommand ("mono", String.Format ("/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore {0}/packages.config -PackagesDirectory {1}", testFolder, Configuration.NuGetPackagesDirectory), output: restoreOutput);
if (code != 0)
Assert.Fail ("ProtobufShouldSerializeAndDeserialize failed to restore nuget packages");
@ -43,7 +44,7 @@ namespace MonoTouchFixtures.Net45 {
StringBuilder restoreOutput = new StringBuilder ();
int code = Driver.RunCommand ("mono", String.Format ("/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore {0}/packages.config", testFolder), output: restoreOutput);
int code = Driver.RunCommand ("mono", String.Format ("/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore {0}/packages.config -PackagesDirectory {1}", testFolder, Configuration.NuGetPackagesDirectory), output: restoreOutput);
if (code != 0)
Assert.Fail ("Net45ShouldUseImmutableCollection failed to restore nuget packages");
@ -63,7 +64,7 @@ namespace MonoTouchFixtures.Net45 {
StringBuilder restoreOutput = new StringBuilder ();
int code = Driver.RunCommand ("mono", String.Format ("/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore {0}/../MyLibrary/packages.config", testFolder), output: restoreOutput);
int code = Driver.RunCommand ("mono", String.Format ("/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore {0}/../MyLibrary/packages.config -PackagesDirectory {1}", testFolder, Configuration.NuGetPackagesDirectory), output: restoreOutput);
if (code != 0)
Assert.Fail ("Net45ShouldUseImmutableCollection failed to restore nuget packages");

Просмотреть файл

@ -34,10 +34,10 @@ namespace MonoTouchFixtures.ARKit {
{
var model3 = new ARReferenceObject (NSUrl.FromFilename ("Model3.arobject"), out NSError error);
Assert.AreEqual ("Model3", model3.Name, "Name");
Assert.AreEqual (new VectorFloat3 (0, 0, 0), model3.Center, "Center");
Assert.AreEqual (new VectorFloat3 (0, 0, 0), model3.Extent, "Extent");
Assert.NotNull (model3.Center, "Center");
Assert.NotNull (model3.Extent, "Extent");
Assert.NotNull (model3.Scale, "Scale");
Assert.NotNull (model3.GetReferenceObject (MatrixFloat4x4.Identity), "GetReferenceObject");
Assert.NotNull (model3.ApplyTransform (MatrixFloat4x4.Identity), "ApplyTransform");
}
}
}

Просмотреть файл

@ -30,8 +30,7 @@ namespace monotouchtest {
[Test]
public void AVAssetDownloadUrlSessionStaticNotSupported ()
{
if (!TestRuntime.CheckSystemAndSDKVersion (9, 0))
Assert.Ignore ("Ignoring AVAssetDownloadUrlSession tests: Requires iOS9+");
TestRuntime.AssertXcodeVersion (7, 0);
Assert.Throws <NotSupportedException> (() => { var x = AVAssetDownloadUrlSession.SharedSession; }, "SharedSession should throw NotSupportedException");
Assert.Throws <NotSupportedException> (() => AVAssetDownloadUrlSession.FromConfiguration (NSUrlSessionConfiguration.DefaultSessionConfiguration), "FromConfiguration should throw NotSupportedException");

Просмотреть файл

@ -17,6 +17,7 @@ using System.Threading;
using Foundation;
using AVFoundation;
using CoreMedia;
using ObjCRuntime;
#else
using MonoTouch.AVFoundation;
using MonoTouch.CoreMedia;
@ -112,6 +113,10 @@ namespace MonoTouchFixtures.AVFoundation {
[Test]
public void GenerateCGImagesAsynchronously ()
{
// This test deadlocks on Mountain Lion (but works on Lion)
// https://gist.github.com/rolfbjarne/1190d97af79e554c298f2c133dfd8e87
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 9, throwIfOtherPlatform: false);
handled = false;
mre = new ManualResetEvent (false);
ThreadStart main = () => {

Просмотреть файл

@ -45,9 +45,6 @@ namespace MonoTouchFixtures.AVFoundation {
[Test]
public void Defaults ()
{
if (!TestRuntime.CheckSystemAndSDKVersion (6,0))
Assert.Ignore ("requires iOS6+");
using (var obj = new AVCaptureMetadataOutput ()) {
#if XAMCORE_2_0
Assert.AreEqual (AVMetadataObjectType.None, obj.AvailableMetadataObjectTypes, "AvailableMetadataObjectTypes");
@ -63,7 +60,7 @@ namespace MonoTouchFixtures.AVFoundation {
Assert.IsNotNull (obj.MetadataObjectTypes, "MetadataObjectTypes");
Assert.AreEqual (0, obj.MetadataObjectTypes.Length, "MetadataObjectTypes#");
#endif
if (TestRuntime.CheckSystemAndSDKVersion (7,0))
if (TestRuntime.CheckSystemVersion (PlatformName.iOS, 7, 0, throwIfOtherPlatform: false))
Assert.AreEqual (new RectangleF (0, 0, 1, 1), obj.RectOfInterest, "RectOfInterest");
#if XAMCORE_2_0
@ -84,8 +81,7 @@ namespace MonoTouchFixtures.AVFoundation {
[Test]
public void MetadataObjectTypesTest ()
{
if (!TestRuntime.CheckSystemAndSDKVersion (8, 0))
Assert.Ignore ("Test only works correctly in iOS 8+");
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
if (Runtime.Arch != Arch.DEVICE)
Assert.Ignore ("This test only runs on device (requires camera access)");

Просмотреть файл

@ -17,6 +17,7 @@ using System.Threading;
using Foundation;
using AVFoundation;
using CoreMedia;
using ObjCRuntime;
#else
using MonoTouch.AVFoundation;
using MonoTouch.CoreMedia;
@ -43,8 +44,8 @@ namespace MonoTouchFixtures.AVFoundation {
[Test]
public void Defaults ()
{
if (!TestRuntime.CheckSystemAndSDKVersion (8, 0))
Assert.Ignore ("Test only works correctly in iOS 8+");
TestRuntime.AssertXcodeVersion (6, 0);
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
using (var obj = new AVMetadataFaceObject ()) {
Assert.AreEqual (0, obj.FaceID, "FaceID");

Просмотреть файл

@ -34,10 +34,11 @@ namespace MonoTouchFixtures.AVFoundation {
[Test]
public void FromAssert_Null ()
{
TestRuntime.AssertXcodeVersion (5, 1);
// Apple's AVCustomEdit samples calls this with `nil`
Assert.Null (AVPlayerItem.FromAsset (null), "1");
if (TestRuntime.CheckSystemAndSDKVersion (7,0))
if (TestRuntime.CheckXcodeVersion (5, 0, 1))
Assert.Null (AVPlayerItem.FromAsset (null, null), "2");
}
}

Просмотреть файл

@ -14,6 +14,7 @@ using System;
using AVFoundation;
using CoreVideo;
using Foundation;
using ObjCRuntime;
#else
using MonoTouch.AVFoundation;
using MonoTouch.CoreVideo;
@ -30,6 +31,8 @@ namespace MonoTouchFixtures.AVFoundation {
[Test]
public void Ctor_CVPixelBufferAttributes ()
{
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 8, throwIfOtherPlatform: false);
var attributes = new CVPixelBufferAttributes () {
PixelFormatType = CVPixelFormatType.CV32BGRA
};

Просмотреть файл

@ -38,11 +38,10 @@ namespace MonoTouchFixtures.AVFoundation {
public void SetUp ()
{
#if __WATCHOS__
if (!TestRuntime.CheckWatchOSSystemVersion (3, 0))
if (!TestRuntime.CheckSystemVersion (PlatformName.WatchOS, 3, 0))
Assert.Inconclusive ("Requires watchOS 3.0+");
#else
if (!TestRuntime.CheckSystemAndSDKVersion (7, 0))
Assert.Inconclusive ("Requires iOS 7.0+");
TestRuntime.AssertSystemVersion (PlatformName.iOS, 7, 0, throwIfOtherPlatform: false);
#endif
}

Просмотреть файл

@ -47,8 +47,7 @@ namespace MonoTouchFixtures.AVFoundation {
[Test]
public void Seven ()
{
if (!TestRuntime.CheckSystemAndSDKVersion (7, 0))
Assert.Inconclusive ("Requires iOS7");
TestRuntime.AssertXcodeVersion (5, 0, 1);
using (var i = new AVVideoCompositionInstruction ()) {
Assert.False (i.ContainsTweening, "ContainsTweening");

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше