This commit is contained in:
miguel 2018-06-29 22:56:31 -04:00
Родитель a3f2c4889d 763305e775
Коммит 3785e20404
338 изменённых файлов: 8027 добавлений и 11960 удалений

52
.gitmodules поставляемый
Просмотреть файл

@ -1,35 +1,35 @@
[submodule "external/fsharp"]
path = external/fsharp
url = ../../fsharp/fsharp.git
branch = master
path = external/fsharp
url = ../../fsharp/fsharp.git
branch = master
[submodule "external/guiunit"]
path = external/guiunit
url = ../../mono/guiunit.git
path = external/guiunit
url = ../../mono/guiunit.git
[submodule "external/llvm"]
path = external/llvm
url = ../../mono/llvm.git
branch = d15-7
path = external/llvm
url = ../../mono/llvm.git
branch = d15-7
[submodule "external/macios-binaries"]
path = external/macios-binaries
url = ../../xamarin/macios-binaries
branch = d15-7
path = external/macios-binaries
url = ../../xamarin/macios-binaries
branch = d15-7
[submodule "external/mono"]
path = external/mono
url = ../../mono/mono.git
branch = 2017-12
path = external/mono
url = ../../mono/mono.git
branch = 2017-12
[submodule "external/MonoTouch.Dialog"]
path = external/MonoTouch.Dialog
url = ../../migueldeicaza/MonoTouch.Dialog.git
branch = master
path = external/MonoTouch.Dialog
url = ../../migueldeicaza/MonoTouch.Dialog.git
branch = master
[submodule "external/opentk"]
path = external/opentk
url = ../../mono/opentk.git
branch = master
path = external/opentk
url = ../../mono/opentk.git
branch = master
[submodule "external/Touch.Unit"]
path = external/Touch.Unit
url = ../../spouliot/Touch.Unit.git
branch = master
path = external/Touch.Unit
url = ../../spouliot/Touch.Unit.git
branch = master
[submodule "external/Xamarin.MacDev"]
path = external/Xamarin.MacDev
url = ../../xamarin/Xamarin.MacDev
branch = d15-7
path = external/Xamarin.MacDev
url = ../../xamarin/Xamarin.MacDev
branch = xcode10

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

@ -94,6 +94,8 @@
/src/homekit.cs @VincentDondain
/src/iad.cs @spouliot
/src/iAd.framework @spouliot
/src/identitylookup.cs @dalexsoto
/src/identitylookupui.cs @dalexsoto
/src/ImageIO @spouliot @chamons
/src/imageio.cs @spouliot @chamons
/src/ImageKit @chamons
@ -126,6 +128,8 @@
/src/modelio.cs @VincentDondain
/src/MultipeerConnectivity @spouliot
/src/multipeerconnectivity.cs @spouliot
/src/naturallanguage.cs @mandel-macaque
/src/NaturalLanguage @mandel-macaque
/src/NetworkExtension @spouliot
/src/networkextension.cs @spouliot
/src/NotificationCenter @spouliot

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

@ -34,11 +34,13 @@ PACKAGE_HEAD_REV=$(shell git rev-parse HEAD)
#
#
PACKAGE_HEAD_BRANCH=xcode10
ifeq ($(CURRENT_BRANCH),)
ifeq ($(BUILD_REVISION),)
CURRENT_BRANCH:=$(shell git rev-parse --abbrev-ref HEAD)
else
CURRENT_BRANCH:=$(PACKAGE_HEAD_BRANCH)
endif
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
@ -57,17 +59,17 @@ 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.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode10-beta1.app/Contents/Developer
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_10_Beta_2.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode10-beta2.app/Contents/Developer
XCODE94_VERSION=9.4
XCODE94_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_9.4.xip
XCODE94_DEVELOPER_ROOT=/Applications/Xcode94.app/Contents/Developer
# Minimum Mono version
MIN_MONO_VERSION=5.10.0.0
MAX_MONO_VERSION=5.12.99
MIN_MONO_URL=https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2017-12/13/MonoFramework-MDK-5.10.0.15.macos10.xamarin.universal.pkg
MIN_MONO_VERSION=5.10.1.57
MAX_MONO_VERSION=5.10.99
MIN_MONO_URL=https://dl.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-5.10.1.57.macos10.xamarin.universal.pkg
# Minimum Visual Studio version
MIN_VISUAL_STUDIO_URL=https://download.visualstudio.microsoft.com/download/pr/11550896/783d2219a348f93b6988fb415951788a/VisualStudioForMac-Preview-7.4.0.985.dmg
@ -89,6 +91,7 @@ MIN_OSX_VERSION_FOR_IOS=10.11
MIN_OSX_VERSION_FOR_MAC=10.11
IOS_SDK_VERSION=12.0
# When bumping OSX_SDK_VERSION also update the macOS version where we execute on bots in jenkins/Jenkinsfile (in the 'node' element)
OSX_SDK_VERSION=10.14
WATCH_SDK_VERSION=5.0
TVOS_SDK_VERSION=12.0
@ -177,7 +180,7 @@ endif
SIMULATOR_SDK=$(XCODE_DEVELOPER_ROOT)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
OBJC_CFLAGS=-ObjC++ -std=c++0x -fno-exceptions -I$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1
OBJC_CFLAGS=-ObjC++ -std=c++0x -fno-exceptions -stdlib=libc++
COMMON_SIMULATOR_CFLAGS=-mios-simulator-version-min=$(MIN_IOS_SDK_VERSION) -isysroot $(SIMULATOR_SDK) $(CFLAGS) -g $(IOS_COMMON_DEFINES)
SIMULATOR86_CFLAGS=$(COMMON_SIMULATOR_CFLAGS) -arch i386

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

@ -179,13 +179,11 @@ endif
package:
mkdir -p ../package
$(MAKE) -C ../maccore package
$(MAKE) -C $(MACCORE_PATH) package
# copy .pkg, .zip and *updateinfo to the packages directory to be uploaded to storage
cp ../maccore/release/*.pkg ../package
-cp ../maccore/release/*.zip ../package
-cp ../maccore/release/*updateinfo ../package
-cp ../maccore/tests/*.zip ../package
-cp ../xamarin-macios/tests/*.zip ../package
cp $(MACCORE_PATH)/release/*.pkg ../package
cp $(MACCORE_PATH)/release/*.zip ../package
cp $(MACCORE_PATH)/release/*updateinfo ../package
install-system: install-system-ios install-system-mac
@# Clean up some old files

2
external/Xamarin.MacDev поставляемый

@ -1 +1 @@
Subproject commit e79c9d07a3a0fa6207d6d61f68813f1a98c6b7be
Subproject commit fb5942b6e23e17738ae04aa6c5d76cbcd7ede5e6

1
jenkins/.gitignore поставляемый
Просмотреть файл

@ -1,2 +1,3 @@
pr-comments.md
.tmp-labels*

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

@ -0,0 +1,504 @@
#!/bin/groovy
// global variables
repository = "xamarin/xamarin-macios"
commentFile = null
isPr = false
branchName = null
gitHash = null
packagePrefix = null
virtualPath = null
xiPackageUrl = null
xmPackageUrl = null
utils = null
errorMessage = null
currentStage = null
xiPackageFilename = null
xmPackageFilename = null
msbuildZipFilename = null
bundleZipFilename = null
manifestFilename = null
artifactsFilename = null
reportPrefix = null
createFinalStatus = true
skipLocalTestRunReason = ""
github_pull_request_info = null
def githubGetPullRequestInfo ()
{
if (github_pull_request_info == null && isPr) {
withCredentials ([string (credentialsId: 'macios_github_comment_token', variable: 'GITHUB_PAT_TOKEN')]) {
def url = "https://api.github.com/repos/${repository}/pulls/${env.CHANGE_ID}"
def outputFile = ".github-pull-request-info.json"
try {
sh ("curl -vf -H 'Authorization: token ${GITHUB_PAT_TOKEN}' --output '${outputFile}' '${url}'")
github_pull_request_info = readJSON (file: outputFile)
echo ("Got pull request info: ${github_pull_request_info}")
} finally {
sh ("rm -f ${outputFile}")
}
}
}
return github_pull_request_info
}
github_pull_request_labels = null
def githubGetPullRequestLabels ()
{
if (github_pull_request_labels == null) {
github_pull_request_labels = []
if (isPr) {
def pinfo = githubGetPullRequestInfo ()
def labels = pinfo ["labels"]
if (labels != null) {
for (int i = 0; i < labels.size (); i++) {
def label = labels [i]
github_pull_request_labels.add (label ["name"])
}
}
echo ("Found labels ${github_pull_request_labels} for the pull request.")
}
}
return github_pull_request_labels
}
def githubAddComment (url, markdown)
{
def json = groovy.json.JsonOutput.toJson ([body: markdown])
def jsonFile = "${workspace}/xamarin-macios/jenkins/commit-comments.json"
try {
writeFile (file: "${jsonFile}", text: "${json}")
sh ("cat '${jsonFile}'")
withCredentials ([string (credentialsId: 'macios_github_comment_token', variable: 'GITHUB_COMMENT_TOKEN')]) {
sh ("curl -i -H 'Authorization: token ${GITHUB_COMMENT_TOKEN}' ${url} --data '@${jsonFile}'")
}
} finally {
sh ("rm -f ${jsonFile}")
}
}
def commentOnCommit (commitHash, markdown)
{
githubAddComment ("https://api.github.com/repos/${repository}/commits/${commitHash}/comments", markdown)
}
def commentOnPullRequest (pullRequest, markdown)
{
githubAddComment ("https://api.github.com/repos/${repository}/issues/${pullRequest}/comments", markdown)
}
def addComment (markdown)
{
if (isPr) {
commentOnPullRequest ("${env.CHANGE_ID}", markdown)
} else {
commentOnCommit ("${gitHash}", markdown)
}
}
def appendFileComment (comment)
{
if (fileExists (commentFile))
comment = readFile (commentFile) + comment
writeFile (file: commentFile, text: comment)
}
def reportFinalStatus (err, gitHash, currentStage)
{
if (!createFinalStatus)
return
def comment = null
def status = currentBuild.currentResult
if ("${status}" == "SUCCESS" && err == "") {
comment = "✅ [Jenkins job](${env.RUN_DISPLAY_URL}) (on internal Jenkins) succeeded"
} else {
comment = "🔥 [Jenkins job](${env.RUN_DISPLAY_URL}) (on internal Jenkins) failed in stage '${currentStage}' 🔥"
if (err != "")
comment += " : ${err}"
manager.addErrorBadge (comment)
manager.buildFailure ()
}
if (fileExists (commentFile))
comment += "\n\n" + readFile ("${commentFile}")
addComment ("${comment}")
}
def processAtMonkeyWrench (outputFile)
{
def tmpfile = "atmonkeywrench.tmp"
try {
sh (script: "grep '^@MonkeyWrench: ...Summary: ' '${outputFile}' > ${tmpfile}", returnStatus: true /* don't throw exceptions if something goes wrong */)
def lines = readFile ("${tmpfile}").split ("\n")
for (int i = 0; i < lines.length; i++) {
def summary = lines [i].substring (27 /*"@MonkeyWrench: AddSummary: ".length*/).trim ()
summary = summary.replace ("<br/>", "")
summary = summary.replace ("<a href='", "")
def href_end = summary.indexOf ("'>")
if (href_end > 0)
summary = summary.substring (0, href_end)
echo (summary)
}
} finally {
sh ("rm -f '${tmpfile}'")
}
}
def uploadFiles (glob, virtualPath)
{
step ([
$class: 'WAStoragePublisher',
allowAnonymousAccess: true,
cleanUpContainer: false,
cntPubAccess: true,
containerName: "wrench",
doNotFailIfArchivingReturnsNothing: false,
doNotUploadIndividualFiles: false,
doNotWaitForPreviousBuild: true,
excludeFilesPath: '',
filesPath: glob,
storageAccName: 'bosstoragemirror',
storageCredentialId: 'bc6a99d18d7d9ca3f6bf6b19e364d564',
uploadArtifactsOnlyIfSuccessful: false,
uploadZips: false,
virtualPath: virtualPath
])
}
def runXamarinMacTests (url, macOS)
{
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")
} finally {
sh ("rm -rf mac-test-package *.zip")
}
}
timestamps {
node ('xamarin-macios && macos-10.13') {
try {
timeout (time: 9, unit: 'HOURS') {
// Hard-code a workspace, since branch-based and PR-based
// builds would otherwise use different workspaces, which
// wastes a lot of disk space.
workspace = "${env.HOME}/jenkins/workspace/xamarin-macios"
commentFile = "${workspace}/xamarin-macios/jenkins/pr-comments.md"
withEnv ([
"PATH=/Library/Frameworks/Mono.framework/Versions/Current/Commands:${env.PATH}",
"WORKSPACE=${workspace}"
]) {
sh ("mkdir -p '${workspace}/xamarin-macios'")
dir ("${workspace}/xamarin-macios") {
stage ('Checkout') {
currentStage = "${STAGE_NAME}"
echo ("Building on ${env.NODE_NAME}")
scmVars = checkout scm
isPr = (env.CHANGE_ID && !env.CHANGE_ID.empty ? true : false)
branchName = env.BRANCH_NAME
if (isPr) {
gitHash = sh (script: "git log -1 --pretty=%H refs/remotes/origin/${env.BRANCH_NAME}", returnStdout: true).trim ()
} else {
gitHash = scmVars.GIT_COMMIT
}
// Make sure we start from scratch
sh (script: 'make git-clean-all', returnStatus: true /* don't throw exceptions if something goes wrong */)
// Make really, really sure
sh ('git clean -xffd')
sh ('git submodule foreach --recursive git clean -xffd')
}
}
if (isPr) {
def hasBuildPackage = githubGetPullRequestLabels ().contains ("build-package")
def hasRunInternalTests = githubGetPullRequestLabels ().contains ("run-internal-tests")
if (!hasBuildPackage && !hasRunInternalTests) {
// don't add a comment to the pull request, since the public jenkins will also add comments, which ends up being too much.
createFinalStatus = false
echo ("Build skipped because the pull request doesn't have either of the labels 'build-package' or 'run-internal-tests'.")
return
}
if (!hasRunInternalTests)
skipLocalTestRunReason = "Not running tests here because they're run on public Jenkins."
}
dir ("${workspace}") {
stage ('Provisioning') {
currentStage = "${STAGE_NAME}"
echo ("Building on ${env.NODE_NAME}")
sh ("cd ${workspace}/xamarin-macios && ./configure --enable-xamarin")
sh ("${workspace}/xamarin-macios/jenkins/provision-deps.sh")
}
stage ('Build') {
currentStage = "${STAGE_NAME}"
echo ("Building on ${env.NODE_NAME}")
withEnv ([
"CURRENT_BRANCH=${branchName}",
"PACKAGE_HEAD_BRANCH=${branchName}"
]) {
sh ("${workspace}/xamarin-macios/jenkins/build.sh --configure-flags --enable-xamarin")
}
}
stage ('Packaging') {
currentStage = "${STAGE_NAME}"
echo ("Building on ${env.NODE_NAME}")
sh ("${workspace}/xamarin-macios/jenkins/build-package.sh")
sh (script: "ls -la ${workspace}/package", returnStatus: true /* don't throw exceptions if something goes wrong */)
}
stage ('Signing') {
currentStage = "${STAGE_NAME}"
echo ("Building on ${env.NODE_NAME}")
def xiPackages = findFiles (glob: "package/xamarin.ios-*.pkg")
if (xiPackages.length > 0) {
xiPackageFilename = xiPackages [0].name
echo ("Created Xamarin.iOS package: ${xiPackageFilename}")
}
def xmPackages = findFiles (glob: "package/xamarin.mac-*.pkg")
if (xmPackages.length > 0) {
xmPackageFilename = xmPackages [0].name
echo ("Created Xamarin.Mac package: ${xmPackageFilename}")
}
def msbuildZip = findFiles (glob: "package/msbuild.zip")
if (msbuildZip.length > 0)
msbuildZipFilename = msbuildZip [0].name
def bundleZip = findFiles (glob: "package/bundle.zip")
if (bundleZip.length > 0)
bundleZipFilename = bundleZip [0].name
withCredentials ([string (credentialsId: 'codesign_keychain_pw', variable: 'PRODUCTSIGN_KEYCHAIN_PASSWORD')]) {
sh ("${workspace}/xamarin-macios/jenkins/productsign.sh")
}
}
stage ('Upload to Azure') {
currentStage = "${STAGE_NAME}"
virtualPath = "jenkins/${branchName}/${gitHash}/${env.BUILD_NUMBER}"
packagePrefix = "https://bosstoragemirror.blob.core.windows.net/wrench/${virtualPath}/package"
// Create artifacts.json and manifest
def uploadingFiles = findFiles (glob: "package/*")
def manifest = ""
def artifacts = "[\n"
for (int i = 0; i < uploadingFiles.length; i++) {
def file = uploadingFiles [i]
def f_length = file.length;
def md5 = sh (returnStdout: true, script: "md5 -q '${file}'").trim ()
def sha256 = sh (returnStdout: true, script: "shasum -a 256").trim ().split (" ") [0];
manifest += "${packagePrefix}/${file.name}\n"
artifacts += " {\n"
artifacts += " \"file\": \"${file.name}\",\n"
artifacts += " \"url\": \"${packagePrefix}/${file.name}\",\n"
artifacts += " \"md5\": \"${md5}\",\n"
artifacts += " \"sha256\": \"${sha256}\",\n"
artifacts += " \"size\": ${f_length}\n"
artifacts += " }"
if (i < uploadingFiles.length - 1)
artifacts += ","
artifacts +="\n"
}
artifacts += "]\n"
manifest += "${packagePrefix}/artifacts.json\n"
manifest += "${packagePrefix}/manifest\n"
writeFile (file: "package/manifest", text: manifest)
writeFile (file: "package/artifacts.json", text: artifacts)
sh ("ls -la package")
uploadFiles ("package/*", virtualPath)
// Also upload manifest to a predictable url (without the build number)
// This manifest will be overwritten in subsequent builds (for this [PR/branch]+hash combination)
uploadFiles ("package/manifest", "jenkins/${branchName}/${gitHash}")
// And also create a 'latest' version (which really means 'latest built', not 'latest hash', but it will hopefully be good enough)
uploadFiles ("package/manifest", "jenkins/${branchName}/latest")
manifestFilename = "manifest"
artifactsFilename = "artifacts.json"
}
stage ('Publish builds to GitHub') {
currentStage = "${STAGE_NAME}"
utils = load ("${workspace}/xamarin-macios/jenkins/utils.groovy")
if (xiPackageFilename != null) {
xiPackageUrl = "${packagePrefix}/${xiPackageFilename}"
utils.reportGitHubStatus (gitHash, 'PKG-Xamarin.iOS', "${xiPackageUrl}", 'SUCCESS', "${xiPackageFilename}")
}
if (xmPackageFilename != null) {
xmPackageUrl = "${packagePrefix}/${xmPackageFilename}"
utils.reportGitHubStatus (gitHash, 'PKG-Xamarin.Mac', "${xmPackageUrl}", 'SUCCESS', "${xmPackageFilename}")
}
if (manifestFilename != null) {
def manifestUrl = "${packagePrefix}/${manifestFilename}"
utils.reportGitHubStatus (gitHash, "${manifestFilename}", "${manifestUrl}", 'SUCCESS', "${manifestFilename}")
}
if (artifactsFilename != null) {
def artifactUrl = "${packagePrefix}/${artifactsFilename}"
utils.reportGitHubStatus (gitHash, "Jenkins: Artifacts", "${artifactUrl}", 'SUCCESS', "${artifactsFilename}")
}
if (bundleZipFilename != null) {
def bundleZipUrl = "${packagePrefix}/${bundleZipFilename}"
utils.reportGitHubStatus (gitHash, "bundle.zip", "${bundleZipUrl}", 'SUCCESS', "${bundleZipFilename}")
}
if (msbuildZipFilename != null) {
def msbuildZipUrl = "${packagePrefix}/${msbuildZipFilename}"
utils.reportGitHubStatus (gitHash, "msbuild.zip", "${msbuildZipUrl}", 'SUCCESS', "${msbuildZipFilename}")
}
}
dir ('xamarin-macios') {
stage ('Launch external tests') {
currentStage = "${STAGE_NAME}"
if (isPr) {
echo "Currently not launching external tests for pull requests"
} else {
def outputFile = "${workspace}/xamarin-macios/wrench-launch-external.output.tmp"
try {
withCredentials ([string (credentialsId: 'macios_provisionator_pat', variable: 'PROVISIONATOR_VSTS_PAT')]) {
sh ("make -C ${workspace}/xamarin-macios/tests wrench-launch-external MAC_PACKAGE_URL=${xmPackageUrl} IOS_PACKAGE_URL=${xiPackageUrl} WRENCH_URL=${env.RUN_DISPLAY_URL} BUILD_REVISION=${gitHash} BUILD_LANE=jenkins/${branchName} BUILD_WORK_HOST=${env.NODE_NAME} 2>&1 | tee ${outputFile}")
}
processAtMonkeyWrench (outputFile)
} catch (error) {
echo ("🚫 Launching external tests failed: ${error} 🚫")
manager.addWarningBadge ("Failed to launch external tests")
} finally {
sh ("rm -f '${outputFile}'")
}
}
}
stage ('Install Provisioning Profiles') {
currentStage = "${STAGE_NAME}"
sh ("${workspace}/maccore/tools/install-qa-provisioning-profiles.sh")
}
stage ('Publish reports') {
currentStage = "${STAGE_NAME}"
reportPrefix = sh (script: "${workspace}/xamarin-macios/jenkins/publish-results.sh | grep '^Url Prefix: ' | sed 's/^Url Prefix: //'", returnStdout: true).trim ()
if (skipLocalTestRunReason == "") {
echo ("Html report: ${reportPrefix}/tests/index.html")
} else {
echo ("Html report: ${skipLocalTestRunReason}")
}
echo ("API diff (from stable): ${reportPrefix}/api-diff/index.html")
echo ("API diff (from previous commit / before pull request): ${reportPrefix}/apicomparison/api-diff.html")
echo ("Generator diff: ${reportPrefix}/generator-diff/index.html")
}
stage ('API diff') {
currentStage = "${STAGE_NAME}"
def apidiffResult = sh (script: "${workspace}/xamarin-macios/jenkins/build-api-diff.sh --publish", returnStatus: true)
if (apidiffResult != 0)
manager.addWarningBadge ("Failed to generate API diff")
echo ("API diff (from stable): ${reportPrefix}/api-diff/index.html")
}
stage ('API & Generator comparison') {
currentStage = "${STAGE_NAME}"
def compareResult = sh (script: "${workspace}/xamarin-macios/jenkins/compare.sh --publish", returnStatus: true)
if (compareResult != 0)
manager.addWarningBadge ("Failed to generate API / Generator diff")
echo ("API diff (from previous commit / before pull request): ${reportPrefix}/apicomparison/api-diff.html")
echo ("Generator diff: ${reportPrefix}/generator-diff/index.html")
}
stage ("Package XM tests") {
currentStage = "${STAGE_NAME}"
sh ("make -C ${workspace}/xamarin-macios/tests package-tests")
uploadFiles ("tests/*.zip", virtualPath)
}
timeout (time: 6, unit: 'HOURS') {
// We run tests locally and on older macOS bots in parallel.
// The older macOS tests run quickly (and the bots should usually be idle),
// which means that the much longer normal (local) test run should take
// longer to complete (which is important since this will block until all tests
// have been run, even if any older macOS bots are busy doing other things, preventing
// our tests from running there), giving the older macOS bots plenty of
// time to finish their test runs.
stage ('Run tests parallelized') {
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}")
}
}
} catch (err) {
currentStage = "Running XM tests on '10.${macOS}'"
appendFileComment ("🔥 [Xamarin.Mac tests on 10.${macOS} failed](${env.RUN_DISPLAY_URL}) 🔥\n")
throw err
}
}
}
// Add standard test run
builders ["All tests"] = {
stage ('Run tests') {
currentStage = "Test run"
echo ("Building on ${env.NODE_NAME}")
if (skipLocalTestRunReason != "") {
echo (skipLocalTestRunReason)
appendFileComment (" Test run skipped: ${skipLocalTestRunReason}\n")
} else {
echo ("Html report: ${reportPrefix}/tests/index.html")
sh ("${workspace}/xamarin-macios/jenkins/run-tests.sh --target=wrench-jenkins --publish --keychain=xamarin-macios")
}
}
stage ('Test docs') {
currentStage = "${STAGE_NAME}"
echo ("Building on ${env.NODE_NAME}")
def targetBranch = isPr ? githubGetPullRequestInfo () ["base"] ["ref"] : "${BRANCH_NAME}"
def testDocs = targetBranch == "master"
if (!testDocs) {
echo ("Skipping docs testing, it's only done on master (current (target) branch is ${targetBranch})")
} else {
sh ("make -C ${workspace}/xamarin-macios/tests wrench-docs")
}
}
}
// Run it all parallelized
parallel builders
}
}
} // dir ("xamarin-macios")
} // dir ("${workspace}")
}
reportFinalStatus ("", "${gitHash}", "${currentStage}")
} // timeout
} catch (err) {
reportFinalStatus ("${err}", "${gitHash}", "${currentStage}")
} finally {
stage ('Final tasks') {
sh (script: "${workspace}/xamarin-macios/jenkins/publish-results.sh", returnStatus: true /* don't throw exceptions if something goes wrong */)
sh (script: "make git-clean-all -C ${workspace}/xamarin-macios", returnStatus: true /* don't throw exceptions if something goes wrong */)
}
}
} // node
} // timestamps

2
jenkins/Makefile Normal file
Просмотреть файл

@ -0,0 +1,2 @@
all check:
shellcheck *.sh

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

@ -1,13 +1,29 @@
#!/bin/bash -e
cd "$(dirname "${BASH_SOURCE[0]}")/.."
WORKSPACE=$(pwd)
report_error ()
{
printf "🔥 [Failed to create API Diff]($BUILD_URL/console) 🔥\\n" >> $WORKSPACE/jenkins/pr-comments.md
printf "🔥 [Failed to create API Diff](%s/console) 🔥\\n" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md"
}
trap report_error ERR
cd $WORKSPACE
# SC2154: ghprbPullId is referenced but not assigned.
# shellcheck disable=SC2154
if test -n "$ghprbPullId" && ./jenkins/fetch-pr-labels.sh --check=skip-public-jenkins; then
echo "Skipping API diff because the label 'skip-public-jenkins' was found."
exit 0
fi
export BUILD_REVISION=jenkins
make -j8 -C tools/apidiff jenkins-api-diff
printf "✅ [API Diff (from stable)]($BUILD_URL/API_diff_(from_stable))\\n" >> $WORKSPACE/jenkins/pr-comments.md
if [[ "x$1" == "x--publish" ]]; then
URL_PREFIX=$(./jenkins/publish-results.sh | grep "^Url Prefix: " | sed 's/^Url Prefix: //')
URL="$URL_PREFIX/api-diff/index.html"
else
URL="$BUILD_URL/API_20diff_20_28from_20stable_29"
fi
printf "✅ [API Diff (from stable)](%s)\\n" "$URL" >> "$WORKSPACE/jenkins/pr-comments.md"

7
jenkins/build-package.sh Executable file
Просмотреть файл

@ -0,0 +1,7 @@
#!/bin/bash -ex
cd "$(dirname "${BASH_SOURCE[0]}")/.."
#WORKSPACE=$(pwd)
rm -Rf ../package
make package

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

@ -1,27 +1,41 @@
#!/bin/bash -e
cd "$(dirname "${BASH_SOURCE[0]}")/.."
WORKSPACE=$(pwd)
report_error ()
{
printf "🔥 [Build failed]($BUILD_URL/console) 🔥\\n" >> $WORKSPACE/jenkins/pr-comments.md
printf "🔥 [Build failed](%s/console) 🔥\\n" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md"
}
trap report_error ERR
ls -la $WORKSPACE/jenkins
echo "$WORKSPACE/jenkins/pr-comments.md:"
cat $WORKSPACE/jenkins/pr-comments.md
if [[ x$1 == x--configure-flags ]]; then
CONFIGURE_FLAGS="$2"
fi
ls -la "$WORKSPACE/jenkins"
echo "$WORKSPACE/jenkins/pr-comments.md:"
cat "$WORKSPACE/jenkins/pr-comments.md" || true
cd $WORKSPACE
export BUILD_REVISION=jenkins
ENABLE_DEVICE_BUILD=
if test -z $ghprbPullId; then
echo "Could not find the environment variable ghprbPullId, so won't check if we're doing a device build."
# SC2154: ghprbPullId is referenced but not assigned.
# shellcheck disable=SC2154
if test -z "$ghprbPullId"; then
echo "Could not find the environment variable ghprbPullId, so forcing a device build."
ENABLE_DEVICE_BUILD=1
else
if ./jenkins/fetch-pr-labels.sh --check=skip-public-jenkins; then
echo "Skipping execution because the label 'skip-public-jenkins' was found."
printf " [Skipped execution](%s/console)\\n" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md"
exit 0
fi
echo "Listing modified files for pull request #$ghprbPullId..."
if git diff-tree --no-commit-id --name-only -r "origin/pr/$ghprbPullId/merge^..origin/pr/$ghprbPullId/merge" > .tmp-files; then
echo "Modified files found":
cat .tmp-files | sed 's/^/ /' || true
sed 's/^/ /' .tmp-files || true
if grep 'external/mono' .tmp-files > /dev/null; then
echo "Enabling device build because mono was bumped."
elif grep 'external/llvm' .tmp-files > /dev/null; then
@ -32,30 +46,27 @@ else
fi
rm -f .tmp-files
if test -z $ENABLE_DEVICE_BUILD; then
echo "Downloading labels for pull request #$ghprbPullId..."
if curl https://api.github.com/repos/xamarin/xamarin-macios/issues/$ghprbPullId/labels > .tmp-labels; then
echo "Labels found:"
cat .tmp-labels | grep "\"name\":" | sed 's/name": \"//' | sed 's/.*\"\(.*\)\".*/ \1/' || true
if grep '\"enable-device-build\"' .tmp-labels >/dev/null; then
ENABLE_DEVICE_BUILD=1
echo "Enabling device build because the label 'enable-device-build' was found."
else
echo "Not enabling device build; no label named 'enable-device-build' was found."
fi
if test -z "$ENABLE_DEVICE_BUILD"; then
if ./jenkins/fetch-pr-labels.sh --check=enable-device-build; then
ENABLE_DEVICE_BUILD=1
echo "Enabling device build because the label 'enable-device-build' was found."
else
echo "Failed to fetch labels for the pull request $ghprbPullId, so won't check if we're doing a device build."
echo "Not enabling device build; no label named 'enable-device-build' was found."
fi
rm -f .tmp-labels
fi
fi
if test -n "$ENABLE_DEVICE_BUILD"; then
./configure
else
./configure --disable-ios-device
if test -z "$ENABLE_DEVICE_BUILD"; then
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --disable-ios-device"
fi
# shellcheck disable=SC2086
./configure $CONFIGURE_FLAGS
time make world
make reset
make git-clean-all
make print-versions
printf "✅ [Build succeeded]($BUILD_URL/console)\\n" >> $WORKSPACE/jenkins/pr-comments.md
time make -j8
time make install -j8
printf "✅ [Build succeeded](%s/console)\\n" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md"

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

@ -1,14 +1,42 @@
#!/bin/bash -e
cd "$(dirname "${BASH_SOURCE[0]}")/.."
WORKSPACE=$(pwd)
report_error ()
{
printf "🔥 [Failed to compare API and create generator diff]($BUILD_URL/console) 🔥\\n" >> $WORKSPACE/jenkins/pr-comments.md
touch $WORKSPACE/jenkins/failure-stamp
printf "🔥 [Failed to compare API and create generator diff](%s/console) 🔥\\n" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md"
touch "$WORKSPACE/jenkins/failure-stamp"
exit 0
}
trap report_error ERR
cd $WORKSPACE
./tools/compare-commits.sh --base=origin/pr/$ghprbPullId/merge^1
# SC2154: ghprbPullId is referenced but not assigned.
# shellcheck disable=SC2154
if test -n "$ghprbPullId"; then
if ./jenkins/fetch-pr-labels.sh --check=skip-api-comparison; then
printf "❎ Skipped API comparison because the PR has the label 'skip-api-comparison'\\n" >> "$WORKSPACE/jenkins/pr-comments.md"
exit 0
fi
if ./jenkins/fetch-pr-labels.sh --check=skip-public-jenkins; then
echo "Skipping API comparison because the label 'skip-public-jenkins' was found."
exit 0
fi
fi
if test -z "$ghprbPullId"; then
BASE=HEAD
else
BASE="origin/pr/$ghprbPullId/merge"
fi
if ! git rev-parse "$BASE" >/dev/null 2>&1; then
echo "Can't compare API and create generator diff because the pull request has conflicts that must be resolved first (the branch '$BASE' doesn't exist)."
printf "🔥 [Failed to compare API and create generator diff because the pull request has conflicts that must be resolved first](%s/console) 🔥\\n" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md"
exit 0
fi
./tools/compare-commits.sh --base="$BASE^1"
mkdir -p jenkins-results/apicomparison
@ -16,5 +44,29 @@ cp -R tools/comparison/apidiff/diff jenkins-results/apicomparison/
cp tools/comparison/apidiff/*.html jenkins-results/apicomparison/
cp -R tools/comparison/generator-diff jenkins-results/generator-diff
printf "✅ [API Diff (from PR only)]($BUILD_URL/API_diff_(PR_only))\\n" >> $WORKSPACE/jenkins/pr-comments.md
printf "✅ [Generator Diff]($BUILD_URL/Generator_Diff)\\n" >> $WORKSPACE/jenkins/pr-comments.md
if [[ "x$1" == "x--publish" ]]; then
URL_PREFIX=$(./jenkins/publish-results.sh | grep "^Url Prefix: " | sed 's/^Url Prefix: //')
URL_API="$URL_PREFIX/apicomparison/index.html"
URL_GENERATOR="$URL_PREFIX/generator-diff/index.html"
else
URL_API="$BUILD_URL/API_20diff_20_28PR_20only_29"
URL_GENERATOR="$BUILD_URL/Generator_20Diff"
fi
printf "✅ [API Diff (from PR only)](%s)" "$URL_API" >> "$WORKSPACE/jenkins/pr-comments.md"
if ! grep "href=" jenkins-results/apicomparison/api-diff.html >/dev/null 2>&1; then
printf " (no change)" >> "$WORKSPACE/jenkins/pr-comments.md"
elif perl -0777 -pe 's/<script type="text\/javascript">.*?<.script>/script removed/gs' jenkins-results/apicomparison/*.html | grep data-is-breaking; then
printf " (🔥 breaking changes 🔥)" >> "$WORKSPACE/jenkins/pr-comments.md"
else
printf " (please review changes)" >> "$WORKSPACE/jenkins/pr-comments.md"
fi
printf "\\n" >> "$WORKSPACE/jenkins/pr-comments.md"
printf "✅ [Generator Diff](%s)" "$URL_GENERATOR" >> "$WORKSPACE/jenkins/pr-comments.md"
if grep "^[+-][^+-]" jenkins-results/generator-diff/generator.diff | grep -v "^.[[]assembly: AssemblyInformationalVersion" | grep -v "^[+-][[:space:]]*internal const string Revision =" >/dev/null 2>&1; then
printf " (please review changes)" >> "$WORKSPACE/jenkins/pr-comments.md"
else
printf " (only version changes)" >> "$WORKSPACE/jenkins/pr-comments.md"
fi
printf "\\n" >> "$WORKSPACE/jenkins/pr-comments.md"

61
jenkins/fetch-pr-labels.sh Executable file
Просмотреть файл

@ -0,0 +1,61 @@
#!/bin/bash -e
# SC2154: ghprbPullId is referenced but not assigned.
# shellcheck disable=SC2154
if test -z "$ghprbPullId"; then
echo "Could not find the environment variable ghprbPullId, so it's not possible to fetch the labels for any pull request."
exit 1
fi
FORCE=
CHECK=
while ! test -z "$1"; do
case "$1" in
--force|-f)
FORCE=1
shift
;;
--check)
if test -z "$2"; then
echo "Missing argument to --check"
exit 1
fi
CHECK="$2"
shift 2
;;
--check=*|--check:*)
CHECK="${1:8}"
shift
;;
*)
echo "Unknown argument: $1"
exit 1
;;
esac
done
cd "$(dirname "$0")"
TMPFILE=".tmp-labels-$ghprbPullId"
if [[ x"$FORCE" == "x" && ( -f "$TMPFILE" ) ]]; then
echo "Not downloading labels for pull request #$ghprbPullId because they've already been downloaded."
else
echo "Downloading labels for pull request #$ghprbPullId..."
if ! curl --silent "https://api.github.com/repos/xamarin/xamarin-macios/issues/$ghprbPullId/labels" > "$TMPFILE.dl"; then
echo "Failed to fetch labels for the pull request $ghprbPullId."
exit 1
fi
grep "\"name\":" "$TMPFILE.dl" | sed -e 's/name": \"//' -e 's/.*\"\(.*\)\".*/\1/'> "$TMPFILE" || true
fi
if test -z "$CHECK"; then
echo "Labels found:"
sed 's/^/ /' "$TMPFILE"
else
if grep "^$CHECK$" "$TMPFILE" >/dev/null 2>&1; then
echo "The pull request $ghprbPullId contains the label $CHECK."
else
echo "The pull request $ghprbPullId does not contain the label $CHECK."
exit 1
fi
fi

59
jenkins/productsign.sh Executable file
Просмотреть файл

@ -0,0 +1,59 @@
#!/bin/bash -ex
#
# productsign.sh: run productsign against any installer .pkg
# files in the package output directory for the lane, signing
# with the Xamarin Developer Installer identity and verifying
# the signature's fingerprint after the fact.
#
# Author:
# Aaron Bockover <abock@xamarin.com>
#
# Copyright 2014 Xamarin, Inc.
#
PRODUCTSIGN_KEYCHAIN="login.keychain"
PRODUCTSIGN_IDENTITY="Developer ID Installer: Xamarin Inc"
PRODUCTSIGN_FINGERPRINT="3F:BE:54:B1:41:8B:F1:20:FA:B4:9D:A7:F2:5E:72:95:5A:49:21:D6"
if [ -z "$PRODUCTSIGN_KEYCHAIN_PASSWORD" ]; then
echo "PRODUCTSIGN_KEYCHAIN_PASSWORD is not set."
exit 1
fi
SIGNING_DIR=$(pwd)/package-signed
mkdir -p "$SIGNING_DIR"
echo Before signing
ls -l package
security -v find-identity $PRODUCTSIGN_KEYCHAIN
security unlock-keychain -p "$PRODUCTSIGN_KEYCHAIN_PASSWORD" "$PRODUCTSIGN_KEYCHAIN"
for pkg in package/*.pkg; do
productsign -s "$PRODUCTSIGN_IDENTITY" "$pkg" "$SIGNING_DIR/$(basename "$pkg")" --keychain $PRODUCTSIGN_KEYCHAIN
done
echo Signing output
ls -l "$SIGNING_DIR"
mv "$SIGNING_DIR"/* package
echo After signing
ls -l package
echo 'setns x=http://www.w3.org/2000/09/xmldsig#' > shell.xmllint
echo 'cat (//xar/toc/signature/x:KeyInfo/x:X509Data/x:X509Certificate)[1]/text()' >> shell.xmllint
echo Signature Verification
for pkg in package/*.pkg; do
/usr/sbin/spctl -vvv --assess --type install "$pkg"
pkgutil --check-signature "$pkg"
xar -f "$pkg" --dump-toc="$pkg.toc"
(
echo '-----BEGIN CERTIFICATE-----' &&
xmllint --shell "$pkg.toc" < shell.xmllint | grep -Ev '^/' &&
echo '-----END CERTIFICATE-----'
) | openssl x509 -fingerprint | grep "$PRODUCTSIGN_FINGERPRINT" || exit 1
done
rm shell.xmllint

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

@ -1,12 +1,21 @@
#!/bin/bash -e
cd "$(dirname "${BASH_SOURCE[0]}")/.."
WORKSPACE=$(pwd)
report_error ()
{
echo "🔥 [Provisioning failed]($BUILD_URL/console) 🔥" >> $WORKSPACE/jenkins/pr-comments.md
echo "🔥 [Provisioning failed]($BUILD_URL/console) 🔥" >> "$WORKSPACE/jenkins/pr-comments.md"
}
trap report_error ERR
cd $WORKSPACE
# SC2154: ghprbPullId is referenced but not assigned.
# shellcheck disable=SC2154
if test -n "$ghprbPullId" && ./jenkins/fetch-pr-labels.sh --check=skip-public-jenkins; then
echo "Skipping provisioning diff because the label 'skip-public-jenkins' was found."
exit 0
fi
./system-dependencies.sh --provision-all
echo "✅ [Provisioning succeeded]($BUILD_URL/console)" >> $WORKSPACE/jenkins/pr-comments.md
echo "✅ [Provisioning succeeded]($BUILD_URL/console)" >> "$WORKSPACE/jenkins/pr-comments.md"

38
jenkins/publish-results.sh Executable file
Просмотреть файл

@ -0,0 +1,38 @@
#!/bin/bash -ex
cd "$(dirname "${BASH_SOURCE[0]}")/.."
WORKSPACE=$(pwd)
report_error ()
{
printf "🔥 [Failed to publish results](%s/console) 🔥\\n" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md"
}
trap report_error ERR
# SC2154: ghprbPullId is referenced but not assigned.
# shellcheck disable=SC2154
if test -n "$ghprbPullId"; then
BRANCH_NAME="pr$ghprbPullId"
elif test -z "$BRANCH_NAME"; then
echo "Neither BRANCH_NAME nor ghprbPullId is set"
exit 1
fi
if test -z "$BUILD_NUMBER"; then
echo "BUILD_NUMBER is not set"
exit 1
fi
P="jenkins/xamarin-macios/${BRANCH_NAME}/$(git log -1 --pretty=%H)/${BUILD_NUMBER}"
echo "Url Prefix: http://xamarin-storage/$P/jenkins-results"
echo "Periodic Command: --periodic-interval 10 --periodic-command rsync --periodic-command-arguments '-avz --chmod=+r -e ssh $WORKSPACE/jenkins-results builder@xamarin-storage:/volume1/storage/$P'"
mkdir -p "$WORKSPACE/jenkins-results"
# Publish
# Make sure the target directory exists
# SC2029: Note that, unescaped, this expands on the client side. [Referring to $P]
# shellcheck disable=SC2029
ssh builder@xamarin-storage "mkdir -p /volume1/storage/$P"
rsync -avz --chmod=+r -e ssh "$WORKSPACE/jenkins-results" "builder@xamarin-storage:/volume1/storage/$P"

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

@ -1,35 +1,106 @@
#!/bin/bash -e
cd "$(dirname "${BASH_SOURCE[0]}")/.."
WORKSPACE=$(pwd)
report_error ()
{
printf "🔥 [Test run failed]($BUILD_URL/Test_Report/) 🔥\\n" >> $WORKSPACE/jenkins/pr-comments.md
printf "🔥 [Test run failed](%s) 🔥\\n" "$URL" >> "$WORKSPACE/jenkins/pr-comments.md"
if test -f $WORKSPACE/tests/TestSummary.md; then
printf "\\n" >> $WORKSPACE/jenkins/pr-comments.md
cat $WORKSPACE/tests/TestSummary.md >> $WORKSPACE/jenkins/pr-comments.md
if test -f "$WORKSPACE/tests/TestSummary.md"; then
printf "\\n" >> "$WORKSPACE/jenkins/pr-comments.md"
cat "$WORKSPACE/tests/TestSummary.md" >> "$WORKSPACE/jenkins/pr-comments.md"
fi
touch $WORKSPACE/jenkins/failure-stamp
touch "$WORKSPACE/jenkins/failure-stamp"
}
trap report_error ERR
# SC2154: ghprbPullId is referenced but not assigned.
# shellcheck disable=SC2154
if test -n "$ghprbPullId" && ./jenkins/fetch-pr-labels.sh --check=skip-public-jenkins; then
echo "Skipping tests because the label 'skip-public-jenkins' was found."
exit 0
fi
TARGET=jenkins
PUBLISH=
KEYCHAIN=builder
KEYCHAIN_PWD_FILE=~/.config/keychain
while ! test -z "$1"; do
case "$1" in
--target=*)
TARGET="${1:9}"
shift
;;
--keychain=*)
KEYCHAIN="${1:11}"
KEYCHAIN_PWD_FILE=~/.config/$KEYCHAIN-keychain
shift
;;
--publish)
PUBLISH=1
shift
;;
*)
echo "Unknown argument: $1"
exit 1
;;
esac
done
if test -n "$PUBLISH"; then
PUBLISH_OUTPUT=$(./jenkins/publish-results.sh)
URL_PREFIX=$(echo "$PUBLISH_OUTPUT" | grep "^Url Prefix: " | sed 's/^Url Prefix: //')
URL="$URL_PREFIX/tests/index.html"
TESTS_PERIODIC_COMMAND=$(echo "$PUBLISH_OUTPUT" | grep "^Periodic Command: " | sed 's/^Periodic Command: //')
export TESTS_PERIODIC_COMMAND
else
URL="$BUILD_URL/Test_20Report"
fi
export BUILD_REVISION=jenkins
cd $WORKSPACE
# Unlock
security default-keychain -s builder.keychain
security list-keychains -s builder.keychain
echo "Unlock keychain"
security unlock-keychain -p `cat ~/.config/keychain`
echo "Increase keychain unlock timeout"
security set-keychain-settings -lut 7200
# Run tests
make -C tests jenkins
printf "✅ [Test run succeeded]($BUILD_URL/Test_Report/)\\n" >> $WORKSPACE/jenkins/pr-comments.md
if test -f $WORKSPACE/jenkins/failure-stamp; then
echo "Something went wrong:"
cat $WORKSPACE/jenkins/pr-comments.md
if ! test -f ~/Library/Keychains/"$KEYCHAIN".keychain-db; then
echo "The '$KEYCHAIN' keychain is not available."
exit 1
fi
security default-keychain -s "$KEYCHAIN.keychain"
security list-keychains -s "$KEYCHAIN.keychain"
echo "Unlock keychain"
security unlock-keychain -p "$(cat "$KEYCHAIN_PWD_FILE")"
echo "Increase keychain unlock timeout"
security set-keychain-settings -lut 7200
security -v find-identity "$KEYCHAIN.keychain"
# Prevent dialogs from asking for permissions.
# http://stackoverflow.com/a/40039594/183422
# Discard output since there can be a *lot* of it.
security set-key-partition-list -S apple-tool:,apple: -s -k "$(cat "$KEYCHAIN_PWD_FILE")" "$KEYCHAIN.keychain" >/dev/null 2>&1
# clean mono keypairs (used in tests)
rm -rf ~/.config/.mono/keypairs/
# Run tests
RC=0
make -C tests "$TARGET" || RC=$?
# upload of the final html report
if test -n "$PUBLISH"; then
./jenkins/publish-results.sh
fi
if [[ x$RC != x0 ]]; then
report_error
exit $RC
fi
printf "✅ [Test run succeeded](%s)\\n" "$URL" >> "$WORKSPACE/jenkins/pr-comments.md"
if test -f "$WORKSPACE/jenkins/failure-stamp"; then
echo "Something went wrong:"
cat "$WORKSPACE/jenkins/pr-comments.md"
exit 1
fi

11
jenkins/utils.groovy Normal file
Просмотреть файл

@ -0,0 +1,11 @@
def reportGitHubStatus(commitHash, context, backref, statusResult, statusResultMessage) {
step([
$class: 'GitHubCommitStatusSetter',
commitShaSource: [$class: "ManuallyEnteredShaSource", sha: commitHash],
contextSource: [$class: 'ManuallyEnteredCommitContextSource', context: context],
statusBackrefSource: [$class: 'ManuallyEnteredBackrefSource', backref: backref],
statusResultSource: [$class: 'ConditionalStatusResultSource', results: [[$class: 'AnyBuildResult', state: statusResult, message: statusResultMessage]]]
])
}
return this

51
mk/xamarin-reset.sh Executable file
Просмотреть файл

@ -0,0 +1,51 @@
#!/bin/bash -e
DEPENDENCY_NAME="$1"
# Calculate the remote from the format: git@github.com:<remote>/<repo>.git
DEPENDENCY_REMOTE=${DEPENDENCY_MODULE/git@github.com:/}
DEPENDENCY_REMOTE=${DEPENDENCY_REMOTE%%/*}
if test -d "$DEPENDENCY_PATH"; then
cd "$DEPENDENCY_PATH"
# Check if we have the remote we need
if ! git config "remote.$DEPENDENCY_REMOTE.url" > /dev/null; then
echo "*** [$DEPENDENCY_NAME] git remote add -f '$DEPENDENCY_REMOTE' '$DEPENDENCY_MODULE'"
git remote add -f "$DEPENDENCY_REMOTE" "$DEPENDENCY_MODULE"
fi
# Check if we have the hash we need
if ! git log -1 --pretty=%H "$DEPENDENCY_HASH" > /dev/null 2>&1; then
echo "*** [$DEPENDENCY_NAME] git fetch $DEPENDENCY_REMOTE"
git fetch "$DEPENDENCY_REMOTE"
fi
else
echo "*** [$DEPENDENCY_NAME] git clone $DEPENDENCY_MODULE --recursive $DEPENDENCY_DIRECTORY -b $DEPENDENCY_BRANCH --origin $DEPENDENCY_REMOTE"
mkdir -p "$(dirname "$DEPENDENCY_PATH")"
cd "$(dirname "$DEPENDENCY_PATH")"
git clone "$DEPENDENCY_MODULE" --recursive "$DEPENDENCY_DIRECTORY" -b "$DEPENDENCY_BRANCH" --origin "$DEPENDENCY_REMOTE"
cd "$DEPENDENCY_DIRECTORY"
fi
if ! git log -1 --pretty=%H "$DEPENDENCY_HASH" > /dev/null 2>&1; then
echo "The hash $DEPENDENCY_HASH does not exist in $DEPENDENCY_MODULE. Please verify that you pushed your changes."
exit 1
fi
if test -z "$DEPENDENCY_IGNORE_VERSION"; then
if git rev-parse --verify "$DEPENDENCY_BRANCH" >/dev/null 2>&1; then
# branch already exists
echo "*** [$DEPENDENCY_NAME] git checkout -f $DEPENDENCY_BRANCH"
git checkout -f "$DEPENDENCY_BRANCH"
else
# branch does not exist
echo "*** [$DEPENDENCY_NAME] git checkout -f -b $DEPENDENCY_BRANCH $DEPENDENCY_REMOTE/$DEPENDENCY_BRANCH"
git checkout -f -b "$DEPENDENCY_BRANCH" "$DEPENDENCY_REMOTE/$DEPENDENCY_BRANCH"
fi
echo "*** [$DEPENDENCY_NAME] git reset --hard $DEPENDENCY_HASH"
git reset --hard "$DEPENDENCY_HASH"
fi
echo "*** [$DEPENDENCY_NAME] git submodule update --init --recursive"
git submodule update --init --recursive

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

@ -1,14 +1,11 @@
ifdef ENABLE_XAMARIN
NEEDED_MACCORE_VERSION := 312828e025b2c9906ffbe6e14ae99bdf713cefea
NEEDED_MACCORE_VERSION := a49e4f2ca17086ddebade8100a1a06d2c816a63d
NEEDED_MACCORE_BRANCH := xcode10
MACCORE_DIRECTORY := maccore
MACCORE_MODULE := git@github.com:xamarin/maccore.git
MACCORE_VERSION := $(shell cd $(MACCORE_PATH) 2> /dev/null && git rev-parse HEAD 2> /dev/null)
MACCORE_BRANCH := $(shell cd $(MACCORE_PATH) 2> /dev/null && git symbolic-ref --short HEAD 2> /dev/null)
MACCORE_REMOTE := origin
MACCORE_BRANCH_AND_REMOTE := $(NEEDED_MACCORE_BRANCH) $(MACCORE_REMOTE)/$(NEEDED_MACCORE_BRANCH)
NEEDED_MACCORE_REMOTE := $(MACCORE_REMOTE)
define CheckVersionTemplate
check-$(1)::
@ -52,27 +49,19 @@ test-$(1)::
@echo " $(2)_MODULE=$($(2)_MODULE)"
@echo " NEEDED_$(2)_VERSION=$(NEEDED_$(2)_VERSION)"
@echo " $(2)_VERSION=$($(2)_VERSION)"
@echo " $(2)_BRANCH_AND_REMOTE=$($(2)_BRANCH_AND_REMOTE)"
@echo " NEEDED_$(2)_BRANCH=$(NEEDED_$(2)_BRANCH)"
@echo " NEEDED_$(2)_REMOTE=$(NEEDED_$(2)_REMOTE)"
@echo " $(2)_BRANCH=$($(2)_BRANCH)"
@echo " $(2)_PATH=$($(2)_PATH) => $(abspath $($(2)_PATH))"
reset-$(1)::
@if test -d $($(2)_PATH); then \
if ! (cd $($(2)_PATH) && git show $(NEEDED_$(2)_VERSION) >/dev/null 2>&1 && git log -1 $(NEEDED_$(2)_REMOTE) >/dev/null 2>&1) ; then \
echo "*** git fetch `basename $$($(2)_PATH)`" && (cd $($(2)_PATH) && git fetch); \
fi; \
else \
echo "*** git clone $($(2)_MODULE) --recursive $($(2)_DIRECTORY) -b $(NEEDED_$(2)_BRANCH)"; \
mkdir -p `dirname $($(2)_PATH)`; \
(cd $(abspath $($(2)_PATH)/..) && git clone $($(2)_MODULE) --recursive $($(2)_DIRECTORY) -b $(NEEDED_$(2)_BRANCH)); \
fi
@if test x$$(IGNORE_$(2)_VERSION) = "x"; then \
echo "*** [$(1)] git checkout -f" $(NEEDED_$(2)_BRANCH) && (cd $($(2)_PATH) && git checkout -f $(NEEDED_$(2)_BRANCH) || git checkout -f -b $($(2)_BRANCH_AND_REMOTE)); \
echo "*** [$(1)] git reset --hard $(NEEDED_$(2)_VERSION)" && (cd $($(2)_PATH) && git reset --hard $(NEEDED_$(2)_VERSION)); \
fi
@echo "*** [$(1)] git submodule update --init --recursive" && (cd $($(2)_PATH) && git submodule update --init --recursive)
$(Q) \
DEPENDENCY_PATH=$($(2)_PATH) \
DEPENDENCY_MODULE=$($(2)_MODULE) \
DEPENDENCY_HASH=$(NEEDED_$(2)_VERSION) \
DEPENDENCY_BRANCH=$(NEEDED_$(2)_BRANCH) \
DEPENDENCY_DIRECTORY=$($(2)_DIRECTORY) \
DEPENDENCY_IGNORE_VERSION=$(IGNORE_$(2)_VERSION) \
$(TOP)/mk/xamarin-reset.sh $(1)
@touch $(THISDIR)/.stamp-reset-$(1)
print-$(1)::

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

@ -154,6 +154,11 @@ 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);
@ -172,6 +177,11 @@ 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");

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

@ -2170,6 +2170,47 @@ namespace Xamarin.BindingMethods.Generator
}
);
data.Add (
new FunctionData {
Comment = " // IntPtr func (NMatrix4, NVector3)",
Prefix = "simd__",
Variants = Variants.NonStret,
ReturnType = Types.IntPtr,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.NMatrix4 },
new ParameterData { TypeData = Types.NVector3 },
},
}
);
data.Add (
new FunctionData {
Comment = " // void func (NMatrix4, NVector3, NVector3, IntPtr)",
Prefix = "simd__",
Variants = Variants.NonStret,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.NMatrix4 },
new ParameterData { TypeData = Types.NVector3 },
new ParameterData { TypeData = Types.NVector3 },
new ParameterData { TypeData = Types.IntPtr },
},
}
);
data.Add (
new FunctionData {
Comment = " // IntPtr func (IntPtr, NMatrix4, NVector3)",
Prefix = "simd__",
Variants = Variants.NonStret,
ReturnType = Types.IntPtr,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.IntPtr },
new ParameterData { TypeData = Types.NMatrix4 },
new ParameterData { TypeData = Types.NVector3 },
},
}
);
data.Add (
new FunctionData {
Comment = " // IntPtr func (MDLVoxelIndexExtent2)",
@ -2443,6 +2484,34 @@ namespace Xamarin.BindingMethods.Generator
}
);
data.Add (
new FunctionData {
Comment = " // NVector3 func (CGPoint, NMatrix4, nint, CGSize)",
Prefix = "simd__",
Variants = Variants.All,
ReturnType = Types.NVector3,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.CGPoint },
new ParameterData { TypeData = Types.NMatrix4 },
new ParameterData { TypeData = Types.NInt },
new ParameterData { TypeData = Types.CGSize },
},
}
);
data.Add (
new FunctionData {
Comment = " // NVector3 func (CGPoint, NMatrix4)",
Prefix = "simd__",
Variants = Variants.All,
ReturnType = Types.NVector3,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.CGPoint },
new ParameterData { TypeData = Types.NMatrix4 },
},
}
);
data.Add (
new FunctionData {
Comment = " // NVector3d func (Double)",

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

@ -470,7 +470,7 @@ namespace AVFoundation {
}
#if !MONOMAC || !XAMCORE_4_0
[NoTV, NoWatch]
[NoTV, Watch (5,0)]
[Native]
public enum AVAudioSessionRecordPermission : ulong {
Undetermined = 1970168948 /*'undt'*/,
@ -873,7 +873,7 @@ namespace AVFoundation {
CannotDoInCurrentContext = 2
}
[TV (11,0), NoWatch, Mac (10,13), iOS (11,0)]
[TV (11,0), Watch (5,0), Mac (10,13), iOS (11,0)]
[Native]
public enum AVAudioSessionRouteSharingPolicy : ulong {
Default = 0,
@ -994,4 +994,12 @@ namespace AVFoundation {
Hdr10 = 0x2,
DolbyVision = 0x4,
}
[Flags]
[Native]
[Watch (5,0), TV (12,0), iOS (12,0), NoMac]
public enum AVAudioSessionActivationOptions : ulong
{
None = 0x0,
}
}

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

@ -400,7 +400,11 @@ namespace AudioToolbox {
// X-Y Recording
XY_X = 206,
XY_Y = 207,
// Binaural Recording
BinauralLeft = 208,
BinauralRight = 209,
// other
HeadphonesLeft = 301,
HeadphonesRight = 302,
@ -451,9 +455,19 @@ namespace AudioToolbox {
HoaAcn13 = (2 << 16) | 13,
HoaAcn14 = (2 << 16) | 14,
HoaAcn15 = (2 << 16) | 15,
HoaAcn65024 = (2 << 16) | 65024
HoaAcn65024 = (2 << 16) | 65024,
}
#if !COREBUILD
public static class AudioChannelLabelExtensions
{
public static bool IsReserved (this AudioChannelLabel value)
{
return (uint)value >= 0xF0000000 && (uint)value <= 0xFFFFFFFE;
}
}
#endif
[Flags]
public enum AudioChannelBit : uint // UInt32 mChannelBitmap in AudioChannelLayout
{
@ -718,6 +732,11 @@ namespace AudioToolbox {
{
return (uint)inLayoutTag & 0x0000FFFF;
}
public static bool IsReserved (this AudioChannelLayoutTag value)
{
return (uint)value >= 0xF0000000 && (uint)value <= 0xFFFFFFFE;
}
}
#endif // !COREBUILD

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

@ -15,8 +15,8 @@ using ObjCRuntime;
namespace CarPlay {
public partial class CPNavigationAlert {
// Defined inside CPNavigationAlert.h
// static NSTimeInterval const CPNavigationAlertMinimumDuration = 10;
public const double MinimumDuration = 10;
// static NSTimeInterval const CPNavigationAlertMinimumDuration = 5;
public const double MinimumDuration = 5;
}
}
#endif // XAMCORE_2_0

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

@ -234,4 +234,13 @@ namespace CloudKit
TensOfGigabytes,
HundredsOfGigabytes,
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Native]
public enum CKShareParticipantRole : long {
Unknown = 0,
Owner = 1,
PrivateUser = 3,
PublicUser = 4,
}
}

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

@ -126,5 +126,7 @@ namespace MonoTouch {
// iOS 12.0
public const string AuthenticationServicesLibrary = "/System/Library/Frameworks/AuthenticationServices.framework/AuthenticationServices";
public const string CarPlayLibrary = "/System/Library/Frameworks/CarPlay.framework/CarPlay";
public const string IdentityLookupUILibrary = "/System/Library/Frameworks/IdentityLookupUI.framework/IdentityLookupUI";
public const string NaturalLanguageLibrary = "/System/Library/Frameworks/Frameworks/NaturalLanguage.framework/NaturalLanguage";
}
}

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

@ -140,5 +140,8 @@ namespace MonoMac {
// macOS 10.14
public const string AdSupportLibrary = "/System/Library/Frameworks/AdSupport.framework/AdSupport";
public const string NaturalLanguageLibrary = "/System/Library/Frameworks/Frameworks/NaturalLanguage.framework/NaturalLanguage";
public const string VideoSubscriberAccountLibrary = "/System/Library/Frameworks/VideoSubscriberAccount.framework/VideoSubscriberAccount";
public const string UserNotificationsLibrary = "/System/Library/Frameworks/UserNotifications.framework/UserNotifications";
}
}

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

@ -75,5 +75,8 @@ namespace ObjCRuntime {
public const string CoreMLLibrary = "/System/Library/Frameworks/CoreML.framework/CoreML";
public const string VisionLibrary = "/System/Library/Frameworks/Vision.framework/Vision";
public const string IOSurfaceLibrary = "/System/Library/Frameworks/IOSurface.framework/IOSurface";
// tvOS 12.0
public const string NaturalLanguageLibrary = "/System/Library/Frameworks/Frameworks/NaturalLanguage.framework/NaturalLanguage";
}
}

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

@ -91,17 +91,16 @@ namespace Contacts {
ContainmentCycle = 202,
ContainmentScope = 203,
ParentRecordDoesNotExist = 204,
RecordIdentifierInvalid = 205,
ValidationMultipleErrors = 300,
ValidationTypeMismatch = 301,
ValidationConfigurationError = 302,
PredicateInvalid = 400,
PolicyViolation = 500,
[iOS (11,0), Mac (10,13)]
ClientIdentifierInvalid = 600,
[iOS (11,0), Mac (10,13)]
ClientIdentifierDoesNotExist = 601,
[iOS (11,0), Mac (10,13)]
VCardMalformed = 700,
VCardSummarizationError = 701,
}
// NSInteger -> CNPostalAddressFormatter.h

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

@ -205,7 +205,7 @@ namespace CoreText {
if (cfArrayRef == IntPtr.Zero)
return new CTFontDescriptor [0];
var matches = NSArray.ArrayFromHandle (cfArrayRef,
fd => new CTFontDescriptor (cfArrayRef, false));
fd => new CTFontDescriptor (fd, false));
CFObject.CFRelease (cfArrayRef);
return matches;
}

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

@ -359,8 +359,11 @@ namespace Foundation {
get {
if (key == null)
throw new ArgumentNullException ("key");
using (var nss = new NSString (key)){
return ObjectForKey (nss);
var nss = NSString.CreateNative (key, false);
try {
return Runtime.GetNSObject (LowlevelObjectForKey (nss));
} finally {
NSString.ReleaseNative (nss);
}
}
set {

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

@ -267,15 +267,22 @@ namespace Foundation {
get {
if (key == null)
throw new ArgumentNullException ("key");
using (var nss = new NSString (key)){
return ObjectForKey (nss);
var nss = NSString.CreateNative (key, false);
try {
return Runtime.GetNSObject (LowlevelObjectForKey (nss));
} finally {
NSString.ReleaseNative (nss);
}
}
set {
if (key == null)
throw new ArgumentNullException ("key");
using (var nss = new NSString (key))
SetObject (value, nss);
var nss = NSString.CreateNative (key, false);
try {
LowlevelSetObject (value, nss);
} finally {
NSString.ReleaseNative (nss);
}
}
}

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

@ -105,6 +105,9 @@ namespace Foundation {
static IntPtr ms = Dlfcn.dlopen (Constants.MetalPerformanceShadersLibrary, 1);
static IntPtr bc = Dlfcn.dlopen (Constants.BusinessChatLibrary, 1);
static IntPtr ad = Dlfcn.dlopen (Constants.AdSupportLibrary, 1);
static IntPtr nl = Dlfcn.dlopen (Constants.NaturalLanguageLibrary, 1);
static IntPtr vs = Dlfcn.dlopen (Constants.VideoSubscriberAccountLibrary, 1);
static IntPtr un = Dlfcn.dlopen (Constants.UserNotificationsLibrary, 1);
#endif
// ** IF YOU ADD ITEMS HERE PLEASE UPDATE linker/ObjCExtensions.cs and mmp/linker/MonoMac.Tuner/MonoMacNamespaces.cs

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

@ -564,4 +564,52 @@ namespace HealthKit
PredictionSubMaxExercise,
PredictionNonExercise,
}
[NoWatch, iOS (12, 0)]
public enum HKFhirResourceType {
[Field ("HKFHIRResourceTypeAllergyIntolerance")]
AllergyIntolerance,
[Field ("HKFHIRResourceTypeCondition")]
Condition,
[Field ("HKFHIRResourceTypeImmunization")]
Immunization,
[Field ("HKFHIRResourceTypeMedicationDispense")]
MedicationDispense,
[Field ("HKFHIRResourceTypeMedicationOrder")]
MedicationOrder,
[Field ("HKFHIRResourceTypeMedicationStatement")]
MedicationStatement,
[Field ("HKFHIRResourceTypeObservation")]
Observation,
[Field ("HKFHIRResourceTypeProcedure")]
Procedure,
}
[Watch (5, 0), iOS (12, 0)]
public enum HKClinicalTypeIdentifier {
[Field ("HKClinicalTypeIdentifierAllergyRecord")]
AllergyRecord,
[Field ("HKClinicalTypeIdentifierConditionRecord")]
ConditionRecord,
[Field ("HKClinicalTypeIdentifierImmunizationRecord")]
ImmunizationRecord,
[Field ("HKClinicalTypeIdentifierLabResultRecord")]
LabResultRecord,
[Field ("HKClinicalTypeIdentifierMedicationRecord")]
MedicationRecord,
[Field ("HKClinicalTypeIdentifierProcedureRecord")]
ProcedureRecord,
[Field ("HKClinicalTypeIdentifierVitalSignRecord")]
VitalSignRecord,
}
[Watch (5,0), iOS (12,0)]
[Native]
public enum HKAuthorizationRequestStatus : long
{
Unknown = 0,
ShouldRequest,
Unnecessary,
}
}

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

@ -0,0 +1,53 @@
//
// IOSurface.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.
//
using System;
using Foundation;
using ObjCRuntime;
namespace IOSurface {
internal static partial class IOSurfacePropertyKey {
static bool CheckSystemVersion ()
{
#if MONOMAC
return PlatformHelper.CheckSystemVersion (10, 14);
#elif TVOS || IOS
return UIKit.UIDevice.CurrentDevice.CheckSystemVersion (12, 0);
#else
#error Unknown platform
#endif
}
public static NSString AllocSizeKey {
get {
if (CheckSystemVersion ())
return _NewAllocSizeKey;
return _DeprecatedAllocSizeKey;
}
}
}
}

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

@ -0,0 +1,26 @@
//
// INPlayMediaIntentResponse.cs
//
// Authors:
// Alex Soto <alexsoto@microsoft.com>
//
// Copyright 2018 Microsoft Corporation.
//
#if XAMCORE_2_0 && !MONOMAC && !WATCH // We must remove !WATCH when MediaPlayer is enabled in watchOS
using System;
using Foundation;
using ObjCRuntime;
using MediaPlayer;
namespace Intents {
public partial class INPlayMediaIntentResponse {
// MPNowPlayingInfo is not a DictionaryContainer but a manual NSDictionary wrapper class.
MPNowPlayingInfo NowPlayingInfo {
get => new MPNowPlayingInfo (WeakNowPlayingInfo);
set => WeakNowPlayingInfo = value?.ToDictionary ();
}
}
}
#endif

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

@ -65,8 +65,8 @@ generator.csproj: generator-ikvm.csproj.in Makefile.generator
-e 's^%IOS_UNIFIED_ARGS%^$(IOS_GENERATOR_FLAGS) -core -sourceonly=$(IOS_BUILD_DIR)/native/generated_sources -compiler=$(IOS_MCS) -nostdlib -noconfig -no-mono-path -tmpdir=$(IOS_BUILD_DIR)/native -d:XAMCORE_2_0 -baselib=$(IOS_BUILD_DIR)/native/core.dll -r=$(MONO_PATH)/mcs/class/lib/monotouch/System.dll -ns=ObjCRuntime -native-exception-marshalling --ns=ObjCRuntime $(xi_native_profile) $(IOS_APIS) --target-framework=Xamarin.iOS,v1.0^' \
-e 's^%TVOS_ARGS%^-inline-selectors -process-enums -warnaserror:$(TVOS_GENERATOR_WARNASERROR) -core -sourceonly=$(TVOS_BUILD_DIR)/tvos/generated_sources -compiler=$(IOS_MCS) -nostdlib -noconfig -no-mono-path -tmpdir=$(TVOS_BUILD_DIR)/tvos -baselib=$(TVOS_BUILD_DIR)/tvos/core.dll -r=$(MONO_PATH)/mcs/class/lib/monotouch_tv/System.dll -ns=ObjCRuntime -native-exception-marshalling -d:TVOS -d:XAMCORE_2_0 -d:XAMCORE_3_0 --ns:ObjCRuntime $(TVOS_APIS) --target-framework=Xamarin.TVOS,v1.0^' \
-e 's^%WATCHOS_ARGS%^-inline-selectors -process-enums -warnaserror:$(WATCH_GENERATOR_WARNASERROR) -core -sourceonly=$(WATCH_BUILD_DIR)/watch/generated_sources -compiler=$(IOS_MCS) -nostdlib -noconfig -no-mono-path -tmpdir=$(WATCH_BUILD_DIR)/watch -baselib=$(WATCH_BUILD_DIR)/watch/core.dll -r=$(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/System.dll -ns=ObjCRuntime -native-exception-marshalling -d:WATCH -d:XAMCORE_2_0 -d:XAMCORE_3_0 --ns:ObjCRuntime $(WATCHOS_APIS) --target-framework=Xamarin.WatchOS,v1.0^' \
-e 's^%MAC_FULL_ARGS%^-d:MONOMAC -d:XAMARIN_MAC -d:XAMCORE_2_0 -compiler:$(MAC_BUILD_DIR)/full/pmcs -process-enums -warnaserror:$(MAC_GENERATOR_WARNASERROR) -native-exception-marshalling -core -sourceonly:$(MAC_BUILD_DIR)/full/generated-sources -tmpdir:$(MAC_BUILD_DIR)/full -baselib:$(MAC_BUILD_DIR)/full/core.dll -d:NO_SYSTEM_DRAWING --ns=ObjCRuntime $(xm_full_profile) $(MAC_APIS)^' \
-e 's^%MAC_MOBILE_ARGS%^-d:MONOMAC -d:XAMARIN_MAC -d:XAMCORE_2_0 -compiler:$(MAC_BUILD_DIR)/mobile/pmcs -process-enums -warnaserror:$(MAC_GENERATOR_WARNASERROR) -native-exception-marshalling -core -sourceonly:$(MAC_BUILD_DIR)/mobile/generated-sources -tmpdir:$(MAC_BUILD_DIR)/mobile -baselib:$(MAC_BUILD_DIR)/mobile/core.dll -d:NO_SYSTEM_DRAWING --ns=ObjCRuntime $(SHARED_SYSTEM_DRAWING_SOURCES) $(xm_mobile_profile) $(MAC_APIS)^' \
-e 's^%MAC_FULL_ARGS%^-d:MONOMAC -d:XAMARIN_MAC -d:XAMCORE_2_0 -d:__UNIFIED__ -compiler:$(MAC_full_CSC) -process-enums -warnaserror:$(MAC_GENERATOR_WARNASERROR) -native-exception-marshalling -core -sourceonly:$(MAC_BUILD_DIR)/full/generated-sources -tmpdir:$(MAC_BUILD_DIR)/full -baselib:$(MAC_BUILD_DIR)/full/core.dll -d:NO_SYSTEM_DRAWING --ns=ObjCRuntime $(xm_full_profile) $(MAC_APIS)^' \
-e 's^%MAC_MOBILE_ARGS%^-d:MONOMAC -d:XAMARIN_MAC -d:XAMCORE_2_0 -d:__UNIFIED__ -compiler:$(MAC_mobile_CSC) -process-enums -warnaserror:$(MAC_GENERATOR_WARNASERROR) -native-exception-marshalling -core -sourceonly:$(MAC_BUILD_DIR)/mobile/generated-sources -tmpdir:$(MAC_BUILD_DIR)/mobile -baselib:$(MAC_BUILD_DIR)/mobile/core.dll -d:NO_SYSTEM_DRAWING --ns=ObjCRuntime $(SHARED_SYSTEM_DRAWING_SOURCES) $(xm_mobile_profile) $(MAC_APIS)^' \
-e 's^%MD_MTOUCH_SDK_ROOT%^$(MD_MTOUCH_SDK_ROOT)^' \
-e 's^%XamarinMacFrameworkRoot%^$(XamarinMacFrameworkRoot)^' \
$< | xmllint --format - > $@

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

@ -0,0 +1,270 @@
// Copyright 2018, Microsoft Corp.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//
using System;
using Foundation;
using ObjCRuntime;
namespace NaturalLanguage {
[Flags]
[Native]
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
public enum NLTaggerOptions : ulong {
OmitWords = 1uL << 0,
OmitPunctuation = 1uL << 1,
OmitWhitespace = 1uL << 2,
OmitOther = 1uL << 3,
JoinNames = 1uL << 4,
JoinContractions = 1uL << 5,
}
[Native]
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
public enum NLModelType : long {
Classifier,
Sequence,
}
[Native]
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
public enum NLTokenUnit : long {
Word,
Sentence,
Paragraph,
Document,
}
[Flags]
[Native]
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
public enum NLTokenizerAttributes : ulong {
Numeric = 1uL << 0,
Symbolic = 1uL << 1,
Emoji = 1uL << 2,
}
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
public enum NLLanguage {
[DefaultEnumValue]
[Field ("NLLanguageUndetermined")]
Undetermined,
[Field ("NLLanguageAmharic")]
Amharic,
[Field ("NLLanguageArabic")]
Arabic,
[Field ("NLLanguageArmenian")]
Armenian,
[Field ("NLLanguageBengali")]
Bengali,
[Field ("NLLanguageBulgarian")]
Bulgarian,
[Field ("NLLanguageBurmese")]
Burmese,
[Field ("NLLanguageCatalan")]
Catalan,
[Field ("NLLanguageCherokee")]
Cherokee,
[Field ("NLLanguageCroatian")]
Croatian,
[Field ("NLLanguageCzech")]
Czech,
[Field ("NLLanguageDanish")]
Danish,
[Field ("NLLanguageDutch")]
Dutch,
[Field ("NLLanguageEnglish")]
English,
[Field ("NLLanguageFinnish")]
Finnish,
[Field ("NLLanguageFrench")]
French,
[Field ("NLLanguageGeorgian")]
Georgian,
[Field ("NLLanguageGerman")]
German,
[Field ("NLLanguageGreek")]
Greek,
[Field ("NLLanguageGujarati")]
Gujarati,
[Field ("NLLanguageHebrew")]
Hebrew,
[Field ("NLLanguageHindi")]
Hindi,
[Field ("NLLanguageHungarian")]
Hungarian,
[Field ("NLLanguageIcelandic")]
Icelandic,
[Field ("NLLanguageIndonesian")]
Indonesian,
[Field ("NLLanguageItalian")]
Italian,
[Field ("NLLanguageJapanese")]
Japanese,
[Field ("NLLanguageKannada")]
Kannada,
[Field ("NLLanguageKhmer")]
Khmer,
[Field ("NLLanguageKorean")]
Korean,
[Field ("NLLanguageLao")]
Lao,
[Field ("NLLanguageMalay")]
Malay,
[Field ("NLLanguageMalayalam")]
Malayalam,
[Field ("NLLanguageMarathi")]
Marathi,
[Field ("NLLanguageMongolian")]
Mongolian,
[Field ("NLLanguageNorwegian")]
Norwegian,
[Field ("NLLanguageOriya")]
Oriya,
[Field ("NLLanguagePersian")]
Persian,
[Field ("NLLanguagePolish")]
Polish,
[Field ("NLLanguagePortuguese")]
Portuguese,
[Field ("NLLanguagePunjabi")]
Punjabi,
[Field ("NLLanguageRomanian")]
Romanian,
[Field ("NLLanguageRussian")]
Russian,
[Field ("NLLanguageSimplifiedChinese")]
SimplifiedChinese,
[Field ("NLLanguageSinhalese")]
Sinhalese,
[Field ("NLLanguageSlovak")]
Slovak,
[Field ("NLLanguageSpanish")]
Spanish,
[Field ("NLLanguageSwedish")]
Swedish,
[Field ("NLLanguageTamil")]
Tamil,
[Field ("NLLanguageTelugu")]
Telugu,
[Field ("NLLanguageThai")]
Thai,
[Field ("NLLanguageTibetan")]
Tibetan,
[Field ("NLLanguageTraditionalChinese")]
TraditionalChinese,
[Field ("NLLanguageTurkish")]
Turkish,
[Field ("NLLanguageUkrainian")]
Ukrainian,
[Field ("NLLanguageUrdu")]
Urdu,
[Field ("NLLanguageVietnamese")]
Vietnamese,
}
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
public enum NLTagScheme {
[Field ("NLTagSchemeTokenType")]
TokenType,
[Field ("NLTagSchemeLexicalClass")]
LexicalClass,
[Field ("NLTagSchemeNameType")]
NameType,
[Field ("NLTagSchemeNameTypeOrLexicalClass")]
NameTypeOrLexicalClass,
[Field ("NLTagSchemeLemma")]
Lemma,
[Field ("NLTagSchemeLanguage")]
Language,
[Field ("NLTagSchemeScript")]
Script,
}
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
public enum NLTag {
[Field ("NLTagWord")]
Word,
[Field ("NLTagPunctuation")]
Punctuation,
[Field ("NLTagWhitespace")]
Whitespace,
[Field ("NLTagOther")]
Other,
[Field ("NLTagNoun")]
Noun,
[Field ("NLTagVerb")]
Verb,
[Field ("NLTagAdjective")]
Adjective,
[Field ("NLTagAdverb")]
Adverb,
[Field ("NLTagPronoun")]
Pronoun,
[Field ("NLTagDeterminer")]
Determiner,
[Field ("NLTagParticle")]
Particle,
[Field ("NLTagPreposition")]
Preposition,
[Field ("NLTagNumber")]
Number,
[Field ("NLTagConjunction")]
Conjunction,
[Field ("NLTagInterjection")]
Interjection,
[Field ("NLTagClassifier")]
Classifier,
[Field ("NLTagIdiom")]
Idiom,
[Field ("NLTagOtherWord")]
OtherWord,
[Field ("NLTagSentenceTerminator")]
SentenceTerminator,
[Field ("NLTagOpenQuote")]
OpenQuote,
[Field ("NLTagCloseQuote")]
CloseQuote,
[Field ("NLTagOpenParenthesis")]
OpenParenthesis,
[Field ("NLTagCloseParenthesis")]
CloseParenthesis,
[Field ("NLTagWordJoiner")]
WordJoiner,
[Field ("NLTagDash")]
Dash,
[Field ("NLTagOtherPunctuation")]
OtherPunctuation,
[Field ("NLTagParagraphBreak")]
ParagraphBreak,
[Field ("NLTagOtherWhitespace")]
OtherWhitespace,
[Field ("NLTagPersonalName")]
PersonalName,
[Field ("NLTagPlaceName")]
PlaceName,
[Field ("NLTagOrganizationName")]
OrganizationName,
}
}

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

@ -0,0 +1,77 @@
// Copyright 2018, Microsoft, Corp.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Linq;
using System.Collections.Generic;
using Foundation;
namespace NaturalLanguage {
public partial class NLLanguageRecognizer {
public static NLLanguage GetDominantLanguage (string @string)
{
var nsstring = NSString.CreateNative (@string);
var nslang = _GetDominantLanguage (nsstring);
var lang = NLLanguage.Undetermined;
if (nslang != null)
lang = NLLanguageExtensions.GetValue (nslang);
NSString.ReleaseNative (nsstring);
nslang.Dispose ();
return lang;
}
public Dictionary<NLLanguage, nuint> GetLanguageHypotheses (nuint maxHypotheses)
{
using (var hypo = GetNativeLanguageHypotheses (maxHypotheses)) {
var result = new Dictionary<NLLanguage, nuint> (hypo.Keys.Length);
foreach (var k in hypo.Keys) {
result[NLLanguageExtensions.GetValue (k)] = hypo[k].NUIntValue;
}
return result;
}
}
public Dictionary<NLLanguage, nuint> LanguageHints
{
get {
var result = new Dictionary<NLLanguage, nuint> (NativeLanguageHints.Keys.Length);
foreach (var k in NativeLanguageHints.Keys) {
result[NLLanguageExtensions.GetValue (k)] = NativeLanguageHints[k].NUIntValue;
}
return result;
}
set {
var i = 0;
var nsKeys = new NSString[value.Keys.Count];
var nsValues = new NSNumber[value.Keys.Count];
foreach (var item in value) {
nsKeys[i] = NLLanguageExtensions.GetConstant (item.Key);
nsValues[i] = new NSNumber (item.Value);
i++;
}
NativeLanguageHints = NSDictionary<NSString, NSNumber>.FromObjectsAndKeys (nsValues, nsKeys, nsKeys.Length);
}
}
}
}

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

@ -11,6 +11,9 @@ using Foundation;
using ObjCRuntime;
namespace OpenGLES {
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.TvOS, 12,0, message: "Use 'Metal' instead.")]
public static class EAGLDrawableProperty {
public static readonly NSString ColorFormat;
public static readonly NSString RetainedBacking;
@ -32,6 +35,8 @@ namespace OpenGLES {
}
}
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.TvOS, 12,0, message: "Use 'Metal' instead.")]
public static class EAGLColorFormat {
public static readonly NSString RGB565;
public static readonly NSString RGBA8;

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

@ -3,6 +3,8 @@ using ObjCRuntime;
namespace OpenGLES {
// NSUInteger -> EAGL.h
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.TvOS, 12,0, message: "Use 'Metal' instead.")]
[Native]
public enum EAGLRenderingAPI : ulong {
OpenGLES1 = 1,

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

@ -109,9 +109,9 @@ namespace Security {
public virtual void Dispose (bool disposing)
#endif
{
if (Handle != IntPtr.Zero){
CFObject.CFRelease (Handle);
Handle = IntPtr.Zero;
if (handle != IntPtr.Zero){
CFObject.CFRelease (handle);
handle = IntPtr.Zero;
}
}

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

@ -50,6 +50,27 @@ namespace SpriteKit
{
return GetEnumerator ();
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
public static SKNode Create (string filename, Type [] types, out NSError error)
{
// Let's fail early.
if (filename == null)
throw new ArgumentNullException (nameof (filename));
if (types == null)
throw new ArgumentNullException (nameof (filename));
if (types.Length == 0)
throw new InvalidOperationException ($"'{nameof (filename)}' length must be greater than zero.");
using (var classes = new NSMutableSet<Class> (types.Length)) {
foreach (var type in types)
classes.Add (new Class (type));
return Create (filename, classes.Handle, out error);
}
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
public static SKNode Create (string filename, NSSet<Class> classes, out NSError error) => Create (filename, classes.Handle, out error);
}
#endif
}

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

@ -5,10 +5,8 @@ using ObjCRuntime;
namespace StoreKit {
partial class SKReceiptRefreshRequest {
#if !MONOMAC || !XAMCORE_2_0
[iOS (7,1)]
[iOS (7,1), Mac (10,14, onlyOn64: true)]
[DllImport (Constants.StoreKitLibrary, EntryPoint = "SKTerminateForInvalidReceipt")]
static extern public void TerminateForInvalidReceipt ();
#endif
}
}

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

@ -0,0 +1,39 @@
//
// SKAdNetworkCompat.cs
//
// Authors:
// Alex Soto <alexsoto@microsoft.com>
//
// Copyright 2018 Microsoft Corporation.
//
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
#if TVOS && !XAMCORE_4_0
namespace StoreKit {
[Obsolete ("Not usable from tvOS and will be removed in the future.")]
[Unavailable (PlatformName.TvOS)]
public class SKAdNetwork : NSObject {
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static readonly IntPtr class_ptr = Class.GetHandle ("SKAdNetwork");
public override IntPtr ClassHandle { get { return class_ptr; } }
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[EditorBrowsable (EditorBrowsableState.Advanced)]
protected SKAdNetwork (NSObjectFlag t) : base (t) { }
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[EditorBrowsable (EditorBrowsableState.Advanced)]
protected internal SKAdNetwork (IntPtr handle) : base (handle) { }
[Obsolete ("Throws a 'NotSupportedException'.")]
[Unavailable (PlatformName.TvOS)]
public static void RegisterAppForAdNetworkAttribution () => throw new NotSupportedException ();
}
}
#endif

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

@ -20,6 +20,43 @@ namespace SystemConfiguration {
// http://developer.apple.com/library/ios/#documentation/SystemConfiguration/Reference/CaptiveNetworkRef/Reference/reference.html
// CaptiveNetwork.h
public static partial class CaptiveNetwork {
#if __TVOS__
// in Xcode 10 the CaptiveNetwork API are marked as prohibited on tvOS
#if !XAMCORE_4_0
[Obsolete ("Always return 'null'.")]
[Unavailable (PlatformName.TvOS)]
public static Foundation.NSString NetworkInfoKeyBSSID => null;
[Obsolete ("Always return 'null'.")]
[Unavailable (PlatformName.TvOS)]
public static Foundation.NSString NetworkInfoKeySSID => null;
[Obsolete ("Always return 'null'.")]
[Unavailable (PlatformName.TvOS)]
public static Foundation.NSString NetworkInfoKeySSIDData => null;
[Obsolete ("Throw a 'NotSupportedException'.")]
[Unavailable (PlatformName.TvOS)]
public static bool MarkPortalOffline (string iface) => throw new NotSupportedException ();
[Obsolete ("Throw a 'NotSupportedException'.")]
[Unavailable (PlatformName.TvOS)]
public static bool MarkPortalOnline (string iface) => throw new NotSupportedException ();
[Obsolete ("Throw a 'NotSupportedException'.")]
[Unavailable (PlatformName.TvOS)]
public static bool SetSupportedSSIDs (string[] ssids) => throw new NotSupportedException ();
[Obsolete ("Throw a 'NotSupportedException'.")]
[Unavailable (PlatformName.TvOS)]
public static StatusCode TryCopyCurrentNetworkInfo (string interfaceName, out Foundation.NSDictionary currentNetworkInfo) => throw new NotSupportedException ();
[Obsolete ("Throw a 'NotSupportedException'.")]
[Unavailable (PlatformName.TvOS)]
public static StatusCode TryGetSupportedInterfaces (out string[] supportedInterfaces) => throw new NotSupportedException ();
#endif
#else
#if !MONOMAC
@ -119,5 +156,6 @@ namespace SystemConfiguration {
return CNSetSupportedSSIDs (arr.Handle);
}
}
#endif // __TVOS__
}
}

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

@ -1851,7 +1851,7 @@ namespace UIKit {
RightToLeft = UIUserInterfaceLayoutDirection.RightToLeft
}
[TV (10,0), NoWatch, NoiOS]
[TV (10,0), NoWatch, iOS (12,0)]
[Native]
public enum UIUserInterfaceStyle : long
{
@ -2253,5 +2253,23 @@ namespace UIKit {
Generic = 1,
}
[iOS (12,0), TV (12,0), NoWatch]
[Native]
public enum UIGraphicsImageRendererFormatRange : long
{
Unspecified = -1,
Automatic = 0,
Extended,
Standard,
}
[iOS (12,0), NoTV, NoWatch]
[Native]
public enum UIPrintErrorCode : long
{
NotAvailableError = 1,
NoContentError,
UnknownImageFormatError,
JobFailedError
}
}

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

@ -7,6 +7,8 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
//
#if !MONOMAC
using System;
using System.Threading.Tasks;
using Foundation;
@ -34,3 +36,4 @@ namespace VideoSubscriberAccount {
}
}
#endif

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

@ -40,7 +40,7 @@ namespace Accounts {
NSString ErrorDomain { get; }
#endif
[iOS (7,0)][Mac (10,14, onlyOn64: true)]
[iOS (7,0)][NoMac]
[Export ("userFullName")]
string UserFullName { get; }
}
@ -84,6 +84,9 @@ namespace Accounts {
[Async]
void SaveAccount (ACAccount account, ACAccountStoreSaveCompletionHandler completionHandler);
#if XAMCORE_4_0
[NoMac] // marked as unavailable in xcode10 beta 2
#endif
[Export ("requestAccessToAccountsWithType:withCompletionHandler:")]
[Availability (Deprecated = Platform.iOS_6_0, Message = "Use 'RequestAccess (ACAccountType, AccountStoreOptions, ACRequestCompletionHandler)' instead.")]
[Async]

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

@ -357,7 +357,7 @@ namespace AppKit {
[Mac (10,9)]
[BaseType (typeof (NSObject))]
interface NSAppearance : NSCoding {
interface NSAppearance : NSSecureCoding {
[DesignatedInitializer]
[Export ("initWithAppearanceNamed:bundle:")]
IntPtr Constructor (string name, [NullAllowed] NSBundle bundle);
@ -3906,6 +3906,10 @@ namespace AppKit {
[Mac (10,10)]
[Static, Export ("quaternaryLabelColor")]
NSColor QuaternaryLabelColor { get; }
[Mac (10, 10)]
[Static, Export ("linkColor", ArgumentSemantic.Strong)]
NSColor LinkColor { get; }
[Mac (10,12)]
[Static]

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

@ -62,7 +62,12 @@ namespace ARKit {
SensorFailed = 102,
CameraUnauthorized = 103,
WorldTrackingFailed = 200,
InvalidReferenceImage = 300
InvalidReferenceImage = 300,
InvalidReferenceObject = 301,
InvalidWorldMap = 302,
InvalidConfiguration = 303,
InsufficientFeatures = 400,
FileIOFailed = 500,
}
[iOS (11,0)]
@ -118,6 +123,25 @@ namespace ARKit {
Vertical = 1 << 1,
}
[iOS (12,0)]
[NoWatch, NoTV, NoMac]
[Native]
public enum AREnvironmentTexturing : long {
None,
Manual,
Automatic,
}
[iOS (12,0)]
[NoWatch, NoTV, NoMac]
[Native]
public enum ARWorldMappingStatus : long {
NotAvailable,
Limited,
Extending,
Mapped,
}
[iOS (11,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof (NSObject))]
@ -127,6 +151,10 @@ namespace ARKit {
[NullAllowed, Export ("identifier")]
NSUuid Identifier { get; }
[iOS (12,0)]
[NullAllowed, Export ("name")]
string Name { get; }
[Export ("transform")]
Matrix4 Transform {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
@ -136,6 +164,11 @@ namespace ARKit {
[Export ("initWithTransform:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
IntPtr Constructor (Matrix4 transform);
[iOS (12,0)]
[Export ("initWithName:transform:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
IntPtr Constructor (string name, Matrix4 transform);
}
[iOS (11,0)]
@ -177,9 +210,20 @@ namespace ARKit {
get;
}
#if !XAMCORE_4_0
[Obsolete ("Use 'Project' instead.")]
[Wrap ("Project (point, orientation, viewportSize)", IsVirtual = true)]
CGPoint GetProjectPoint (Vector3 point, UIInterfaceOrientation orientation, CGSize viewportSize);
#endif
[Export ("projectPoint:orientation:viewportSize:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
CGPoint GetProjectPoint (Vector3 point, UIInterfaceOrientation orientation, CGSize viewportSize);
CGPoint Project (Vector3 point, UIInterfaceOrientation orientation, CGSize viewportSize);
[iOS (12,0)]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
[Export ("unprojectPoint:ontoPlaneWithTransform:orientation:viewportSize:")]
Vector3 Unproject (CGPoint point, Matrix4 planeTransform, UIInterfaceOrientation orientation, CGSize viewportSize);
[Export ("projectionMatrixForOrientation:viewportSize:zNear:zFar:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
@ -220,6 +264,10 @@ namespace ARKit {
[NullAllowed, Export ("rawFeaturePoints", ArgumentSemantic.Strong)]
ARPointCloud RawFeaturePoints { get; }
[iOS (12,0)]
[Export ("worldMappingStatus")]
ARWorldMappingStatus WorldMappingStatus { get; }
[Export ("hitTest:types:")]
ARHitTestResult[] HitTest (CGPoint point, ARHitTestResultType types);
@ -421,6 +469,11 @@ namespace ARKit {
[Export ("hitTest:types:")]
ARHitTestResult[] HitTest (CGPoint point, ARHitTestResultType types);
[iOS (12,0)]
[Export ("unprojectPoint:ontoPlaneWithTransform:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
Vector3 Unproject (CGPoint point, Matrix4 planeTransform);
}
interface IARSCNViewDelegate {}
@ -530,6 +583,17 @@ namespace ARKit {
[Export ("setWorldOrigin:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
void SetWorldOrigin (Matrix4 relativeTransform);
[iOS (12,0)]
[Async]
[Export ("getCurrentWorldMapWithCompletionHandler:")]
void GetCurrentWorldMap (Action<ARWorldMap, NSError> completionHandler);
[iOS (12,0)]
[Async]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
[Export ("createReferenceObjectWithTransform:center:extent:completionHandler:")]
void CreateReferenceObject (Matrix4 transform, Vector3 center, Vector3 extent, Action<ARReferenceObject, NSError> completionHandler);
}
[iOS (11,0)]
@ -591,7 +655,7 @@ namespace ARKit {
[iOS (11,3)]
[Static]
[Export ("supportedVideoFormats", ArgumentSemantic.Strong)]
[Export ("supportedVideoFormats")]
ARVideoFormat[] SupportedVideoFormats { get; }
[iOS (11,3)]
@ -617,12 +681,33 @@ namespace ARKit {
[Export ("autoFocusEnabled")]
bool AutoFocusEnabled { [Bind ("isAutoFocusEnabled")] get; set; }
[iOS (12,0)]
[Export ("environmentTexturing", ArgumentSemantic.Assign)]
AREnvironmentTexturing EnvironmentTexturing { get; set; }
[Export ("planeDetection", ArgumentSemantic.Assign)]
ARPlaneDetection PlaneDetection { get; set; }
[iOS (12,0)]
[NullAllowed, Export ("initialWorldMap", ArgumentSemantic.Strong)]
ARWorldMap InitialWorldMap { get; set; }
[iOS (11,3)]
[NullAllowed, Export ("detectionImages", ArgumentSemantic.Copy)]
NSSet<ARReferenceImage> DetectionImages { get; set; }
[iOS (12,0)]
[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; }
}
[iOS (11,0)]
@ -766,6 +851,9 @@ namespace ARKit {
float NoseSneerLeft { get; set; }
float NoseSneerRight { get; set; }
[iOS (12,0)]
float TongueOut { get; set; }
}
[iOS (11,0)]
@ -926,6 +1014,10 @@ namespace ARKit {
[Field ("ARBlendShapeLocationNoseSneerRight")]
NSString NoseSneerRightKey { get; }
[iOS (12,0)]
[Field ("ARBlendShapeLocationTongueOut")]
NSString TongueOutKey { get; }
}
[iOS (11,0)]
@ -942,6 +1034,27 @@ namespace ARKit {
[Export ("geometry")]
ARFaceGeometry Geometry { get; }
[iOS (12,0)]
[Export ("leftEyeTransform")]
Matrix4 LeftEyeTransform {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
get;
}
[iOS (12,0)]
[Export ("rightEyeTransform")]
Matrix4 RightEyeTransform {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
get;
}
[iOS (12,0)]
[Export ("lookAtPoint")]
Vector3 LookAtPoint {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
get;
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
[Export ("blendShapes")]
NSDictionary WeakBlendShapes { get; }
@ -1023,7 +1136,7 @@ namespace ARKit {
[NoWatch, NoTV, NoMac]
[BaseType (typeof(ARAnchor))]
[DisableDefaultCtor]
interface ARImageAnchor {
interface ARImageAnchor : ARTrackable {
[Export ("referenceImage", ArgumentSemantic.Strong)]
ARReferenceImage ReferenceImage { get; }
}
@ -1045,6 +1158,136 @@ namespace ARKit {
[Export ("primaryLightIntensity")]
nfloat PrimaryLightIntensity { get; }
}
[iOS (12,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof(ARConfiguration))]
interface ARImageTrackingConfiguration {
[Export ("autoFocusEnabled")]
bool AutoFocusEnabled { [Bind ("isAutoFocusEnabled")] get; set; }
[Export ("trackingImages", ArgumentSemantic.Copy)]
NSSet<ARReferenceImage> TrackingImages { get; set; }
[Export ("maximumNumberOfTrackedImages")]
nint MaximumNumberOfTrackedImages { get; set; }
}
[iOS (12,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof(ARConfiguration))]
interface ARObjectScanningConfiguration {
[Export ("autoFocusEnabled")]
bool AutoFocusEnabled { [Bind ("isAutoFocusEnabled")] get; set; }
[Export ("planeDetection", ArgumentSemantic.Assign)]
ARPlaneDetection PlaneDetection { get; set; }
}
[iOS (12,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof(ARAnchor))]
[DisableDefaultCtor]
interface AREnvironmentProbeAnchor {
[Export ("initWithTransform:extent:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
IntPtr Constructor (Matrix4 transform, Vector3 extent);
[Export ("initWithName:transform:extent:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
IntPtr Constructor (string name, Matrix4 transform, Vector3 extent);
[NullAllowed, Export ("environmentTexture", ArgumentSemantic.Strong)]
IMTLTexture EnvironmentTexture { get; }
[Export ("extent")]
Vector3 Extent {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
get;
}
}
[iOS (12,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface ARReferenceObject : NSSecureCoding {
[Export ("initWithArchiveURL:error:")]
IntPtr Constructor (NSUrl archiveUrl, [NullAllowed] out NSError error);
[NullAllowed, Export ("name")]
string Name { get; set; }
[Export ("center")]
Vector3 Center {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
get;
}
[Export ("extent")]
Vector3 Extent {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
get;
}
[Export ("scale")]
Vector3 Scale {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
get;
}
[Export ("rawFeaturePoints", ArgumentSemantic.Strong)]
ARPointCloud RawFeaturePoints { get; }
[Static]
[Export ("referenceObjectsInGroupNamed:bundle:")]
[return: NullAllowed]
NSSet<ARReferenceObject> GetReferenceObjects (string resourceGroupName, [NullAllowed] NSBundle bundle);
[Export ("exportObjectToURL:previewImage:error:")]
bool ExportObject (NSUrl url, [NullAllowed] UIImage previewImage, [NullAllowed] out NSError error);
[Export ("referenceObjectByApplyingTransform:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
ARReferenceObject GetReferenceObject (Matrix4 transform);
[iOS (12,0)]
[Field ("ARReferenceObjectArchiveExtension")]
NSString ArchiveExtension { get; }
}
[iOS (12,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof(ARAnchor))]
[DisableDefaultCtor]
interface ARObjectAnchor {
[Export ("referenceObject", ArgumentSemantic.Strong)]
ARReferenceObject ReferenceObject { get; }
}
[iOS (12,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface ARWorldMap : NSCopying, NSSecureCoding {
[Export ("center")]
Vector3 Center {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
get;
}
[Export ("extent")]
Vector3 Extent {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
get;
}
[Export ("anchors", ArgumentSemantic.Copy)]
ARAnchor[] Anchors { get; set; }
[Export ("rawFeaturePoints", ArgumentSemantic.Strong)]
ARPointCloud RawFeaturePoints { get; }
}
}
#endif // XAMCORE_2_0

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

@ -1023,6 +1023,32 @@ namespace AVFoundation {
[Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)]
[Export ("manualRenderingSampleTime")]
long ManualRenderingSampleTime { get; }
#if !WATCH
[TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0), NoWatch]
[Export ("connectMIDI:to:format:block:")]
void ConnectMidi (AVAudioNode sourceNode, AVAudioNode destinationNode, [NullAllowed] AVAudioFormat format, [NullAllowed] AUMidiOutputEventBlock tapHandler);
[TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0), NoWatch]
[Export ("connectMIDI:toNodes:format:block:")]
void ConnectMidi (AVAudioNode sourceNode, AVAudioNode[] destinationNodes, [NullAllowed] AVAudioFormat format, [NullAllowed] AUMidiOutputEventBlock tapHandler);
#endif
[TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0), NoWatch]
[Export ("disconnectMIDI:from:")]
void DisconnectMidi (AVAudioNode sourceNode, AVAudioNode destinationNode);
[TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0), NoWatch]
[Export ("disconnectMIDI:fromNodes:")]
void DisconnectMidi (AVAudioNode sourceNode, AVAudioNode[] destinationNodes);
[TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0), NoWatch]
[Export ("disconnectMIDIInput:")]
void DisconnectMidiInput (AVAudioNode node);
[TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0), NoWatch]
[Export ("disconnectMIDIOutput:")]
void DisconnectMidiOutput (AVAudioNode node);
}
[NoWatch]
@ -1720,19 +1746,22 @@ namespace AVFoundation {
[iOS (6,0)]
[Export ("channelAssignments", ArgumentSemantic.Copy), NullAllowed]
AVAudioSessionChannelDescription [] ChannelAssignments { get; set; }
#endif
[iOS (6,0)]
[Mac (10,14, onlyOn64: true)]
[Export ("recordAtTime:")]
bool RecordAt (double time);
[iOS (6,0)]
[Mac (10,14, onlyOn64: true)]
[Export ("recordAtTime:forDuration:")]
bool RecordAt (double time, double duration);
[iOS (6,0)]
[Mac (10,14, onlyOn64: true)]
[Export ("deviceCurrentTime")]
double DeviceCurrentTime { get; }
#endif
[iOS (10,0), Mac (10,12)]
[Export ("format")]
AVAudioFormat Format { get; }
@ -1896,6 +1925,10 @@ namespace AVFoundation {
[Field ("AVAudioSessionModeGameChat")]
NSString ModeGameChat { get; }
[Watch (5, 0), TV (12, 0), NoMac, iOS (12, 0)]
[Field ("AVAudioSessionModeVoicePrompt")]
NSString VoicePrompt { get; }
[iOS (6,0)]
[Export ("setActive:withOptions:error:")]
bool SetActive (bool active, AVAudioSessionSetActiveOptions options, out NSError outError);
@ -2196,8 +2229,8 @@ namespace AVFoundation {
NSString PolarPatternSubcardioid { get; }
// 8.0
[NoTV, NoWatch]
[iOS (8,0)]
[NoTV]
[iOS (8,0), Watch (5,0)]
[Export ("recordPermission")]
AVAudioSessionRecordPermission RecordPermission { get; }
@ -2214,13 +2247,18 @@ namespace AVFoundation {
[Export ("setAggregatedIOPreference:error:")]
bool SetAggregatedIOPreference (AVAudioSessionIOType ioType, out NSError error);
[TV (11,0), NoWatch, iOS (11,0), NoMac]
[TV (11,0), Watch (5,0), iOS (11,0), NoMac]
[Export ("setCategory:mode:routeSharingPolicy:options:error:")]
bool SetCategory (string category, string mode, AVAudioSessionRouteSharingPolicy policy, AVAudioSessionCategoryOptions options, [NullAllowed] out NSError outError);
[TV (11, 0), NoWatch, iOS (11, 0), NoMac]
[TV (11, 0), Watch (5,0), iOS (11, 0), NoMac]
[Export ("routeSharingPolicy")]
AVAudioSessionRouteSharingPolicy RouteSharingPolicy { get; }
[Async]
[Watch (5,0), NoTV, NoMac, NoiOS]
[Export ("activateWithOptions:completionHandler:")]
void Activate (AVAudioSessionActivationOptions options, Action<NSError> handler);
}
[iOS (6,0)]
@ -2975,17 +3013,17 @@ namespace AVFoundation {
[Notification, Field ("AVAssetMediaSelectionGroupsDidChangeNotification")]
NSString MediaSelectionGroupsDidChangeNotification { get; }
#if MONOMAC
[Mac (10,11)]
[TV (12, 0), NoWatch, iOS (12, 0)]
[Field ("AVAssetContainsFragmentsDidChangeNotification")]
[Notification]
NSString ContainsFragmentsDidChangeNotification { get; }
[Mac (10,11)]
[TV (12, 0), NoWatch, iOS (12, 0)]
[Field ("AVAssetWasDefragmentedNotification")]
[Notification]
NSString WasDefragmentedNotification { get; }
#endif
[iOS (10, 2), Mac (10,12,2), TV (10, 2)]
[Export ("overallDurationHint")]
@ -2996,16 +3034,24 @@ namespace AVFoundation {
AVMediaSelection[] AllMediaSelections { get; }
}
#if MONOMAC
#if !WATCH
interface IAVFragmentMinding {}
[Protocol]
[Mac (10,11)]
[iOS (12, 0), TV (12,0)]
interface AVFragmentMinding {
#if !MONOMAC || XAMCORE_4_0
[Abstract] // not kept in Mac OS because is a breaking change, in other paltforms we are ok
#endif
[Export ("isAssociatedWithFragmentMinder")]
bool IsAssociatedWithFragmentMinder ();
}
[Mac (10,11)]
[iOS (12, 0), TV (12,0)]
[DisableDefaultCtor]
[BaseType (typeof (AVUrlAsset))]
interface AVFragmentedAsset : AVFragmentMinding {
@ -3022,6 +3068,7 @@ namespace AVFoundation {
}
[Mac (10,11)]
[iOS (12, 0), TV (12,0)]
[Category]
[BaseType (typeof(AVFragmentedAsset))]
interface AVFragmentedAsset_AVFragmentedAssetTrackInspection {
@ -3045,6 +3092,7 @@ namespace AVFoundation {
}
[Mac (10,11)]
[iOS (12,0), TV (12,0)]
[BaseType (typeof(NSObject))]
interface AVFragmentedAssetMinder {
@ -3052,6 +3100,10 @@ namespace AVFoundation {
[Export ("fragmentedAssetMinderWithAsset:mindingInterval:")]
AVFragmentedAssetMinder FromAsset (AVAsset asset, double mindingInterval);
[Mac (10,14, onlyOn64: true)]
[Export ("initWithAsset:mindingInterval:")]
IntPtr Constructor (IAVFragmentMinding asset, double mindingInterval);
[Export ("mindingInterval")]
double MindingInterval { get; set; }
@ -3066,11 +3118,16 @@ namespace AVFoundation {
}
[Mac (10,11)]
[iOS (12,0), TV (12,0)]
[DisableDefaultCtor]
[BaseType (typeof (AVAssetTrack))]
interface AVFragmentedAssetTrack {
}
#endif
#if MONOMAC
interface IAVCaptureFileOutputDelegate {}
[Protocol, Model]
@ -3777,11 +3834,11 @@ namespace AVFoundation {
[iOS (9,0)]
[Export ("persistentContentKeyFromKeyVendorResponse:options:error:")]
NSData GetPersistentContentKey (NSData keyVendorResponse, [NullAllowed] NSDictionary<NSString,NSObject> options, out NSError error);
#endif
[iOS (9,0)]
[iOS (9,0), Mac (10, 14, onlyOn64: true)]
[Field ("AVAssetResourceLoadingRequestStreamingContentKeyRequestRequiresPersistentKey")]
NSString StreamingContentKeyRequestRequiresPersistentKey { get; }
#endif
[iOS (7,0), Mac (10, 9)]
[Export ("isCancelled")]
@ -3806,6 +3863,10 @@ namespace AVFoundation {
[iOS (7,0), Mac (10, 9)]
[Export ("finishLoading")]
void FinishLoading ();
[TV (12, 0), Mac (10, 14, onlyOn64: true), iOS (12, 0)]
[Export ("requestor")]
AVAssetResourceLoadingRequestor Requestor { get; }
}
[NoWatch]
@ -7225,6 +7286,14 @@ namespace AVFoundation {
// 5.0
[Export ("insertTimeRanges:ofTracks:atTime:error:")]
bool InsertTimeRanges (NSValue[] cmTimeRanges, AVAssetTrack [] tracks, CMTime startTime, out NSError error);
[TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("addTrackAssociationToTrack:type:")]
void AddTrackAssociation (AVCompositionTrack compositionTrack, string trackAssociationType);
[TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("removeTrackAssociationToTrack:type:")]
void RemoveTrackAssociation (AVCompositionTrack compositionTrack, string trackAssociationType);
}
[NoWatch]
@ -7730,10 +7799,11 @@ namespace AVFoundation {
[Export ("animationTool", ArgumentSemantic.Retain), NullAllowed]
AVVideoCompositionCoreAnimationTool AnimationTool { get; }
#if !MONOMAC
[Mac (10,14, onlyOn64: true)]
[Export ("renderScale")]
float RenderScale { get; [NotImplemented] set; } // defined as 'float'
#endif
[Export ("isValidForAsset:timeRange:validationDelegate:")]
bool IsValidForAsset ([NullAllowed] AVAsset asset, CMTimeRange timeRange, [Protocolize] [NullAllowed] AVVideoCompositionValidationHandling validationDelegate);
@ -7828,10 +7898,11 @@ namespace AVFoundation {
[NullAllowed] // by default this property is null
[Export ("animationTool", ArgumentSemantic.Retain)]
AVVideoCompositionCoreAnimationTool AnimationTool { get; set; }
#if !MONOMAC
[Mac (10,14, onlyOn64: true)]
[Export ("renderScale")]
float RenderScale { get; set; } // defined as 'float'
#endif
[Static, Export ("videoComposition")]
AVMutableVideoComposition Create ();
@ -8145,15 +8216,18 @@ namespace AVFoundation {
[Field ("AVCaptureSessionDidStopRunningNotification")]
[Notification]
NSString DidStopRunningNotification { get; }
#if !MONOMAC
[Field ("AVCaptureSessionWasInterruptedNotification")]
[Notification]
NSString WasInterruptedNotification { get; }
[Mac (10, 14, onlyOn64: true)]
[Field ("AVCaptureSessionInterruptionEndedNotification")]
[Notification]
NSString InterruptionEndedNotification { get; }
[Mac (10, 14, onlyOn64: true)]
[Field ("AVCaptureSessionWasInterruptedNotification")]
[Notification]
NSString WasInterruptedNotification { get; }
#if !MONOMAC
[iOS (9,0)]
[Field ("AVCaptureSessionInterruptionReasonKey")]
NSString InterruptionReasonKey { get; }
@ -8430,6 +8504,9 @@ namespace AVFoundation {
[Export ("initWithDevice:error:")]
IntPtr Constructor (AVCaptureDevice device, out NSError error);
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("unifiedAutoExposureDefaultsEnabled")]
bool UnifiedAutoExposureDefaultsEnabled { get; set; }
}
#if MONOMAC
@ -9075,6 +9152,14 @@ namespace AVFoundation {
[iOS (11, 0)]
[NullAllowed, Export ("embeddedThumbnailPhotoFormat", ArgumentSemantic.Copy)]
NSDictionary EmbeddedThumbnailPhotoFormat { get; set; }
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("portraitEffectsMatteDeliveryEnabled")]
bool PortraitEffectsMatteDeliveryEnabled { [Bind ("isPortraitEffectsMatteDeliveryEnabled")] get; set; }
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("embedsPortraitEffectsMatteInPhoto")]
bool EmbedsPortraitEffectsMatteInPhoto { get; set; }
}
#if !MONOMAC
@ -9139,6 +9224,10 @@ namespace AVFoundation {
[iOS (11, 0)]
[Export ("expectedPhotoCount")]
nuint ExpectedPhotoCount { get; }
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("portraitEffectsMatteDimensions")]
CMVideoDimensions PortraitEffectsMatteDimensions { get; }
}
#if !MONOMAC
@ -9320,6 +9409,14 @@ namespace AVFoundation {
[iOS (11, 0)]
[Export ("cameraCalibrationDataDeliverySupported")]
bool CameraCalibrationDataDeliverySupported { [Bind ("isCameraCalibrationDataDeliverySupported")] get; }
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("portraitEffectsMatteDeliverySupported")]
bool PortraitEffectsMatteDeliverySupported { [Bind ("isPortraitEffectsMatteDeliverySupported")] get; }
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("portraitEffectsMatteDeliveryEnabled")]
bool PortraitEffectsMatteDeliveryEnabled { [Bind ("isPortraitEffectsMatteDeliveryEnabled")] get; set; }
}
#endif
@ -9355,6 +9452,10 @@ namespace AVFoundation {
[iOS (10,0), Mac (10,7)]
[Export ("setOutputSettings:forConnection:")]
void SetOutputSettings (NSDictionary outputSettings, AVCaptureConnection connection);
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Export ("supportedOutputSettingsKeysForConnection:")]
string[] GetSupportedOutputSettingsKeys (AVCaptureConnection connection);
}
[NoTV]
@ -9467,7 +9568,7 @@ namespace AVFoundation {
BuiltInTrueDepthCamera,
}
[NoTV, iOS (7,0), NoMac, NoWatch] // matches API that uses it.
[NoTV, iOS (7,0), Mac (10,14, onlyOn64: true), NoWatch] // matches API that uses it.
enum AVAuthorizationMediaType {
Video,
Audio,
@ -9677,21 +9778,6 @@ namespace AVFoundation {
[Export ("smoothAutoFocusEnabled")]
bool SmoothAutoFocusEnabled { [Bind ("isSmoothAutoFocusEnabled")] get; set; }
[iOS (7,0)]
[Static, Export ("authorizationStatusForMediaType:")]
AVAuthorizationStatus GetAuthorizationStatus (NSString avMediaTypeToken);
// Calling this method with any media type other than AVMediaTypeVideo or AVMediaTypeAudio raises an exception.
[iOS (7,0)]
[Static]
[Wrap ("GetAuthorizationStatus (mediaType == AVAuthorizationMediaType.Video ? AVMediaTypes.Video.GetConstant () : AVMediaTypes.Audio.GetConstant ())")]
AVAuthorizationStatus GetAuthorizationStatus (AVAuthorizationMediaType mediaType);
[iOS (7,0)]
[Static, Export ("requestAccessForMediaType:completionHandler:")]
[Async]
void RequestAccessForMediaType (NSString avMediaTypeToken, AVRequestAccessStatus completion);
// Either AVMediaTypeVideo or AVMediaTypeAudio.
[iOS (7,0)]
[Static]
@ -9700,6 +9786,24 @@ namespace AVFoundation {
void RequestAccessForMediaType (AVAuthorizationMediaType mediaType, AVRequestAccessStatus completion);
#endif
[iOS (7,0)]
[Mac (10,14, onlyOn64: true)]
[Static, Export ("requestAccessForMediaType:completionHandler:")]
[Async]
void RequestAccessForMediaType (NSString avMediaTypeToken, AVRequestAccessStatus completion);
// Calling this method with any media type other than AVMediaTypeVideo or AVMediaTypeAudio raises an exception.
[iOS (7,0)]
[Mac (10,14, onlyOn64: true)]
[Static]
[Wrap ("GetAuthorizationStatus (mediaType == AVAuthorizationMediaType.Video ? AVMediaTypes.Video.GetConstant () : AVMediaTypes.Audio.GetConstant ())")]
AVAuthorizationStatus GetAuthorizationStatus (AVAuthorizationMediaType mediaType);
[iOS (7,0)]
[Mac (10,14, onlyOn64: true)]
[Static, Export ("authorizationStatusForMediaType:")]
AVAuthorizationStatus GetAuthorizationStatus (NSString avMediaTypeToken);
[iOS (7,0)][Mac (10,7)]
[Export ("activeFormat", ArgumentSemantic.Retain)]
AVCaptureDeviceFormat ActiveFormat { get; set; }
@ -9945,6 +10049,17 @@ namespace AVFoundation {
[Export ("dualCameraSwitchOverVideoZoomFactor")]
nfloat DualCameraSwitchOverVideoZoomFactor { get; }
// From @interface AVCaptureDeviceDepthSupport (AVCaptureDevice)
[NoMac, iOS (12, 0)]
[Export ("activeDepthDataMinFrameDuration", ArgumentSemantic.Assign)]
CMTime ActiveDepthDataMinFrameDuration { get; set; }
// From @interface AVCaptureDeviceExposure (AVCaptureDevice)
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("activeMaxExposureDuration", ArgumentSemantic.Assign)]
CMTime ActiveMaxExposureDuration { get; set; }
#endif
}
@ -10065,6 +10180,11 @@ namespace AVFoundation {
[iOS (11, 0)]
[Export ("unsupportedCaptureOutputClasses")]
Class[] UnsupportedCaptureOutputClasses { get; }
// from @interface AVCaptureDeviceFormatDepthDataAdditions (AVCaptureDeviceFormat)
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[Export ("portraitEffectsMatteStillImageDeliverySupported")]
bool PortraitEffectsMatteStillImageDeliverySupported { [Bind ("isPortraitEffectsMatteStillImageDeliverySupported")] get; }
#endif
}
@ -10284,6 +10404,12 @@ namespace AVFoundation {
[NoWatch, NoTV, NoiOS, Mac (10,13,4)]
[Export ("preferredVideoDecoderGPURegistryID")]
ulong PreferredVideoDecoderGpuRegistryId { get; set; }
// From AVPlayerVideoDisplaySleepPrevention (AVPlayer) Category
[TV (12, 0), NoWatch, Mac (10, 14, onlyOn64: true), iOS (12, 0)]
[Export ("preventsDisplaySleepDuringVideoPlayback")]
bool PreventsDisplaySleepDuringVideoPlayback { get; set; }
}
[NoWatch]
@ -11849,6 +11975,7 @@ namespace AVFoundation {
}
[NoWatch]
[Obsoleted (PlatformName.TvOS, 12, 0)]
[Static, Internal]
interface AVAssetDownloadTaskKeys {
[iOS (9,0)]
@ -11861,6 +11988,7 @@ namespace AVFoundation {
}
[NoWatch]
[Obsoleted (PlatformName.TvOS, 12, 0)]
[StrongDictionary ("AVAssetDownloadTaskKeys")]
interface AVAssetDownloadOptions {
NSNumber MinimumRequiredMediaBitrate { get; set; }
@ -12136,6 +12264,7 @@ namespace AVFoundation {
nuint TimeResolution { get; }
}
[Obsoleted (PlatformName.TvOS, 12,0, message: "All fields will return 'null'.")]
[Watch (3,0)]
[iOS (9,0)][Mac (10,11)]
[Static]
@ -12279,6 +12408,7 @@ namespace AVFoundation {
[Static]
interface AVAudioUnitManufacturerName {
[Obsoleted (PlatformName.TvOS, 12,0, message: "Field will return 'null'.")]
[Field ("AVAudioUnitManufacturerNameApple")]
[Mac (10,10), iOS (9,0)]
NSString Apple { get; }
@ -12386,6 +12516,14 @@ namespace AVFoundation {
[NoWatch, NoTV, NoMac, iOS (11,0)]
[Export ("contentKeySession:didUpdatePersistableContentKey:forContentKeyIdentifier:")]
void DidUpdate (AVContentKeySession session, NSData persistableContentKey, NSObject keyIdentifier);
[TV (12,0), NoWatch, Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("contentKeySession:contentKeyRequestDidSucceed:")]
void DidSucceed (AVContentKeySession session, AVContentKeyRequest keyRequest);
[TV (12,0), NoWatch, Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("contentKeySessionDidGenerateExpiredSessionReport:")]
void DidGenerateExpiredSessionReport (AVContentKeySession session);
}
partial interface IAVContentKeyRecipient {}
@ -12571,6 +12709,28 @@ namespace AVFoundation {
bool MultipleRoutesDetected { get; }
}
interface IAVCapturePhotoFileDataRepresentationCustomizer {}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Protocol]
interface AVCapturePhotoFileDataRepresentationCustomizer
{
[Export ("replacementMetadataForPhoto:")]
[return: NullAllowed]
NSDictionary<NSString, NSObject> GetReplacementMetadata (AVCapturePhoto photo);
[Export ("replacementEmbeddedThumbnailPixelBufferWithPhotoFormat:forPhoto:")]
[return: NullAllowed]
CVPixelBuffer GetReplacementEmbeddedThumbnail ([NullAllowed] out NSDictionary<NSString, NSObject> replacementEmbeddedThumbnailPhotoFormatOut, AVCapturePhoto photo);
[Export ("replacementDepthDataForPhoto:")]
[return: NullAllowed]
AVDepthData GetReplacementDepthData (AVCapturePhoto photo);
[Export ("replacementPortraitEffectsMatteForPhoto:")]
[return: NullAllowed]
AVPortraitEffectsMatte GetReplacementPortraitEffectsMatte (AVCapturePhoto photo);
}
[NoTV, iOS (11,0), NoWatch, NoMac]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
@ -12652,5 +12812,51 @@ namespace AVFoundation {
[iOS (11, 0)]
[NullAllowed, Export ("previewCGImageRepresentation")]
CGImage PreviewCGImageRepresentation { get; }
[NoWatch, NoTV, NoMac, iOS (12, 0)]
[NullAllowed, Export ("portraitEffectsMatte")]
AVPortraitEffectsMatte PortraitEffectsMatte { get; }
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Export ("fileDataRepresentationWithCustomizer:")]
[return: NullAllowed]
NSData GetFileDataRepresentation (IAVCapturePhotoFileDataRepresentationCustomizer customizer);
}
[NoWatch, TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface AVPortraitEffectsMatte
{
[Static]
[Export ("portraitEffectsMatteFromDictionaryRepresentation:error:")]
[return: NullAllowed]
AVPortraitEffectsMatte Create (NSDictionary imageSourceAuxDataInfoDictionary, [NullAllowed] out NSError outError);
[Export ("portraitEffectsMatteByApplyingExifOrientation:")]
AVPortraitEffectsMatte Create (CGImagePropertyOrientation exifOrientation);
[Export ("portraitEffectsMatteByReplacingPortraitEffectsMatteWithPixelBuffer:error:")]
[return: NullAllowed]
AVPortraitEffectsMatte Create (CVPixelBuffer pixelBuffer, [NullAllowed] out NSError outError);
[Export ("dictionaryRepresentationForAuxiliaryDataType:")]
[return: NullAllowed]
NSDictionary GetDictionaryRepresentation ([NullAllowed] out string outAuxDataType);
[Export ("pixelFormatType")]
uint PixelFormatType { get; }
[Export ("mattingImage")]
CVPixelBuffer MattingImage { get; }
}
[NoWatch, TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface AVAssetResourceLoadingRequestor
{
[Export ("providesExpiredSessionReports")]
bool ProvidesExpiredSessionReports { get; }
}
}

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

@ -370,7 +370,7 @@ namespace AVKit {
[Mac (10,9)]
[Export ("flashChapterNumber:chapterTitle:")]
void FlashChapter (nuint chapterNumber, string chapterTitle);
void FlashChapter (nuint chapterNumber, [NullAllowed] string chapterTitle);
[Mac (10,9)]
[Export ("showsFrameSteppingButtons")]

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

@ -45,24 +45,17 @@ namespace CarPlay {
[Flags, NoWatch, NoTV, NoMac, iOS (12,0)]
[Native]
enum CPPanDirection : ulong {
enum CPPanDirection : long {
None = 0,
Left = 1uL << 0,
Right = 1uL << 1,
Up = 1uL << 2,
Down = 1uL << 3,
Left = 1L << 0,
Right = 1L << 1,
Up = 1L << 2,
Down = 1L << 3,
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Native]
enum CPNavigationAlertPriority : ulong {
Default = 0,
High,
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Native]
public enum CPNavigationAlertDismissalContext : ulong {
enum CPNavigationAlertDismissalContext : ulong {
Timeout = 0,
UserDismissed,
SystemDismissed,
@ -70,7 +63,7 @@ namespace CarPlay {
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Native]
public enum CPTripPauseReason : ulong {
enum CPTripPauseReason : ulong {
Arrived = 1,
Loading = 2,
Locating = 3,
@ -86,17 +79,47 @@ namespace CarPlay {
Lists = 1uL << 1,
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Flags]
[Native]
enum CPManeuverDisplayStyle : long {
Default,
LeadingSymbol,
TrailingSymbol,
SymbolOnly,
InstructionOnly,
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Native]
enum CPTimeRemainingColor : ulong {
Default = 0,
Green,
Orange,
Red,
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Native]
enum CPTripEstimateStyle : ulong {
Light = 0,
Dark,
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CPAlert : NSSecureCoding {
[Export ("initWithTitleVariants:style:actions:")]
IntPtr Constructor (string [] title, CPAlertStyle style, CPAlertAction [] actions);
[Export ("initWithTitleVariants:message:style:actions:")]
IntPtr Constructor (string [] titleVariants, [NullAllowed] string message, CPAlertStyle style, CPAlertAction [] actions);
[Export ("titleVariants", ArgumentSemantic.Copy)]
string [] TitleVariants { get; }
[NullAllowed, Export ("message")]
string Message { get; }
[Export ("style")]
CPAlertStyle Style { get; }
@ -265,11 +288,11 @@ namespace CarPlay {
[Abstract]
[Export ("application:didConnectCarInterfaceController:toWindow:")]
void DidConnectCarInterfaceController (UIApplication application, CPInterfaceController interfaceController, UIWindow window);
void DidConnectCarInterfaceController (UIApplication application, CPInterfaceController interfaceController, CPMapContentWindow window);
[Abstract]
[Export ("application:didDisconnectCarInterfaceController:fromWindow:")]
void DidDisconnectCarInterfaceController (UIApplication application, CPInterfaceController interfaceController, UIWindow window);
void DidDisconnectCarInterfaceController (UIApplication application, CPInterfaceController interfaceController, CPMapContentWindow window);
[Export ("application:didSelectNavigationAlert:")]
void DidSelectNavigationAlert (UIApplication application, CPNavigationAlert navigationAlert);
@ -373,14 +396,17 @@ namespace CarPlay {
[BaseType (typeof (NSObject))]
interface CPManeuver : NSCopying, NSSecureCoding {
[NullAllowed, Export ("symbol", ArgumentSemantic.Strong)]
UIImage Symbol { get; set; }
[NullAllowed, Export ("symbolSet", ArgumentSemantic.Strong)]
CPImageSet SymbolSet { get; set; }
[Export ("instructionVariants", ArgumentSemantic.Copy)]
string [] InstructionVariants { get; set; }
[NullAllowed, Export ("distanceFromPreviousManeuver", ArgumentSemantic.Copy)]
NSMeasurement<NSUnitLength> DistanceFromPreviousManeuver { get; set; }
[NullAllowed, Export ("initialTravelEstimates", ArgumentSemantic.Strong)]
CPTravelEstimates InitialTravelEstimates { get; set; }
[Export ("attributedInstructionVariants", ArgumentSemantic.Copy)]
NSAttributedString [] AttributedInstructionVariants { get; set; }
[NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)]
NSObject UserInfo { get; set; }
@ -410,13 +436,20 @@ namespace CarPlay {
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (CPTemplate))]
[DisableDefaultCtor]
interface CPMapTemplate : CPBarButtonProviding {
[Export ("initWithConfiguration:")]
IntPtr Constructor ([NullAllowed] CPMapTemplateConfiguration configuration);
[Export ("configuration")]
CPMapTemplateConfiguration Configuration { get; }
[Export ("mapButtons", ArgumentSemantic.Strong)]
CPMapButton [] MapButtons { get; set; }
[Export ("showTripPreviews:")]
void ShowTripPreviews (CPTrip [] tripPreviews);
[Export ("showTripPreviews:textConfiguration:")]
void ShowTripPreviews (CPTrip [] tripPreviews, [NullAllowed] CPTripPreviewTextConfiguration textConfiguration);
[Export ("hideTripPreviews")]
void HideTripPreviews ();
@ -424,6 +457,9 @@ namespace CarPlay {
[Export ("updateTravelEstimates:forTrip:")]
void UpdateTravelEstimates (CPTravelEstimates estimates, CPTrip trip);
[Export ("updateTravelEstimates:forTrip:withTimeRemainingColor:")]
void UpdateTravelEstimates (CPTravelEstimates estimates, CPTrip trip, CPTimeRemainingColor timeRemainingColor);
[Export ("startNavigationSessionForTrip:")]
CPNavigationSession StartNavigationSession (CPTrip trip);
@ -446,6 +482,9 @@ namespace CarPlay {
[Export ("dismissPanningInterfaceAnimated:")]
void DismissPanningInterface (bool animated);
[Export ("panningInterfaceVisible")]
bool PanningInterfaceVisible { [Bind ("isPanningInterfaceVisible")] get; }
[NullAllowed, Export ("currentNavigationAlert", ArgumentSemantic.Strong)]
CPNavigationAlert CurrentNavigationAlert { get; }
@ -491,6 +530,15 @@ namespace CarPlay {
[Export ("mapTemplate:panWithDirection:")]
void Pan (CPMapTemplate mapTemplate, CPPanDirection direction);
[Export ("mapTemplateDidBeginPanGesture:")]
void DidBeginPanGesture (CPMapTemplate mapTemplate);
[Export ("mapTemplate:didUpdatePanGestureWithDelta:velocity:")]
void DidUpdatePanGesture (CPMapTemplate mapTemplate, CGPoint delta, CGPoint velocity);
[Export ("mapTemplate:didEndPanGestureWithVelocity:")]
void DidEndPanGesture (CPMapTemplate mapTemplate, CGPoint velocity);
[Export ("mapTemplate:willShowNavigationAlert:")]
void WillShowNavigationAlert (CPMapTemplate mapTemplate, CPNavigationAlert navigationAlert);
@ -511,6 +559,9 @@ namespace CarPlay {
[Export ("mapTemplateDidCancelNavigation:")]
void DidCancelNavigation (CPMapTemplate mapTemplate);
[Export ("mapTemplate:displayStyleForManeuver:")]
CPManeuverDisplayStyle GetDisplayStyle (CPMapTemplate mapTemplate, CPManeuver maneuver);
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
@ -518,11 +569,11 @@ namespace CarPlay {
[DisableDefaultCtor]
interface CPNavigationAlert : NSSecureCoding {
[Export ("initWithTitleVariants:subtitleVariants:image:priority:primaryAction:secondaryAction:duration:")]
IntPtr Constructor (string [] titleVariants, [NullAllowed] string [] subtitleVariants, [NullAllowed] UIImage image, CPNavigationAlertPriority priority, CPAlertAction primaryAction, [NullAllowed] CPAlertAction secondaryAction, double duration);
[Export ("initWithTitleVariants:subtitleVariants:imageSet:primaryAction:secondaryAction:duration:")]
IntPtr Constructor (string [] titleVariants, string [] subtitleVariants, [NullAllowed] CPImageSet imageSet, CPAlertAction primaryAction, [NullAllowed] CPAlertAction secondaryAction, double duration);
[Export ("alertPriority")]
CPNavigationAlertPriority AlertPriority { get; }
[Export ("updateTitleVariants:subtitleVariants:")]
void UpdateTitleVariants (string [] newTitleVariants, string [] newSubtitleVariants);
[Export ("titleVariants", ArgumentSemantic.Copy)]
string [] TitleVariants { get; }
@ -530,8 +581,8 @@ namespace CarPlay {
[Export ("subtitleVariants", ArgumentSemantic.Copy)]
string [] SubtitleVariants { get; }
[NullAllowed, Export ("image", ArgumentSemantic.Copy)]
UIImage Image { get; }
[NullAllowed, Export ("imageSet", ArgumentSemantic.Copy)]
CPImageSet ImageSet { get; }
[Export ("primaryAction", ArgumentSemantic.Strong)]
CPAlertAction PrimaryAction { get; }
@ -543,29 +594,13 @@ namespace CarPlay {
double Duration { get; }
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CPTravelEstimates : NSSecureCoding {
[Export ("initWithDistanceRemaining:timeRemaining:")]
[DesignatedInitializer]
IntPtr Constructor (NSMeasurement<NSUnitLength> distance, double time);
[Export ("distanceRemaining", ArgumentSemantic.Copy)]
NSMeasurement<NSUnitLength> DistanceRemaining { get; }
[Export ("timeRemaining")]
double TimeRemaining { get; }
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CPNavigationSession {
[Export ("pauseTripForReason:")]
void PauseTrip (CPTripPauseReason reason);
[Export ("pauseTripForReason:description:")]
void PauseTrip (CPTripPauseReason reason, [NullAllowed] string description);
[Export ("finishTrip")]
void FinishTrip ();
@ -659,13 +694,16 @@ namespace CarPlay {
[DisableDefaultCtor]
interface CPRouteChoice : NSCopying, NSSecureCoding {
[Export ("initWithSummaryVariants:additionalInformationVariants:")]
[Export ("initWithSummaryVariants:additionalInformationVariants:selectionSummaryVariants:")]
[DesignatedInitializer]
IntPtr Constructor (string [] summaryVariants, string [] additionalInformationVariants);
IntPtr Constructor (string [] summaryVariants, string [] additionalInformationVariants, string [] selectionSummaryVariants);
[Export ("summaryVariants", ArgumentSemantic.Copy)]
string [] SummaryVariants { get; }
[Export ("selectionSummaryVariants", ArgumentSemantic.Copy)]
string [] SelectionSummaryVariants { get; }
[Export ("additionalInformationVariants", ArgumentSemantic.Copy)]
string [] AdditionalInformationVariants { get; }
@ -695,19 +733,116 @@ namespace CarPlay {
NSObject UserInfo { get; set; }
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
interface CPVoiceControlState : NSSecureCoding {
[Export ("initWithIdentifier:titleVariants:image:repeats:")]
IntPtr Constructor (string identifier, [NullAllowed] string [] titleVariants, [NullAllowed] UIImage image, bool repeats);
[NullAllowed, Export ("titleVariants", ArgumentSemantic.Copy)]
string [] TitleVariants { get; }
[NullAllowed, Export ("image", ArgumentSemantic.Strong)]
UIImage Image { get; }
[Export ("identifier")]
string Identifier { get; }
[Export ("repeats")]
bool Repeats { get; }
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (CPTemplate))]
[DisableDefaultCtor]
interface CPVoiceControlTemplate {
[Export ("initWithTitleVariants:animatedImage:")]
IntPtr Constructor (string [] titleVariants, UIImage animatedImage);
[Export ("initWithVoiceControlStates:")]
IntPtr Constructor (CPVoiceControlState [] voiceControlStates);
[Export ("titleVariants", ArgumentSemantic.Copy)]
string [] TitleVariants { get; }
[NullAllowed, Export ("voiceControlStates", ArgumentSemantic.Copy)]
CPVoiceControlState [] VoiceControlStates { get; }
[Export ("animatedImage", ArgumentSemantic.Strong)]
UIImage AnimatedImage { get; }
[Export ("activateVoiceControlStateWithIdentifier:")]
void ActivateVoiceControlState (string identifier);
[NullAllowed, Export ("activeStateIdentifier")]
string ActiveStateIdentifier { get; }
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CPImageSet : NSSecureCoding {
[Export ("initWithLightContentImage:darkContentImage:")]
IntPtr Constructor (UIImage lightImage, UIImage darkImage);
[Export ("lightContentImage")]
UIImage LightContentImage { get; }
[Export ("darkContentImage")]
UIImage DarkContentImage { get; }
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (UIWindow))]
interface CPMapContentWindow {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
[Export ("mapButtonSafeAreaLayoutGuide")]
UILayoutGuide MapButtonSafeAreaLayoutGuide { get; }
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CPMapTemplateConfiguration : NSSecureCoding {
[Export ("initWithGuidanceBackgroundColor:tripEstimateStyle:")]
IntPtr Constructor (UIColor guidanceBackgroundColor, CPTripEstimateStyle tripEstimateStyle);
[Export ("guidanceBackgroundColor")]
UIColor GuidanceBackgroundColor { get; }
[Export ("tripEstimateStyle")]
CPTripEstimateStyle TripEstimateStyle { get; }
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CPTravelEstimates : NSSecureCoding {
[Export ("initWithDistanceRemaining:timeRemaining:")]
[DesignatedInitializer]
IntPtr Constructor (NSMeasurement<NSUnitLength> distance, double time);
[Export ("distanceRemaining", ArgumentSemantic.Copy)]
NSMeasurement<NSUnitLength> DistanceRemaining { get; }
[Export ("timeRemaining")]
double TimeRemaining { get; }
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
interface CPTripPreviewTextConfiguration : NSSecureCoding {
[Export ("initWithStartButtonTitle:additionalRoutesButtonTitle:overviewButtonTitle:")]
IntPtr Constructor ([NullAllowed] string startButtonTitle, [NullAllowed] string additionalRoutesButtonTitle, [NullAllowed] string overviewButtonTitle);
[NullAllowed, Export ("startButtonTitle")]
string StartButtonTitle { get; }
[NullAllowed, Export ("additionalRoutesButtonTitle")]
string AdditionalRoutesButtonTitle { get; }
[NullAllowed, Export ("overviewButtonTitle")]
string OverviewButtonTitle { get; }
}
}

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

@ -92,6 +92,14 @@ namespace CloudKit {
[Export ("rootRecordID", ArgumentSemantic.Copy)]
CKRecordID RootRecordID { get; }
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("participantRole", ArgumentSemantic.Assign)]
CKShareParticipantRole ParticipantRole { get; }
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'ParticipantRole' instead.")]
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'ParticipantRole' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'ParticipantRole' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'ParticipantRole' instead.")]
[Export ("participantType", ArgumentSemantic.Assign)]
CKShareParticipantType Type { get; }
@ -165,6 +173,14 @@ namespace CloudKit {
[Export ("userIdentity", ArgumentSemantic.Strong)]
CKUserIdentity UserIdentity { get; }
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("role", ArgumentSemantic.Assign)]
CKShareParticipantRole Role { get; set; }
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'Role' instead.")]
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'Role' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'Role' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Role' instead.")]
[Export ("type", ArgumentSemantic.Assign)]
CKShareParticipantType Type { get; set; }
@ -653,16 +669,32 @@ namespace CloudKit {
[Export ("init")]
IntPtr Constructor ();
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use the overload with the 'NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration>' parameter instead.")]
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use the overload with the 'NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration>' parameter instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload with the 'NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration>' parameter instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the overload with the 'NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration>' parameter instead.")]
[Export ("initWithRecordZoneIDs:optionsByRecordZoneID:")]
IntPtr Constructor (CKRecordZoneID[] recordZoneIDs, [NullAllowed] NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesOptions> optionsByRecordZoneID);
[iOS (12,0), Watch (5,0), TV (12,0), Mac (10,14, onlyOn64 : true)]
[Export ("initWithRecordZoneIDs:configurationsByRecordZoneID:")]
IntPtr Constructor (CKRecordZoneID[] recordZoneIDs, [NullAllowed] NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration> configurationsByRecordZoneID);
[NullAllowed]
[Export ("recordZoneIDs", ArgumentSemantic.Copy)]
CKRecordZoneID[] RecordZoneIDs { get; set; }
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'ConfigurationsByRecordZoneID' instead.")]
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'ConfigurationsByRecordZoneID' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'ConfigurationsByRecordZoneID' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'ConfigurationsByRecordZoneID' instead.")]
[NullAllowed, Export ("optionsByRecordZoneID", ArgumentSemantic.Copy)]
NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesOptions> OptionsByRecordZoneID { get; set; }
[iOS (12,0), Watch (5,0), TV (12,0), Mac (10,14, onlyOn64 : true)]
[NullAllowed, Export ("configurationsByRecordZoneID", ArgumentSemantic.Copy)]
NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration> ConfigurationsByRecordZoneID { get; set; }
[Export ("fetchAllChanges")]
bool FetchAllChanges { get; set; }
@ -681,7 +713,11 @@ namespace CloudKit {
[NullAllowed, Export ("fetchRecordZoneChangesCompletionBlock", ArgumentSemantic.Copy)]
Action<NSError> ChangesCompleted { get; set; }
}
[Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'CKFetchRecordZoneChangesConfiguration' instead.")]
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'CKFetchRecordZoneChangesConfiguration' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'CKFetchRecordZoneChangesConfiguration' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'CKFetchRecordZoneChangesConfiguration' instead.")]
[iOS (10,0), Watch (3,0), TV (10,0), Mac (10,12, onlyOn64 : true)]
[BaseType (typeof(NSObject))]
interface CKFetchRecordZoneChangesOptions : NSSecureCoding, NSCopying
@ -696,6 +732,20 @@ namespace CloudKit {
string[] DesiredKeys { get; set; }
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof (NSObject))]
interface CKFetchRecordZoneChangesConfiguration : NSSecureCoding, NSCopying {
[NullAllowed, Export ("previousServerChangeToken", ArgumentSemantic.Copy)]
CKServerChangeToken PreviousServerChangeToken { get; set; }
[Export ("resultsLimit")]
nuint ResultsLimit { get; set; }
[NullAllowed, Export ("desiredKeys", ArgumentSemantic.Copy)]
string [] DesiredKeys { get; set; }
}
[iOS (8,0), Mac (10,10, onlyOn64 : true)]
delegate void CKFetchRecordsCompletedHandler (NSDictionary recordsByRecordId, NSError error);

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

@ -5488,4 +5488,22 @@ namespace CoreImage {
[BaseType (typeof (CIFilter))]
interface CISampleNearest {
}
[CoreImageFilter]
[iOS (12,0)]
[TV (12,0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (CIFilter))]
interface CICameraCalibrationLensCorrection {
// FIXME
}
[CoreImageFilter]
[iOS (12,0)]
[TV (12,0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (CIFilter))]
interface CICoreMLModelFilter {
// FIXME
}
}

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

@ -34,6 +34,8 @@ namespace CoreML {
Image = 4,
MultiArray = 5,
Dictionary = 6,
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
Sequence = 7,
}
[Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)]
@ -55,6 +57,22 @@ namespace CoreML {
Int32 = 131072 | 32,
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Native]
public enum MLImageSizeConstraintType : long {
Unspecified = 0,
Enumerated = 2,
Range = 3,
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Native]
public enum MLMultiArrayShapeConstraintType : long {
Unspecified = 1,
Enumerated = 2,
Range = 3,
}
[Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)]
[BaseType (typeof (NSObject))]
interface MLDictionaryFeatureProvider : MLFeatureProvider {
@ -92,6 +110,10 @@ namespace CoreML {
[NullAllowed, Export ("dictionaryConstraint", ArgumentSemantic.Assign)]
MLDictionaryConstraint DictionaryConstraint { get; }
[Watch (5,0),TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[NullAllowed, Export ("sequenceConstraint")]
MLSequenceConstraint SequenceConstraint { get; }
}
interface IMLFeatureProvider { }
@ -138,10 +160,19 @@ namespace CoreML {
[NullAllowed, Export ("imageBufferValue")]
CVPixelBuffer ImageBufferValue { get; }
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[NullAllowed, Export ("sequenceValue")]
MLSequence SequenceValue { get; }
[Static]
[Export ("featureValueWithPixelBuffer:")]
MLFeatureValue Create (CVPixelBuffer value);
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Static]
[Export ("featureValueWithSequence:")]
MLFeatureValue Create (MLSequence sequence);
[Static]
[Export ("featureValueWithInt64:")]
MLFeatureValue Create (long value);
@ -191,6 +222,11 @@ namespace CoreML {
[return: NullAllowed]
IMLFeatureProvider GetPrediction (IMLFeatureProvider input, MLPredictionOptions options, out NSError error);
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("predictionsFromBatch:options:error:")]
[return: NullAllowed]
IMLBatchProvider GetPredictions (IMLBatchProvider inputBatch, MLPredictionOptions options, out NSError error);
// Category MLModel (MLModelCompilation)
[Static]
@ -333,6 +369,10 @@ namespace CoreML {
[Export ("pixelFormatType")]
uint PixelFormatType { get; }
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("sizeConstraint")]
MLImageSizeConstraint SizeConstraint { get; }
}
[Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)]
@ -346,6 +386,10 @@ namespace CoreML {
[Export ("dataType")]
MLMultiArrayDataType DataType { get; }
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("shapeConstraint")]
MLMultiArrayShapeConstraint ShapeConstraint { get; }
}
[Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)]
@ -381,5 +425,138 @@ namespace CoreML {
[Export ("encodeToCommandBuffer:inputs:outputs:error:")]
bool Encode (IMTLCommandBuffer commandBuffer, IMTLTexture[] inputs, IMTLTexture[] outputs, [NullAllowed] out NSError error);
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface MLArrayBatchProvider : MLBatchProvider {
[Export ("array")]
IMLFeatureProvider[] Array { get; }
[Export ("initWithFeatureProviderArray:")]
IntPtr Constructor (IMLFeatureProvider[] array);
[Export ("initWithDictionary:error:")]
IntPtr Constructor (NSDictionary<NSString, NSArray> dictionary, out NSError error);
}
interface IMLBatchProvider {}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Protocol]
interface MLBatchProvider {
[Abstract]
[Export ("count")]
nint Count { get; }
[Abstract]
[Export ("featuresAtIndex:")]
IMLFeatureProvider GetFeatures (nint index);
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject))]
[Protocol, Model (AutoGeneratedName = true)]
interface MLCustomModel {
// [Abstract]
[Export ("initWithModelDescription:parameterDictionary:error:")]
IntPtr Constructor (MLModelDescription modelDescription, NSDictionary<NSString, NSObject> parameters, out NSError error);
[Abstract]
[Export ("predictionFromFeatures:options:error:")]
[return: NullAllowed]
IMLFeatureProvider GetPrediction (IMLFeatureProvider inputFeatures, MLPredictionOptions options, out NSError error);
[Export ("predictionsFromBatch:options:error:")]
[return: NullAllowed]
IMLBatchProvider GetPredictions (IMLBatchProvider inputBatch, MLPredictionOptions options, out NSError error);
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface MLImageSize {
[Export ("pixelsWide")]
nint PixelsWide { get; }
[Export ("pixelsHigh")]
nint PixelsHigh { get; }
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface MLImageSizeConstraint {
[Export ("type")]
MLImageSizeConstraintType Type { get; }
[Export ("pixelsWideRange")]
NSRange PixelsWideRange { get; }
[Export ("pixelsHighRange")]
NSRange PixelsHighRange { get; }
[Export ("enumeratedImageSizes")]
MLImageSize[] EnumeratedImageSizes { get; }
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface MLMultiArrayShapeConstraint {
[Export ("type")]
MLMultiArrayShapeConstraintType Type { get; }
[Export ("sizeRangeForDimension")]
NSValue[] SizeRangeForDimension { get; }
[Export ("enumeratedShapes")]
NSArray<NSNumber>[] EnumeratedShapes { get; }
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface MLSequence {
[Export ("type")]
MLFeatureType Type { get; }
[Static]
[Export ("emptySequenceWithType:")]
MLSequence CreateEmpty (MLFeatureType type);
[Static]
[Export ("sequenceWithStringArray:")]
MLSequence Create (string[] stringValues);
[Export ("stringValues")]
string[] StringValues { get; }
[Static]
[Export ("sequenceWithInt64Array:")]
MLSequence Create (NSNumber[] int64Values);
[Export ("int64Values")]
NSNumber[] Int64Values { get; }
}
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface MLSequenceConstraint : NSCopying {
[Export ("valueDescription")]
MLFeatureDescription ValueDescription { get; }
[Export ("countRange")]
NSRange CountRange { get; }
}
}
#endif // XAMCORE_2_0

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

@ -483,4 +483,88 @@ namespace CoreMotion {
[Export ("type")]
CMPedometerEventType Type { get; }
}
[Watch (5,0), NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CMDyskineticSymptomResult : NSCopying, NSSecureCoding {
[Export ("startDate", ArgumentSemantic.Copy)]
NSDate StartDate { get; }
[Export ("endDate", ArgumentSemantic.Copy)]
NSDate EndDate { get; }
[Export ("percentOffWrist")]
float PercentOffWrist { get; }
[Export ("percentUnlikely")]
float PercentUnlikely { get; }
[Export ("percentLikely")]
float PercentLikely { get; }
}
[Watch (5,0), NoTV, NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CMTremorResult : NSCopying, NSSecureCoding {
[Export ("startDate", ArgumentSemantic.Copy)]
NSDate StartDate { get; }
[Export ("endDate", ArgumentSemantic.Copy)]
NSDate EndDate { get; }
[Export ("percentOffWrist")]
float PercentOffWrist { get; }
[Export ("percentUnknown")]
float PercentUnknown { get; }
[Export ("percentNone")]
float PercentNone { get; }
[Export ("percentSlight")]
float PercentSlight { get; }
[Export ("percentMild")]
float PercentMild { get; }
[Export ("percentModerate")]
float PercentModerate { get; }
[Export ("percentStrong")]
float PercentStrong { get; }
}
[Watch (5,0), NoTV, NoMac, NoiOS]
delegate void CMDyskineticSymptomResultHandler (CMDyskineticSymptomResult [] dyskineticSymptomResult, NSError error);
[Watch (5,0), NoTV, NoMac, NoiOS]
delegate void CMTremorResultHandler (CMTremorResult [] tremorResults, NSError error);
[Watch (5,0), NoTV, NoMac, NoiOS]
[BaseType (typeof (NSObject))]
interface CMMovementDisorderManager {
[Static]
[Export ("isAvailable")]
bool IsAvailable { get; }
[Static]
[Export ("authorizationStatus")]
CMAuthorizationStatus AuthorizationStatus { get; }
[Export ("monitorKinesiasForDuration:")]
void MonitorKinesias (double durationInSeconds);
[Async]
[Export ("queryDyskineticSymptomFromDate:toDate:withHandler:")]
void QueryDyskineticSymptom (NSDate fromDate, NSDate toDate, CMDyskineticSymptomResultHandler handler);
[Async]
[Export ("queryTremorFromDate:toDate:withHandler:")]
void QueryTremor (NSDate fromDate, NSDate toDate, CMTremorResultHandler handler);
}
}

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

@ -296,5 +296,14 @@ namespace CoreNFC {
[Export ("retryInterval")]
double RetryInterval { get; set; }
}
[iOS (12,0)]
[Category]
[BaseType (typeof (NSUserActivity))]
interface NSUserActivity_CoreNFC {
[Export ("ndefMessagePayload")]
NFCNdefMessage GetNdefMessagePayload ();
}
}
#endif

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

@ -279,7 +279,7 @@ namespace CoreWlan {
[Availability (Deprecated = Platform.Mac_10_7, Obsoleted = Platform.Mac_10_9)]
[Static]
[Export ("interfaceWithName:")]
CWInterface FromName (string name);
CWInterface FromName ([NullAllowed]string name);
[Availability (Deprecated = Platform.Mac_10_7, Obsoleted = Platform.Mac_10_9)]
[Export ("isEqualToInterface:")]
@ -373,7 +373,7 @@ namespace CoreWlan {
NSSet _InterfaceNames { get; }
[Export ("initWithInterfaceName:")]
IntPtr Constructor (string name);
IntPtr Constructor ([NullAllowed]string name);
[Export ("setPower:error:")]
bool SetPower (bool power, out NSError error);
@ -493,7 +493,8 @@ namespace CoreWlan {
[Export ("bssid")]
string Bssid { get; }
[NullAllowed]
[Export ("wlanChannel")]
CWChannel WlanChannel { get; }
@ -532,6 +533,7 @@ namespace CoreWlan {
string Ssid { get; }
[Export ("ssidData", ArgumentSemantic.Copy)]
[NullAllowed]
NSData SsidData { get; }
[Export ("security", ArgumentSemantic.Assign)]

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

@ -5125,6 +5125,12 @@ namespace Foundation
[NoWatch, NoTV, NoMac, iOS (11,4)]
[NullAllowed, Export ("contextIdentifierPath", ArgumentSemantic.Strong)]
string[] ContextIdentifierPath { get; }
// From NSUserActivity (IntentsAdditions)
[Watch (5,0), NoTV, NoMac, iOS (12,0)]
[NullAllowed, Export ("suggestedInvocationPhrase")]
string SuggestedInvocationPhrase { get; set; }
}
[iOS (8,0)][Mac (10,10, onlyOn64 : true)] // same as NSUserActivity
@ -8043,7 +8049,7 @@ namespace Foundation
bool HasSuffix (NSString suffix);
// UNUserNotificationCenterSupport category
[iOS (10,0), Watch (3,0), NoTV, NoMac]
[iOS (10,0), Watch (3,0), NoTV, Mac (10,14, onlyOn64: true)]
[Static]
[Export ("localizedUserNotificationStringForKey:arguments:")]
string GetLocalizedUserNotificationString (string key, [Params] [NullAllowed] NSObject [] arguments);

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

@ -828,7 +828,7 @@ GLKIT_SOURCES = \
# HealthKit
HEALTHKIT_CORE_SOURCES = \
HEALTHKIT_API_SOURCES = \
HealthKit/Enums.cs \
HEALTHKIT_SOURCES = \
@ -903,6 +903,7 @@ INTENTS_SOURCES = \
Intents/INRelativeReferenceResolutionResult.cs \
Intents/INRelativeSettingResolutionResult.cs \
Intents/INRideOption.cs \
Intents/INPlayMediaIntentResponse.cs \
Intents/INSaveProfileInCarIntent.cs \
Intents/INSearchCallHistoryIntent.cs \
Intents/INSetCarLockStatusIntent.cs \
@ -927,7 +928,8 @@ IOSURFACE_CORE_SOURCES = \
IOSurface/IODefs.cs
IOSURFACE_SOURCES = \
IOSurface/IOSurface.cs
IOSurface/IOSurface.cs \
IOSurface/IOSurfacePropertyKey.cs \
# JavaScriptCore
@ -1089,6 +1091,14 @@ NETWORK_SOURCES = \
Network/NWProtocolOptions.cs \
Network/NWProtocolStack.cs
# Natural Language
NATURALLANGUAGE_API_SOURCES = \
NaturalLanguage/Enums.cs \
NATURALLANGUAGE_SOURCES = \
NaturalLanguage/NLLanguageRecognizer.cs \
# NetworkExtension
NETWORKEXTENSION_API_SOURCES = \
@ -1357,6 +1367,7 @@ STOREKIT_CORE_SOURCES = \
STOREKIT_SOURCES = \
StoreKit/NativeMethods.cs \
StoreKit/SKAdNetworkCompat.cs \
StoreKit/SKCloudServiceSetupOptions.cs \
StoreKit/SKPayment.cs \
StoreKit/SKPaymentTransactionObserver.cs \
@ -1709,7 +1720,11 @@ MAC_FRAMEWORKS = \
MobileCoreServices \
ModelIO \
MultipeerConnectivity \
<<<<<<< HEAD
Network \
=======
NaturalLanguage \
>>>>>>> xcode10
NetworkExtension \
NotificationCenter \
OpenGL \
@ -1728,6 +1743,8 @@ MAC_FRAMEWORKS = \
Social \
StoreKit \
SystemConfiguration \
UserNotifications \
VideoSubscriberAccount \
VideoToolbox \
Vision \
WebKit \
@ -1779,6 +1796,7 @@ IOS_FRAMEWORKS = \
HealthKitUI \
HomeKit \
IdentityLookup \
IdentityLookupUI \
ImageIO \
Intents \
IntentsUI \
@ -1797,7 +1815,11 @@ IOS_FRAMEWORKS = \
MobileCoreServices \
ModelIO \
MultipeerConnectivity \
<<<<<<< HEAD
Network \
=======
NaturalLanguage \
>>>>>>> xcode10
NetworkExtension \
NewsstandKit \
NotificationCenter \
@ -1886,7 +1908,11 @@ TVOS_FRAMEWORKS = \
MobileCoreServices \
ModelIO \
MultipeerConnectivity \
<<<<<<< HEAD
Network \
=======
NaturalLanguage \
>>>>>>> xcode10
OpenGLES \
Photos \
PhotosUI \
@ -1895,6 +1921,7 @@ TVOS_FRAMEWORKS = \
StoreKit \
SystemConfiguration \
TVMLKit \
TVUIKit \
TVServices \
UIKit \
UserNotifications \

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

@ -90,7 +90,7 @@ namespace GameplayKit {
[iOS (9,0), Mac (10,11, onlyOn64 : true)]
[BaseType (typeof (GKAgent))]
interface GKAgent2D : NSCoding {
interface GKAgent2D : NSSecureCoding {
[Export ("position", ArgumentSemantic.Assign)]
Vector2 Position {

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

@ -172,7 +172,7 @@ public partial class Generator {
case "AVCameraCalibrationData":
case "CGColorSpace":
case "CIBarcodeDescriptor":
print ("return Runtime.GetINativeObject <{0}> (GetHandle (\"{1}\"), true);", propertyType, propertyName);
print ("return Runtime.GetINativeObject <{0}> (GetHandle (\"{1}\"), false);", propertyType, propertyName);
break;
case "CIColor":
print ("return GetColor (\"{0}\");", propertyName);

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

@ -189,6 +189,18 @@ namespace HealthKit {
[Watch (4, 0), iOS (11, 0)]
[Field ("HKPredicateKeyPathWorkoutTotalFlightsClimbed")]
NSString TotalFlightsClimbed { get; }
[Watch (5, 0), iOS (12, 0)]
[Field ("HKPredicateKeyPathSum")]
NSString PathSum { get; }
[NoWatch, iOS (12, 0)]
[Field ("HKPredicateKeyPathClinicalRecordFHIRResourceIdentifier")]
NSString ClinicalRecordFhirResourceIdentifier { get; }
[NoWatch, iOS (12, 0)]
[Field ("HKPredicateKeyPathClinicalRecordFHIRResourceType")]
NSString ClinicalRecordFhirResourceType { get; }
}
[NoWatch] // headers says it's available but it's only usable from another, unavailable, type
@ -344,6 +356,9 @@ namespace HealthKit {
}
delegate void HKHealthStoreGetRequestStatusForAuthorizationToShareHandler (HKAuthorizationRequestStatus requestStatus, NSError error);
delegate void HKHealthStoreRecoverActiveWorkoutSessionHandler (HKWorkoutSession session, NSError error);
[Watch (2,0)]
[iOS (8,0)]
[BaseType (typeof (NSObject))]
@ -492,6 +507,16 @@ namespace HealthKit {
[Notification]
[Field ("HKUserPreferencesDidChangeNotification")]
NSString UserPreferencesDidChangeNotification { get; }
[Async]
[Watch (5,0), iOS (12,0)]
[Export ("getRequestStatusForAuthorizationToShareTypes:readTypes:completion:")]
void GetRequestStatusForAuthorizationToShare (NSSet<HKSampleType> typesToShare, NSSet<HKObjectType> typesToRead, HKHealthStoreGetRequestStatusForAuthorizationToShareHandler completion);
[Async]
[Watch (5,0), NoiOS]
[Export ("recoverActiveWorkoutSessionWithCompletion:")]
void RecoverActiveWorkoutSession (HKHealthStoreRecoverActiveWorkoutSessionHandler completion);
}
delegate void HKStoreSampleAddedCallback (bool success, NSError error);
@ -646,6 +671,18 @@ namespace HealthKit {
[Watch (4,2), iOS (11,2)]
[Export ("ElevationDescended")]
HKQuantity ElevationDescended { get; set; }
[Watch (5,0), iOS (12,0)]
[Export ("FitnessMachineDuration")]
HKQuantity FitnessMachineDuration { get; set; }
[Watch (5, 0), iOS (12, 0)]
[Export ("IndoorBikeDistance")]
HKQuantity IndoorBikeDistance { get; set; }
[Watch (5, 0), iOS (12, 0)]
[Export ("CrossTrainerDistance")]
HKQuantity CrossTrainerDistance { get; set; }
}
[Watch (2,0)]
@ -784,6 +821,18 @@ namespace HealthKit {
[Watch (4,2), iOS (11,2)]
[Field ("HKMetadataKeyElevationDescended")]
NSString ElevationDescended { get; }
[Watch (5,0), iOS (12,0)]
[Field ("HKMetadataKeyFitnessMachineDuration")]
NSString FitnessMachineDuration { get; }
[Watch (5, 0), iOS (12, 0)]
[Field ("HKMetadataKeyIndoorBikeDistance")]
NSString IndoorBikeDistance { get; }
[Watch (5, 0), iOS (12, 0)]
[Field ("HKMetadataKeyCrossTrainerDistance")]
NSString CrossTrainerDistance { get; }
}
[Watch (2,0)]
@ -893,6 +942,16 @@ namespace HealthKit {
[Export ("seriesTypeForIdentifier:")]
[return: NullAllowed]
HKSeriesType GetSeriesType (string identifier);
[Watch (5,0), iOS (12,0)]
[Static, Internal]
[Export ("clinicalTypeForIdentifier:")]
[return: NullAllowed]
HKClinicalType GetClinicalType (NSString identifier);
[Watch (5,0), iOS (12,0)]
[Wrap ("GetClinicalType (identifier.GetConstant ())")]
HKClinicalType GetClinicalType (HKClinicalTypeIdentifier identifier);
}
[Watch (2,0)]
@ -914,6 +973,14 @@ namespace HealthKit {
}
[Watch (5,0)]
[iOS (12,0)]
[BaseType (typeof (HKSampleType))]
[DisableDefaultCtor] // NSInvalidArgumentException Reason: The -init method is not available on HKClinicalType
interface HKClinicalType {
}
[Watch (2,0)]
[iOS (8,0)]
[BaseType (typeof (HKSampleType))]
@ -1008,6 +1075,10 @@ namespace HealthKit {
[Static]
[Export ("quantitySampleWithType:quantity:startDate:endDate:device:metadata:")]
HKQuantitySample FromType (HKQuantityType quantityType, HKQuantity quantity, NSDate startDate, NSDate endDate, [NullAllowed] HKDevice device, [NullAllowed] NSDictionary<NSString,NSObject> metadata);
[Watch (5, 0), iOS (12, 0)]
[Export ("count")]
nint Count { get; }
}
[Watch (2,0)]
@ -1134,6 +1205,28 @@ namespace HealthKit {
[Static]
[Export ("predicateForActivitySummariesBetweenStartDateComponents:endDateComponents:")]
NSPredicate GetPredicateForActivitySummariesBetween (NSDateComponents startDateComponents, NSDateComponents endDateComponents);
// @interface HKClinicalRecordPredicates (HKQuery)
[NoWatch, iOS (12,0)]
[Static, Internal]
[Export ("predicateForClinicalRecordsWithFHIRResourceType:")]
NSPredicate GetPredicateForClinicalRecords (NSString resourceType);
[NoWatch, iOS (12,0)]
[Static]
[Wrap ("GetPredicateForClinicalRecords (resourceType.GetConstant ())")]
NSPredicate GetPredicateForClinicalRecords (HKFhirResourceType resourceType);
[NoWatch, iOS (12,0)]
[Static, Internal]
[Export ("predicateForClinicalRecordsFromSource:FHIRResourceType:identifier:")]
NSPredicate GetPredicateForClinicalRecords (HKSource source, string resourceType, string identifier);
[NoWatch, iOS (12,0)]
[Static]
[Wrap ("GetPredicateForClinicalRecords (source, resourceType.GetConstant (), identifier)")]
NSPredicate GetPredicateForClinicalRecords (HKSource source, HKFhirResourceType resourceType, string identifier);
}
[Watch (2,0)]
@ -1250,6 +1343,24 @@ namespace HealthKit {
[Export ("sumQuantity")]
HKQuantity SumQuantity ();
[Watch (5,0), iOS (12,0)]
[Export ("mostRecentQuantityForSource:")]
[return: NullAllowed]
HKQuantity GetMostRecentQuantity (HKSource source);
[Watch (5, 0), iOS (12, 0)]
[NullAllowed, Export ("mostRecentQuantity")]
HKQuantity MostRecentQuantity { get; }
[Watch (5,0), iOS (12,0)]
[Export ("mostRecentQuantityDateIntervalForSource:")]
[return: NullAllowed]
NSDateInterval GetMostRecentQuantityDateInterval (HKSource source);
[Watch (5, 0), iOS (12, 0)]
[NullAllowed, Export ("mostRecentQuantityDateInterval")]
NSDateInterval MostRecentQuantityDateInterval { get; }
}
delegate void HKStatisticsCollectionEnumerator (HKStatistics result, bool stop);
@ -2305,6 +2416,10 @@ namespace HealthKit {
[Watch (3,0)]
[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);
}
[NoiOS]
@ -2416,12 +2531,12 @@ namespace HealthKit {
NSString TypeIdentifier { get; }
}
delegate void HKWorkoutRouteBuilderAddMetadataHandler (bool success, NSError error);
[Watch (4, 0), iOS (11, 0)]
[BaseType (typeof (HKSeriesBuilder))]
[DisableDefaultCtor]
interface HKWorkoutRouteBuilder {
[Export ("initWithHealthStore:device:")]
[DesignatedInitializer]
IntPtr Constructor (HKHealthStore healthStore, [NullAllowed] HKDevice device);
[Async, Export ("insertRouteData:completion:")]
@ -2432,6 +2547,15 @@ namespace HealthKit {
[Async, Wrap ("FinishRoute (workout, metadata != null ? metadata.Dictionary : null, completion)")]
void FinishRoute (HKWorkout workout, HKMetadata metadata, Action<HKWorkoutRoute, NSError> completion);
[Watch (5, 0), iOS (12, 0)]
[Async, Protected]
[Export ("addMetadata:completion:")]
void AddMetadata (NSDictionary metadata, HKWorkoutRouteBuilderAddMetadataHandler completion);
[Watch (5, 0), iOS (12, 0)]
[Async, Wrap ("AddMetadata (metadata != null ? metadata.Dictionary : null, completion)")]
void AddMetadata (HKMetadata metadata, HKWorkoutRouteBuilderAddMetadataHandler completion);
}
[Watch (4,0), iOS (11,0)]
@ -2442,4 +2566,225 @@ namespace HealthKit {
IntPtr Constructor (HKWorkoutRoute workoutRoute, HKWorkoutRouteBuilderDataHandler dataHandler);
}
delegate void HKWorkoutBuilderCompletionHandler (bool success, NSError error);
[Watch (5,0), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface HKWorkoutBuilder
{
[NullAllowed, Export ("device", ArgumentSemantic.Copy)]
HKDevice Device { get; }
[NullAllowed, Export ("startDate", ArgumentSemantic.Copy)]
NSDate StartDate { get; }
[NullAllowed, Export ("endDate", ArgumentSemantic.Copy)]
NSDate EndDate { get; }
[Export ("workoutConfiguration", ArgumentSemantic.Copy)]
HKWorkoutConfiguration WorkoutConfiguration { get; }
[Protected]
[Export ("metadata", ArgumentSemantic.Copy)]
NSDictionary NativeMetadata { get; }
[Wrap ("NativeMetadata")]
HKMetadata Metadata { get; }
[Export ("workoutEvents", ArgumentSemantic.Copy)]
HKWorkoutEvent[] WorkoutEvents { get; }
[Export ("initWithHealthStore:configuration:device:")]
IntPtr Constructor (HKHealthStore healthStore, HKWorkoutConfiguration configuration, [NullAllowed] HKDevice device);
[Async]
[Export ("beginCollectionWithStartDate:completion:")]
void BeginCollection (NSDate startDate, HKWorkoutBuilderCompletionHandler completionHandler);
[Async]
[Export ("addSamples:completion:")]
void Add (HKSample[] samples, HKWorkoutBuilderCompletionHandler completionHandler);
[Async]
[Export ("addWorkoutEvents:completion:")]
void Add (HKWorkoutEvent[] workoutEvents, HKWorkoutBuilderCompletionHandler completionHandler);
[Async, Protected]
[Export ("addMetadata:completion:")]
void Add (NSDictionary metadata, HKWorkoutBuilderCompletionHandler completionHandler);
[Async]
[Wrap ("Add (metadata.Dictionary, completionHandler)")]
void Add (HKMetadata metadata, HKWorkoutBuilderCompletionHandler completionHandler);
[Async]
[Export ("endCollectionWithEndDate:completion:")]
void EndCollection (NSDate endDate, HKWorkoutBuilderCompletionHandler completionHandler);
[Async]
[Export ("finishWorkoutWithCompletion:")]
void FinishWorkout (HKWorkoutBuilderCompletionHandler completionHandler);
[Export ("discardWorkout")]
void DiscardWorkout ();
[Export ("elapsedTimeAtDate:")]
double GetElapsedTime (NSDate date);
[Export ("statisticsForType:")]
[return: NullAllowed]
HKStatistics GetStatistics (HKQuantityType quantityType);
[Export ("seriesBuilderForType:")]
HKSeriesBuilder GetSeriesBuilder (HKSeriesType seriesType);
}
delegate void HKQuantitySeriesSampleQueryQuantityDelegate (HKQuantitySeriesSampleQuery query, HKQuantity quantity, NSDate date, bool done, NSError error);
[Watch (5,0), iOS (12,0)]
[BaseType (typeof(HKQuery))]
interface HKQuantitySeriesSampleQuery
{
[Export ("initWithSample:quantityHandler:")]
[DesignatedInitializer]
IntPtr Constructor (HKQuantitySample quantitySample, HKQuantitySeriesSampleQueryQuantityDelegate quantityHandler);
}
delegate void HKQuantitySeriesSampleBuilderFinishSeriesDelegate (HKQuantitySample [] samples, NSError error);
[Watch (5,0), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface HKQuantitySeriesSampleBuilder
{
[Export ("initWithHealthStore:quantityType:startDate:device:")]
IntPtr Constructor (HKHealthStore healthStore, HKQuantityType quantityType, NSDate startDate, [NullAllowed] HKDevice device);
[Export ("quantityType", ArgumentSemantic.Copy)]
HKQuantityType QuantityType { get; }
[Export ("startDate", ArgumentSemantic.Copy)]
NSDate StartDate { get; }
[NullAllowed, Export ("device", ArgumentSemantic.Copy)]
HKDevice Device { get; }
[Export ("insertQuantity:date:error:")]
bool Insert (HKQuantity quantity, NSDate date, [NullAllowed] out NSError error);
[Async, Protected]
[Export ("finishSeriesWithMetadata:completion:")]
void FinishSeries ([NullAllowed] NSDictionary metadata, HKQuantitySeriesSampleBuilderFinishSeriesDelegate completionHandler);
[Async]
[Wrap ("FinishSeries (metadata?.Dictionary, completionHandler)")]
void FinishSeries ([NullAllowed] HKMetadata metadata, HKQuantitySeriesSampleBuilderFinishSeriesDelegate completionHandler);
[Export ("discard")]
void Discard ();
}
[Watch (5,0), NoiOS]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface HKLiveWorkoutDataSource
{
[Export ("typesToCollect", ArgumentSemantic.Copy)]
NSSet<HKQuantityType> TypesToCollect { get; }
[Export ("initWithHealthStore:workoutConfiguration:")]
[DesignatedInitializer]
IntPtr Constructor (HKHealthStore healthStore, [NullAllowed] HKWorkoutConfiguration configuration);
[Export ("enableCollectionForType:predicate:")]
void EnableCollection (HKQuantityType quantityType, [NullAllowed] NSPredicate predicate);
[Export ("disableCollectionForType:")]
void DisableCollection (HKQuantityType quantityType);
}
[NoWatch, iOS (12,0)]
[BaseType (typeof (NSObject), Name = "HKFHIRResource")]
[DisableDefaultCtor]
interface HKFhirResource : NSSecureCoding, NSCopying
{
[Internal]
[Export ("resourceType")]
NSString _ResourceType { get; }
HKFhirResourceType ResourceType { [Wrap ("HKFhirResourceTypeExtensions.GetValue (_ResourceType)")] get; }
[Export ("identifier")]
string Identifier { get; }
[Export ("data", ArgumentSemantic.Copy)]
NSData Data { get; }
[NullAllowed, Export ("sourceURL", ArgumentSemantic.Copy)]
NSUrl SourceUrl { get; }
}
[Watch (5,0), iOS (12,0)]
[DisableDefaultCtor]
[BaseType (typeof(HKQuantitySample))]
interface HKCumulativeQuantitySeriesSample
{
[Export ("sum", ArgumentSemantic.Copy)]
HKQuantity Sum { get; }
}
[NoWatch, iOS (12,0)]
[DisableDefaultCtor]
[BaseType (typeof(HKSample))]
interface HKClinicalRecord : NSSecureCoding, NSCopying
{
[Export ("clinicalType", ArgumentSemantic.Copy)]
HKClinicalType ClinicalType { get; }
[Export ("displayName")]
string DisplayName { get; }
[NullAllowed, Export ("FHIRResource", ArgumentSemantic.Copy)]
HKFhirResource FhirResource { get; }
}
interface IHKLiveWorkoutBuilderDelegate {}
[Watch (5,0), NoiOS]
[Protocol, Model]
[BaseType (typeof(NSObject))]
interface HKLiveWorkoutBuilderDelegate
{
[Abstract]
[Export ("workoutBuilder:didCollectDataOfTypes:")]
void DidCollectData (HKLiveWorkoutBuilder workoutBuilder, NSSet<HKSampleType> collectedTypes);
[Abstract]
[Export ("workoutBuilderDidCollectEvent:")]
void DidCollectEvent (HKLiveWorkoutBuilder workoutBuilder);
}
[Watch (5,0), NoiOS]
[DisableDefaultCtor]
[BaseType (typeof(HKWorkoutBuilder))]
interface HKLiveWorkoutBuilder
{
[Wrap ("WeakDelegate")]
[NullAllowed]
IHKLiveWorkoutBuilderDelegate Delegate { get; set; }
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }
[NullAllowed, Export ("workoutSession", ArgumentSemantic.Weak)]
HKWorkoutSession WorkoutSession { get; }
[Export ("shouldCollectWorkoutEvents")]
bool ShouldCollectWorkoutEvents { get; set; }
[NullAllowed, Export ("dataSource", ArgumentSemantic.Strong)]
HKLiveWorkoutDataSource DataSource { get; set; }
[Export ("elapsedTime")]
double ElapsedTime { get; }
}
}

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

@ -714,14 +714,14 @@ namespace HomeKit {
[NoTV]
[NoWatch]
[Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0)]
[Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0, Message = "Use 'ManageUsers' instead.")]
[Async]
[Export ("addUserWithCompletionHandler:")]
void AddUser (Action<HMUser,NSError> completion);
[NoTV]
[NoWatch]
[Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0)]
[Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0, Message = "Use 'ManageUsers' instead.")]
[Async]
[Export ("removeUser:completionHandler:")]
void RemoveUser (HMUser user, Action<NSError> completion);

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

@ -33,6 +33,15 @@ namespace IdentityLookup {
RedundantNetworkDeferral = 5,
}
[iOS (12, 0)]
[Native]
enum ILClassificationAction : long {
None = 0,
ReportNotJunk = 1,
ReportJunk = 2,
ReportJunkAndBlockSender = 3,
}
[iOS (11,0)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject))]
@ -92,5 +101,85 @@ namespace IdentityLookup {
[Export ("data")]
NSData Data { get; }
}
[iOS (12,0)]
[BaseType (typeof (ILClassificationRequest))]
[DisableDefaultCtor]
interface ILCallClassificationRequest : NSSecureCoding {
[Export ("callCommunications", ArgumentSemantic.Copy)]
ILCallCommunication [] CallCommunications { get; }
}
[iOS (12,0)]
[BaseType (typeof (ILCommunication))]
[DisableDefaultCtor]
interface ILCallCommunication {
[Export ("isEqualToCallCommunication:")]
bool IsEqualTo (ILCallCommunication communication);
}
[Abstract]
[iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface ILClassificationRequest : NSSecureCoding {
}
[iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface ILClassificationResponse : NSSecureCoding {
[Export ("action", ArgumentSemantic.Assign)]
ILClassificationAction Action { get; }
// Objects can be NSString, NSNumber, NSArray, NSDictionary, or NSNull
[NullAllowed, Export ("userInfo", ArgumentSemantic.Copy)]
NSDictionary<NSString, NSObject> UserInfo { get; set; }
[Export ("initWithClassificationAction:")]
[DesignatedInitializer]
IntPtr Constructor (ILClassificationAction action);
}
[Abstract]
[iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface ILCommunication : NSSecureCoding {
[NullAllowed, Export ("sender")]
string Sender { get; }
[Export ("dateReceived", ArgumentSemantic.Copy)]
NSDate DateReceived { get; }
[Export ("isEqualToCommunication:")]
bool IsEqualTo (ILCommunication communication);
}
[iOS (12,0)]
[BaseType (typeof (ILClassificationRequest))]
[DisableDefaultCtor]
interface ILMessageClassificationRequest : NSSecureCoding {
[Export ("messageCommunications", ArgumentSemantic.Copy)]
ILMessageCommunication [] MessageCommunications { get; }
}
[iOS (12,0)]
[BaseType (typeof (ILCommunication))]
[DisableDefaultCtor]
interface ILMessageCommunication {
[NullAllowed, Export ("messageBody")]
string MessageBody { get; }
[Export ("isEqualToMessageCommunication:")]
bool IsEqualTo (ILMessageCommunication communication);
}
}
#endif

41
src/identitylookupui.cs Normal file
Просмотреть файл

@ -0,0 +1,41 @@
//
// IdentityLookupUI C# bindings
//
// Authors:
// Alex Soto <alexsoto@microsoft.com>
//
// Copyright 2018 Microsoft Corporation.
//
#if XAMCORE_2_0
using System;
using Foundation;
using ObjCRuntime;
using UIKit;
using IdentityLookup;
namespace IdentityLookupUI {
[iOS (12,0)]
[BaseType (typeof (NSExtensionContext))]
interface ILClassificationUIExtensionContext {
[Export ("readyForClassificationResponse")]
bool ReadyForClassificationResponse { [Bind ("isReadyForClassificationResponse")] get; set; }
}
[iOS (12,0)]
[BaseType (typeof (UIViewController))]
interface ILClassificationUIExtensionViewController {
[Export ("extensionContext", ArgumentSemantic.Strong)]
ILClassificationUIExtensionContext ExtensionContext { get; }
[Export ("prepareForClassificationRequest:")]
void Prepare (ILClassificationRequest request);
[Export ("classificationResponseForRequest:")]
ILClassificationResponse GetClassificationResponse (ILClassificationRequest request);
}
}
#endif

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

@ -10,6 +10,7 @@
#if XAMCORE_2_0 // The Intents framework uses generics which is only supported in Unified
using System;
using System.ComponentModel;
using CoreGraphics;
using Foundation;
using ObjCRuntime;
@ -232,10 +233,26 @@ namespace Intents {
RestrictedIntentsNotSupportedByExtension = 2002,
NoHandlerProvidedForIntent = 2003,
InvalidIntentName = 2004,
NoAppAvailable = 2005,
RequestTimedOut = 3001,
InvalidUserVocabularyFileLocation = 4000,
ExtensionLaunchingTimeout = 5000,
ExtensionBringUpFailed = 5001,
ImageGeneric = 6000,
ImageNoServiceAvailable = 6001,
ImageStorageFailed = 6002,
ImageLoadingFailed = 6003,
ImageRetrievalFailed = 6004,
ImageProxyLoop = 6005,
ImageProxyInvalid = 6006,
ImageProxyTimeout = 6007,
ImageServiceFailure = 6008,
VoiceShortcutCreationFailed = 7000,
VoiceShortcutGetFailed = 7001,
VoiceShortcutDeleteFailed = 7002,
EncodingGeneric = 8000,
EncodingFailed = 8001,
DecodingGeneric = 9000,
}
[iOS (10, 0)]
@ -248,7 +265,9 @@ namespace Intents {
InProgress,
Success,
Failure,
DeferredToApplication
DeferredToApplication,
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
UserConfirmationRequired,
}
[iOS (10, 0)]
@ -396,7 +415,17 @@ namespace Intents {
TransferFilter = (1 << 20),
MonoFilter = (1 << 21),
FadeFilter = (1 << 22),
ProcessFilter = (1 << 23)
ProcessFilter = (1 << 23),
[Watch (5,0), iOS (12,0)]
PortraitPhoto = (1uL << 24),
[Watch (5,0), iOS (12,0)]
LivePhoto = (1uL << 25),
[Watch (5,0), iOS (12,0)]
LoopPhoto = (1uL << 26),
[Watch (5,0), iOS (12,0)]
BouncePhoto = (1uL << 27),
[Watch (5,0), iOS (12,0)]
LongExposurePhoto = (1uL << 28),
}
[iOS (10, 0)]
@ -1154,6 +1183,20 @@ namespace Intents {
MediaVideo,
MediaPass,
MediaAudio,
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
PaymentSent,
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
PaymentRequest,
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
PaymentNote,
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
Animoji,
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
ActivitySnippet,
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
File,
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
Link,
}
[Watch (4,0), NoMac, iOS (11,0)]
@ -1220,6 +1263,8 @@ namespace Intents {
FailureRequiringAppLaunch,
FailureCredentialsUnverified,
FailureAccountNotFound,
FailureTermsAndConditionsAcceptanceRequired,
FailureNotEligible,
}
[Watch (4,0), NoMac, iOS (11,0)]
@ -1239,6 +1284,9 @@ namespace Intents {
NoAccount = 1,
Offline,
MessagingServiceNotEnabledForRecipient,
NoValidHandle,
RequestedHandleInvalid,
NoHandleForLabel,
}
[Watch (4,0), NoMac, iOS (11,0)]
@ -1331,6 +1379,75 @@ namespace Intents {
Contact,
RequestPayment,
SendPayment,
[Watch (5,0), iOS (12,0)]
Transit,
[Watch (5,0), iOS (12,0)]
Bus,
[Watch (5,0), iOS (12,0)]
Subway,
}
[Watch (5,0), NoMac, iOS (12,0)]
[Native]
public enum INMediaItemType : long {
Unknown = 0,
Song,
Album,
Artist,
Genre,
Playlist,
PodcastShow,
PodcastEpisode,
PodcastPlaylist,
MusicStation,
AudioBook,
Movie,
TVShow,
TVShowEpisode,
MusicVideo,
}
[Watch (5,0), NoMac, iOS (12,0)]
[Native]
public enum INPlayMediaIntentResponseCode : long {
Unspecified = 0,
Ready,
ContinueInApp,
InProgress,
Success,
HandleInApp,
Failure,
FailureRequiringAppLaunch,
FailureUnknownMediaType,
FailureNoUnplayedContent,
FailureRestrictedContent,
}
[Watch (5,0), NoMac, iOS (12,0)]
[Native]
public enum INPlaybackRepeatMode : long {
Unknown = 0,
None,
All,
One,
}
[Watch (5,0), NoMac, iOS (12,0)]
[Native]
public enum INDailyRoutineSituation : long {
Morning,
Evening,
Home,
Work,
School,
Gym,
}
[Watch (5,0), NoMac, iOS (12,0)]
[Native]
public enum INUpcomingMediaPredictionMode : long {
Default = 0,
OnlyPredictSuggestedIntents = 1,
}
[iOS (10, 0)]
@ -1580,6 +1697,18 @@ namespace Intents {
[Field ("INWorkoutNameIdentifierExercise")]
Exercise,
[Watch (5,0), iOS (12,0)]
[Field ("INWorkoutNameIdentifierHike")]
Hike,
[Watch (5,0), iOS (12,0)]
[Field ("INWorkoutNameIdentifierHighIntensityIntervalTraining")]
HighIntensityIntervalTraining,
[Watch (5,0), iOS (12,0)]
[Field ("INWorkoutNameIdentifierSwim")]
Swim,
}
// End of enums
@ -2151,7 +2280,7 @@ namespace Intents {
INDateComponentsRangeResolutionResult Unsupported { get; }
}
#if XAMCORE_4_0 // TODO: Double check this if XAMCORE_4_0 happens, its been 2 years (2018) and still not usable in macOS
#if XAMCORE_4_0 // yep not usable from macOS
[NoMac]
#else
[Mac (10, 12, 0, PlatformArchitecture.Arch64)]
@ -2371,6 +2500,7 @@ namespace Intents {
}
[iOS (10, 0)]
[Watch (3, 2)]
[Unavailable (PlatformName.MacOSX)]
[Protocol]
interface INIntentHandlerProviding {
@ -2437,10 +2567,10 @@ namespace Intents {
[Export ("defaultBookingDate", ArgumentSemantic.Copy)]
NSDate DefaultBookingDate { get; }
[NullAllowed, Export ("maximumPartySize", ArgumentSemantic.Assign)]
[NullAllowed, Export ("maximumPartySize", ArgumentSemantic.Copy)]
NSNumber MaximumPartySize { get; set; }
[NullAllowed, Export ("minimumPartySize", ArgumentSemantic.Assign)]
[NullAllowed, Export ("minimumPartySize", ArgumentSemantic.Copy)]
NSNumber MinimumPartySize { get; set; }
[Export ("providerImage", ArgumentSemantic.Copy)]
@ -2823,6 +2953,23 @@ namespace Intents {
[Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)]
[NullAllowed, Export ("intentDescription")]
string IntentDescription { get; }
[Watch (5,0), NoMac, iOS (12,0)]
[NullAllowed, Export ("suggestedInvocationPhrase")]
string SuggestedInvocationPhrase { get; set; }
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("setImage:forParameterNamed:")]
void SetImage ([NullAllowed] INImage image, string parameterName);
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("imageForParameterNamed:")]
[return: NullAllowed]
INImage GetImage (string parameterName);
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[NullAllowed, Export ("keyImage")]
INImage GetKeyImage ();
}
interface INIntentResolutionResult<ObjectType> : INIntentResolutionResult { }
@ -2859,7 +3006,12 @@ namespace Intents {
interface INIntentResponse : NSCopying, NSSecureCoding {
[NullAllowed, Export ("userActivity", ArgumentSemantic.Copy)]
NSUserActivity UserActivity { get; }
NSUserActivity UserActivity {
get;
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
set;
}
}
[iOS (10, 0)]
@ -3089,7 +3241,7 @@ namespace Intents {
INMessageAttributeOptionsResolutionResult Unsupported { get; }
}
#if XAMCORE_4_0 // TODO: Double check this if XAMCORE_4_0 happens, its been 2 years (2018) and still not usable in macOS
#if XAMCORE_4_0 // Yep not usable from macOS
[NoMac]
#else
[Mac (10, 12, 0, PlatformArchitecture.Arch64)]
@ -3271,9 +3423,13 @@ namespace Intents {
interface INPerson : NSCopying, NSSecureCoding, INSpeakable {
[Export ("initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:")]
[DesignatedInitializer]
IntPtr Constructor (INPersonHandle personHandle, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string contactIdentifier, [NullAllowed] string customIdentifier);
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isMe:")]
[DesignatedInitializer]
IntPtr Constructor (INPersonHandle personHandle, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string contactIdentifier, [NullAllowed] string customIdentifier, bool isMe);
[NullAllowed, Export ("personHandle", ArgumentSemantic.Copy)]
INPersonHandle PersonHandle { get; }
@ -4013,7 +4169,7 @@ namespace Intents {
[Export ("status", ArgumentSemantic.Assign)]
INRestaurantReservationUserBookingStatus Status { get; set; }
[Export ("dateStatusModified", ArgumentSemantic.Assign)]
[Export ("dateStatusModified", ArgumentSemantic.Copy)]
NSDate DateStatusModified { get; set; }
}
@ -4538,11 +4694,18 @@ namespace Intents {
[BaseType (typeof (INIntent))]
interface INSearchForMessagesIntent {
[Deprecated (PlatformName.MacOSX, 10,14, message: "Use the overload that takes 'conversationIdentifiers' instead.")]
[Deprecated (PlatformName.WatchOS, 5,0, message: "Use the overload that takes 'conversationIdentifiers' instead.")]
[Deprecated (PlatformName.iOS, 12,0, message: "Use the overload that takes 'conversationIdentifiers' instead.")]
[Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)]
[Export ("initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:speakableGroupNames:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] INPerson [] recipients, [NullAllowed] INPerson [] senders, [NullAllowed] string [] searchTerms, INMessageAttributeOptions attributes, [NullAllowed] INDateComponentsRange dateTimeRange, [NullAllowed] string [] identifiers, [NullAllowed] string [] notificationIdentifiers, [NullAllowed] INSpeakableString [] speakableGroupNames);
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:speakableGroupNames:conversationIdentifiers:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] INPerson [] recipients, [NullAllowed] INPerson [] senders, [NullAllowed] string [] searchTerms, INMessageAttributeOptions attributes, [NullAllowed] INDateComponentsRange dateTimeRange, [NullAllowed] string [] identifiers, [NullAllowed] string [] notificationIdentifiers, [NullAllowed] INSpeakableString [] speakableGroupNames, [NullAllowed] string [] conversationIdentifiers);
[Deprecated (PlatformName.MacOSX, 10, 13, message: "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")]
[Deprecated (PlatformName.WatchOS, 4, 0, message: "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")]
[Deprecated (PlatformName.iOS, 11, 0, message: "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")]
@ -4604,6 +4767,14 @@ namespace Intents {
[Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)]
[Export ("speakableGroupNamesOperator", ArgumentSemantic.Assign)]
INConditionalOperator SpeakableGroupNamesOperator { get; }
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[NullAllowed, Export ("conversationIdentifiers", ArgumentSemantic.Copy)]
string [] ConversationIdentifiers { get; }
[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("conversationIdentifiersOperator", ArgumentSemantic.Assign)]
INConditionalOperator ConversationIdentifiersOperator { get; }
}
[iOS (10, 0)]
@ -7260,10 +7431,10 @@ namespace Intents {
[Export ("code")]
INCancelRideIntentResponseCode Code { get; }
[NullAllowed, Export ("cancellationFee", ArgumentSemantic.Assign)]
[NullAllowed, Export ("cancellationFee", ArgumentSemantic.Copy)]
INCurrencyAmount CancellationFee { get; set; }
[NullAllowed, Export ("cancellationFeeThreshold", ArgumentSemantic.Assign)]
[NullAllowed, Export ("cancellationFeeThreshold", ArgumentSemantic.Copy)]
NSDateComponents CancellationFeeThreshold { get; set; }
}
@ -7503,6 +7674,7 @@ namespace Intents {
interface INNote : NSCopying, NSSecureCoding {
[Export ("initWithTitle:contents:groupName:createdDateComponents:modifiedDateComponents:identifier:")]
[DesignatedInitializer]
IntPtr Constructor (INSpeakableString title, INNoteContent [] contents, [NullAllowed] INSpeakableString groupName, [NullAllowed] NSDateComponents createdDateComponents, [NullAllowed] NSDateComponents modifiedDateComponents, [NullAllowed] string identifier);
[Export ("title", ArgumentSemantic.Copy)]
@ -7666,7 +7838,7 @@ namespace Intents {
INNotebookItemTypeResolutionResult Unsupported { get; }
}
[Watch (4,0), NoMac, iOS (11,0)]
[Watch (4,0), Mac (10,14, onlyOn64: true), iOS (11,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface INParameter : NSCopying, NSSecureCoding {
@ -8144,12 +8316,13 @@ namespace Intents {
interface INSpatialEventTrigger : NSCopying, NSSecureCoding {
[Export ("initWithPlacemark:event:")]
[DesignatedInitializer]
IntPtr Constructor (CLPlacemark placemark, INSpatialEvent @event);
[Export ("placemark")]
[Export ("placemark", ArgumentSemantic.Copy)]
CLPlacemark Placemark { get; }
[Export ("event")]
[Export ("event", ArgumentSemantic.Assign)]
INSpatialEvent Event { get; }
}
@ -8195,15 +8368,16 @@ namespace Intents {
interface INTask : NSCopying, NSSecureCoding {
[Export ("initWithTitle:status:taskType:spatialEventTrigger:temporalEventTrigger:createdDateComponents:modifiedDateComponents:identifier:")]
[DesignatedInitializer]
IntPtr Constructor (INSpeakableString title, INTaskStatus status, INTaskType taskType, [NullAllowed] INSpatialEventTrigger spatialEventTrigger, [NullAllowed] INTemporalEventTrigger temporalEventTrigger, [NullAllowed] NSDateComponents createdDateComponents, [NullAllowed] NSDateComponents modifiedDateComponents, [NullAllowed] string identifier);
[Export ("title", ArgumentSemantic.Copy)]
INSpeakableString Title { get; }
[Export ("status")]
[Export ("status", ArgumentSemantic.Assign)]
INTaskStatus Status { get; }
[Export ("taskType")]
[Export ("taskType", ArgumentSemantic.Assign)]
INTaskType TaskType { get; }
[NullAllowed, Export ("spatialEventTrigger", ArgumentSemantic.Copy)]
@ -8228,6 +8402,7 @@ namespace Intents {
interface INTaskList : NSCopying, NSSecureCoding {
[Export ("initWithTitle:tasks:groupName:createdDateComponents:modifiedDateComponents:identifier:")]
[DesignatedInitializer]
IntPtr Constructor (INSpeakableString title, INTask [] tasks, [NullAllowed] INSpeakableString groupName, [NullAllowed] NSDateComponents createdDateComponents, [NullAllowed] NSDateComponents modifiedDateComponents, [NullAllowed] string identifier);
[Export ("title", ArgumentSemantic.Copy)]
@ -8359,9 +8534,10 @@ namespace Intents {
interface INTemporalEventTrigger : NSCopying, NSSecureCoding {
[Export ("initWithDateComponentsRange:")]
[DesignatedInitializer]
IntPtr Constructor (INDateComponentsRange dateComponentsRange);
[Export ("dateComponentsRange")]
[Export ("dateComponentsRange", ArgumentSemantic.Copy)]
INDateComponentsRange DateComponentsRange { get; }
}
@ -8528,5 +8704,300 @@ namespace Intents {
INVisualCodeTypeResolutionResult Unsupported { get; }
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface INDefaultCardTemplate : NSCopying, NSSecureCoding {
[Export ("title")]
string Title { get; set; }
[NullAllowed, Export ("subtitle")]
string Subtitle { get; set; }
[NullAllowed, Export ("image", ArgumentSemantic.Copy)]
INImage Image { get; set; }
[Export ("initWithTitle:")]
[DesignatedInitializer]
IntPtr Constructor (string title);
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface INMediaItem : NSCopying, NSSecureCoding {
[Export ("initWithIdentifier:title:type:artwork:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] string identifier, [NullAllowed] string title, INMediaItemType type, [NullAllowed] INImage artwork);
[NullAllowed, Export ("identifier")]
string Identifier { get; }
[NullAllowed, Export ("title")]
string Title { get; }
[Export ("type", ArgumentSemantic.Assign)]
INMediaItemType Type { get; }
[NullAllowed, Export ("artwork", ArgumentSemantic.Copy)]
INImage Artwork { get; }
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface INObject : INSpeakable, NSCopying, NSSecureCoding {
[Export ("initWithIdentifier:displayString:pronunciationHint:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] string identifier, string displayString, [NullAllowed] string pronunciationHint);
[Export ("initWithIdentifier:displayString:")]
IntPtr Constructor ([NullAllowed] string identifier, string displayString);
// Inlined by INSpeakable
//[NullAllowed, Export ("identifier", ArgumentSemantic.Strong)]
//string Identifier { get; }
[Export ("displayString")]
string DisplayString { get; }
// Inlined by INSpeakable
//[NullAllowed, Export ("pronunciationHint", ArgumentSemantic.Strong)]
//string PronunciationHint { get; }
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (INIntent))]
[DisableDefaultCtor]
interface INPlayMediaIntent {
[Export ("initWithMediaItems:mediaContainer:playShuffled:playbackRepeatMode:resumePlayback:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] INMediaItem [] mediaItems, [NullAllowed] INMediaItem mediaContainer, [NullAllowed, BindAs (typeof (bool?))] NSNumber playShuffled, INPlaybackRepeatMode playbackRepeatMode, [NullAllowed, BindAs (typeof (bool?))] NSNumber resumePlayback);
[NullAllowed, Export ("mediaItems", ArgumentSemantic.Copy)]
INMediaItem [] MediaItems { get; }
[NullAllowed, Export ("mediaContainer", ArgumentSemantic.Copy)]
INMediaItem MediaContainer { get; }
[BindAs (typeof (bool?))]
[NullAllowed, Export ("playShuffled", ArgumentSemantic.Copy)]
NSNumber PlayShuffled { get; }
[Export ("playbackRepeatMode", ArgumentSemantic.Assign)]
INPlaybackRepeatMode PlaybackRepeatMode { get; }
[BindAs (typeof (bool?))]
[NullAllowed, Export ("resumePlayback", ArgumentSemantic.Copy)]
NSNumber ResumePlayback { get; }
}
[Watch (5,0), NoMac, iOS (12,0)]
[Protocol]
interface INPlayMediaIntentHandling {
[Abstract]
[Export ("handlePlayMedia:completion:")]
void HandlePlayMedia (INPlayMediaIntent intent, Action<INPlayMediaIntentResponse> completion);
[Export ("confirmPlayMedia:completion:")]
void Confirm (INPlayMediaIntent intent, Action<INPlayMediaIntentResponse> completion);
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (INIntentResponse))]
[DisableDefaultCtor]
interface INPlayMediaIntentResponse {
[Export ("initWithCode:userActivity:")]
[DesignatedInitializer]
IntPtr Constructor (INPlayMediaIntentResponseCode code, [NullAllowed] NSUserActivity userActivity);
[Export ("code")]
INPlayMediaIntentResponseCode Code { get; }
[EditorBrowsable (EditorBrowsableState.Advanced)]
[NullAllowed, Export ("nowPlayingInfo", ArgumentSemantic.Copy)]
NSDictionary WeakNowPlayingInfo { get; set; }
}
[Abstract]
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface INRelevanceProvider : NSCopying, NSSecureCoding {
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (INRelevanceProvider))]
[DisableDefaultCtor]
interface INDateRelevanceProvider {
[Export ("startDate", ArgumentSemantic.Copy)]
NSDate StartDate { get; }
[NullAllowed, Export ("endDate", ArgumentSemantic.Copy)]
NSDate EndDate { get; }
[Export ("initWithStartDate:endDate:")]
[DesignatedInitializer]
IntPtr Constructor (NSDate startDate, [NullAllowed] NSDate endDate);
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (INRelevanceProvider))]
[DisableDefaultCtor]
interface INLocationRelevanceProvider {
[Export ("region", ArgumentSemantic.Copy)]
CLRegion Region { get; }
[Export ("initWithRegion:")]
[DesignatedInitializer]
IntPtr Constructor (CLRegion region);
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (INRelevanceProvider))]
[DisableDefaultCtor]
interface INDailyRoutineRelevanceProvider {
[Export ("situation")]
INDailyRoutineSituation Situation { get; }
[Export ("initWithSituation:")]
[DesignatedInitializer]
IntPtr Constructor (INDailyRoutineSituation situation);
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface INRelevantShortcut : NSSecureCoding, NSCopying {
[Export ("relevanceProviders", ArgumentSemantic.Copy)]
INRelevanceProvider [] RelevanceProviders { get; set; }
[NullAllowed, Export ("watchTemplate", ArgumentSemantic.Copy)]
INDefaultCardTemplate WatchTemplate { get; set; }
[Export ("shortcut", ArgumentSemantic.Copy)]
INShortcut Shortcut { get; }
[Export ("initWithShortcut:")]
[DesignatedInitializer]
IntPtr Constructor (INShortcut shortcut);
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface INRelevantShortcutStore {
[Static]
[Export ("defaultStore", ArgumentSemantic.Strong)]
INRelevantShortcutStore DefaultStore { get; }
[Async]
[Export ("setRelevantShortcuts:completionHandler:")]
void SetRelevantShortcuts (INRelevantShortcut [] shortcuts, [NullAllowed] Action<NSError> completionHandler);
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface INShortcut : NSSecureCoding, NSCopying {
[NullAllowed, Export ("intent", ArgumentSemantic.Copy)]
INIntent Intent { get; }
[NullAllowed, Export ("userActivity", ArgumentSemantic.Strong)]
NSUserActivity UserActivity { get; }
[Export ("initWithIntent:")]
IntPtr Constructor (INIntent intent);
[Export ("initWithUserActivity:")]
IntPtr Constructor (NSUserActivity userActivity);
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface INUpcomingMediaManager {
[Static]
[Export ("sharedManager")]
INUpcomingMediaManager SharedManager { get; }
[Export ("setSuggestedMediaIntents:")]
void SetSuggestedMediaIntents (NSOrderedSet<INPlayMediaIntent> intents);
[Export ("setPredictionMode:forType:")]
void SetPredictionMode (INUpcomingMediaPredictionMode mode, INMediaItemType type);
}
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface INVoiceShortcut : NSSecureCoding, NSCopying {
[Export ("identifier", ArgumentSemantic.Strong)]
NSUuid Identifier { get; }
[Export ("invocationPhrase")]
string InvocationPhrase { get; }
[Export ("shortcut", ArgumentSemantic.Copy)]
INShortcut Shortcut { get; }
}
delegate void INVoiceShortcutCenterGetVoiceShortcutsHandler ([NullAllowed] INVoiceShortcut [] voiceShortcuts, NSError error);
[Watch (5,0), NoMac, iOS (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface INVoiceShortcutCenter {
[Static]
[Export ("sharedCenter", ArgumentSemantic.Strong)]
INVoiceShortcutCenter SharedCenter { get; }
[Async]
[Export ("getAllVoiceShortcutsWithCompletion:")]
void GetAllVoiceShortcuts (INVoiceShortcutCenterGetVoiceShortcutsHandler completionHandler);
[Async]
[Export ("getVoiceShortcutWithIdentifier:completion:")]
void GetVoiceShortcut (NSUuid identifier, Action<INVoiceShortcut, NSError> completionHandler);
[Export ("setShortcutSuggestions:")]
void SetShortcutSuggestions (INShortcut [] suggestions);
}
// TODO: We need to inline these into NSString once we figure out how the API is used.
//[Watch (5,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
//[Category]
//[BaseType (typeof (NSString))]
//interface NSString_Intents {
// // +(NSString * _Nonnull)deferredLocalizedIntentsStringWithFormat:(NSString * _Nonnull)format, ... __attribute__((format(NSString, 1, 2)));
// [Static, Internal]
// [Export ("deferredLocalizedIntentsStringWithFormat:", IsVariadic = true)]
// string DeferredLocalizedIntentsStringWithFormat (string format, IntPtr varArgs);
// // +(NSString * _Nonnull)deferredLocalizedIntentsStringWithFormat:(NSString * _Nonnull)format fromTable:(NSString * _Nullable)table, ... __attribute__((format(NSString, 1, 3)));
// [Static, Internal]
// [Export ("deferredLocalizedIntentsStringWithFormat:fromTable:", IsVariadic = true)]
// string DeferredLocalizedIntentsStringWithFormat (string format, [NullAllowed] string table, IntPtr varArgs);
// // +(NSString * _Nonnull)deferredLocalizedIntentsStringWithFormat:(NSString * _Nonnull)format fromTable:(NSString * _Nullable)table arguments:(va_list)arguments __attribute__((format(NSString, 1, 0)));
// [Static, Internal]
// [Export ("deferredLocalizedIntentsStringWithFormat:fromTable:arguments:", IsVariadic = true)]
// string DeferredLocalizedIntentsStringWithFormat (string format, [NullAllowed] string table, IntPtr arguments);
//}
}
#endif // XAMCORE_2_0

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

@ -81,6 +81,74 @@ namespace IntentsUI {
[Export ("displaysPaymentTransaction")]
bool DisplaysPaymentTransaction { get; }
}
[iOS (12,0)]
[BaseType (typeof (UIViewController))]
[DisableDefaultCtor]
interface INUIAddVoiceShortcutViewController {
[Wrap ("WeakDelegate")]
[NullAllowed]
IINUIAddVoiceShortcutViewControllerDelegate Delegate { get; set; }
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }
[Export ("initWithShortcut:")]
IntPtr Constructor (INShortcut shortcut);
}
interface IINUIAddVoiceShortcutViewControllerDelegate { }
[iOS (12,0)]
[Protocol, Model (AutoGeneratedName = true)]
[BaseType (typeof (NSObject))]
interface INUIAddVoiceShortcutViewControllerDelegate {
[Abstract]
[Export ("addVoiceShortcutViewController:didFinishWithVoiceShortcut:error:")]
void DidFinish (INUIAddVoiceShortcutViewController controller, [NullAllowed] INVoiceShortcut voiceShortcut, [NullAllowed] NSError error);
[Abstract]
[Export ("addVoiceShortcutViewControllerDidCancel:")]
void DidCancel (INUIAddVoiceShortcutViewController controller);
}
[iOS (12,0)]
[BaseType (typeof (UIViewController))]
[DisableDefaultCtor]
interface INUIEditVoiceShortcutViewController {
[Wrap ("WeakDelegate")]
[NullAllowed]
IINUIEditVoiceShortcutViewControllerDelegate Delegate { get; set; }
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }
[Export ("initWithVoiceShortcut:")]
IntPtr Constructor (INVoiceShortcut voiceShortcut);
}
interface IINUIEditVoiceShortcutViewControllerDelegate { }
[iOS (12,0)]
[Protocol, Model (AutoGeneratedName = true)]
[BaseType (typeof (NSObject))]
interface INUIEditVoiceShortcutViewControllerDelegate {
[Abstract]
[Export ("editVoiceShortcutViewController:didUpdateVoiceShortcut:error:")]
void DidUpdate (INUIEditVoiceShortcutViewController controller, [NullAllowed] INVoiceShortcut voiceShortcut, [NullAllowed] NSError error);
[Abstract]
[Export ("editVoiceShortcutViewController:didDeleteVoiceShortcutWithIdentifier:")]
void DidDelete (INUIEditVoiceShortcutViewController controller, NSUuid deletedVoiceShortcutIdentifier);
[Abstract]
[Export ("editVoiceShortcutViewControllerDidCancel:")]
void DidCancel (INUIEditVoiceShortcutViewController controller);
}
}
#endif

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

@ -21,9 +21,15 @@ namespace IOSurface {
[TV (11,0)]
[Mac (10, 12)]
interface IOSurfacePropertyKey {
[Internal]
[Field ("IOSurfacePropertyAllocSizeKey")]
NSString AllocSizeKey { get; }
NSString _DeprecatedAllocSizeKey { get; }
[iOS (12, 0), TV (12,0), Mac (10, 14)]
[Internal]
[Field ("IOSurfacePropertyKeyAllocSize")]
NSString _NewAllocSizeKey { get; }
[Field ("IOSurfacePropertyKeyWidth")]
NSString WidthKey { get; }

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

@ -14,7 +14,9 @@ using ObjCRuntime;
using Foundation;
using CoreGraphics;
using CoreLocation;
#if !MONOMAC
#if MONOMAC
using AppKit;
#else
using UIKit;
#endif
#if !TVOS && XAMCORE_2_0
@ -796,6 +798,10 @@ namespace MapKit {
[TV (11,0)][NoWatch][iOS (11,0)][Mac (10,13, onlyOn64: true)]
[Export ("mapView:clusterAnnotationForMemberAnnotations:"), DelegateName ("MKCreateClusterAnnotation"), DefaultValue (null)]
MKClusterAnnotation CreateClusterAnnotation (MKMapView mapView, IMKAnnotation[] memberAnnotations);
[TV (11,0)][NoWatch][iOS (11,0)][Mac (10,13, onlyOn64: true)]
[Export ("mapViewDidChangeVisibleRegion:")]
void DidChangeVisibleRegion (MKMapView mapView);
}
[BaseType (typeof (MKAnnotationView))]
@ -1515,6 +1521,13 @@ namespace MapKit {
[Export ("pointForCoordinate:")]
CGPoint PointForCoordinate (CLLocationCoordinate2D coordinate);
#if MONOMAC
[NoWatch][NoTV][NoiOS]
[Mac (10,14, onlyOn64: true)]
[Export ("appearance")]
NSAppearance Appearance { get; }
#endif
}
[TV (9,2)]
@ -1547,6 +1560,13 @@ namespace MapKit {
[Export ("showsBuildings")]
bool ShowsBuildings { get; set; }
#if MONOMAC
[NoWatch][NoTV][NoiOS]
[Mac (10,14, onlyOn64: true)]
[NullAllowed, Export ("appearance", ArgumentSemantic.Strong)]
NSAppearance Appearance { get; set; }
#endif
}
[TV (9,2)]

254
src/naturallanguage.cs Normal file
Просмотреть файл

@ -0,0 +1,254 @@
// Copyright 2018, Microsoft, Corp.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.ComponentModel;
using Foundation;
using CoreML;
using ObjCRuntime;
namespace NaturalLanguage {
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
[DisableDefaultCtor] // designated
[BaseType (typeof(NSObject))]
interface NLLanguageRecognizer {
[DesignatedInitializer]
[Export ("init")]
IntPtr Constructor ();
[Static]
[Internal]
[Export ("dominantLanguageForString:")]
[return: NullAllowed]
NSString _GetDominantLanguage (IntPtr @string);
[Export ("processString:")]
void Process (string @string);
[Export ("reset")]
void Reset ();
[Internal]
[NullAllowed, Export ("dominantLanguage")]
NSString _DominantLanguage { get; }
[Wrap ("NLLanguageExtensions.GetValue (_DominantLanguage)")]
NLLanguage DominantLanguage { get; }
// left in case the user does not want to get a c# dict
[EditorBrowsable (EditorBrowsableState.Advanced)]
[Export ("languageHypothesesWithMaximum:")]
NSDictionary<NSString, NSNumber> GetNativeLanguageHypotheses (nuint maxHypotheses);
// left in case the user does not want to get a c# dict
[EditorBrowsable (EditorBrowsableState.Advanced)]
[Export ("languageHints", ArgumentSemantic.Copy)]
NSDictionary<NSString, NSNumber> NativeLanguageHints { get; set; }
[Internal]
[Export ("languageConstraints", ArgumentSemantic.Copy)]
NSString[] _LanguageConstraints { get; set; }
NLLanguage[] LanguageConstraints {
[Wrap ("Array.ConvertAll (_LanguageConstraints, e => NLLanguageExtensions.GetValue (e))")]
get;
[Wrap ("_LanguageConstraints = Array.ConvertAll (value, e => NLLanguageExtensions.GetConstant (e))")]
set;
}
}
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
[BaseType (typeof(NSObject))]
interface NLModelConfiguration : NSCopying, NSSecureCoding {
[Export ("type")]
NLModelType Type { get; }
[Internal]
[NullAllowed, Export ("language")]
NSString _Language { get; }
NLLanguage Language { [Wrap ("(_Language != null)? NLLanguageExtensions.GetValue (_Language) : NLLanguage.Undetermined")] get; }
[Export ("revision")]
nuint Revision { get; }
[Static]
[Export ("supportedRevisionsForType:")]
NSIndexSet GetSupportedRevisions (NLModelType type);
[Static]
[Export ("currentRevisionForType:")]
nuint GetCurrentRevision (NLModelType type);
}
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
[DisableDefaultCtor]
[BaseType (typeof(NSObject))]
interface NLModel {
[Static]
[Export ("modelWithContentsOfURL:error:")]
[return: NullAllowed]
NLModel Create (NSUrl url, [NullAllowed] out NSError error);
[Static]
[Export ("modelWithMLModel:error:")]
[return: NullAllowed]
NLModel Create (MLModel mlModel, [NullAllowed] out NSError error);
[Export ("configuration", ArgumentSemantic.Copy)]
NLModelConfiguration Configuration { get; }
[Export ("predictedLabelForString:")]
[return: NullAllowed]
string GetPredictedLabel (string @string);
[Export ("predictedLabelsForTokens:")]
string[] GetPredictedLabels (string[] tokens);
}
delegate void NLTokenizerEnumerateContinuationHandler (NSRange tokenRange, NLTokenizerAttributes flags, out bool stop);
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
[DisableDefaultCtor]
[BaseType (typeof(NSObject))]
interface NLTokenizer
{
[Export ("initWithUnit:")]
[DesignatedInitializer]
IntPtr Constructor (NLTokenUnit unit);
[Export ("unit")]
NLTokenUnit Unit { get; }
[NullAllowed, Export ("string", ArgumentSemantic.Retain)]
string String { get; set; }
[Internal]
[Export ("setLanguage:")]
void _SetLanguage (NSString language);
[Wrap ("_SetLanguage (language.GetConstant ())")]
void SetLanguage (NLLanguage language);
[Export ("tokenRangeAtIndex:")]
NSRange GetTokenRange (nuint characterIndex);
[Export ("tokensForRange:")]
NSValue[] GetTokens (NSRange range);
[Export ("enumerateTokensInRange:usingBlock:")]
void EnumerateTokens (NSRange range, NLTokenizerEnumerateContinuationHandler handler);
}
delegate void NLTaggerEnumerateTagsContinuationHandler (NSString tag, NSRange tokenRange, out bool stop);
[iOS (12,0), Mac (10,14, onlyOn64: true), TV (12,0)]
[DisableDefaultCtor]
[BaseType (typeof(NSObject))]
interface NLTagger
{
[EditorBrowsable (EditorBrowsableState.Advanced)]
[Export ("initWithTagSchemes:")]
[DesignatedInitializer]
IntPtr Constructor (NSString[] tagSchemes);
[Wrap ("this (Array.ConvertAll (tagSchemes, e => e.GetConstant ()))")]
IntPtr Constructor (NLTagScheme[] tagSchemes);
[Internal]
[Export ("tagSchemes", ArgumentSemantic.Copy)]
NSString[] _TagSchemes { get; }
[Wrap ("Array.ConvertAll (_TagSchemes, e => NLTagSchemeExtensions.GetValue (e))")]
NLTagScheme[] TagSchemes { get; }
[NullAllowed, Export ("string", ArgumentSemantic.Retain)]
string String { get; set; }
[Static]
[EditorBrowsable (EditorBrowsableState.Advanced)]
[Export ("availableTagSchemesForUnit:language:")]
NSString[] GetAvailableTagSchemes (NLTokenUnit unit, NSString language);
[Static]
[Wrap ("Array.ConvertAll (GetAvailableTagSchemes (unit, language.GetConstant()), e => NLTagSchemeExtensions.GetValue (e))")]
NLTagScheme[] GetAvailableTagSchemes (NLTokenUnit unit, NLLanguage language);
[Export ("tokenRangeAtIndex:unit:")]
NSRange GetTokenRange (nuint characterIndex, NSString unit);
[Internal]
[NullAllowed, Export ("dominantLanguage")]
NSString _DominantLanguage { get; }
[Wrap ("NLLanguageExtensions.GetValue (_DominantLanguage)")]
NLLanguage DominantLanguage { get; }
[EditorBrowsable (EditorBrowsableState.Advanced)]
[Export ("enumerateTagsInRange:unit:scheme:options:usingBlock:")]
void EnumerateTags (NSRange range, NLTokenUnit unit, NSString scheme, NLTaggerOptions options, NLTaggerEnumerateTagsContinuationHandler handler);
[Wrap ("EnumerateTags (range, unit, scheme.GetConstant (), options, handler)")]
void EnumerateTags (NSRange range, NLTokenUnit unit, NLTagScheme scheme, NLTaggerOptions options, NLTaggerEnumerateTagsContinuationHandler handler);
[EditorBrowsable (EditorBrowsableState.Advanced)]
[Export ("tagAtIndex:unit:scheme:tokenRange:")]
[return: NullAllowed]
NSString GetTag (nuint characterIndex, NLTokenUnit unit, NSString scheme, [NullAllowed] NSRange tokenRange);
[Wrap ("NLTagExtensions.GetValue (GetTag (characterIndex, unit, scheme.GetConstant (), tokenRange))")]
NLTag GetTag (nuint characterIndex, NLTokenUnit unit, NLTagScheme scheme, [NullAllowed] NSRange tokenRange);
[EditorBrowsable (EditorBrowsableState.Advanced)]
[Export ("tagsInRange:unit:scheme:options:tokenRanges:")]
NSString[] GetTags (NSRange range, NLTokenUnit unit, NSString scheme, NLTaggerOptions options, [NullAllowed] out NSValue[] tokenRanges);
[Wrap ("Array.ConvertAll (GetTags (range, unit, scheme.GetConstant (), options, out tokenRanges), e => NLTagExtensions.GetValue (e))")]
NLTag[] GetTags (NSRange range, NLTokenUnit unit, NLTagScheme scheme, NLTaggerOptions options, [NullAllowed] out NSValue[] tokenRanges);
[EditorBrowsable (EditorBrowsableState.Advanced)]
[Export ("setLanguage:range:")]
void SetLanguage (NSString language, NSRange range);
[Wrap ("SetLanguage (language.GetConstant (), range)")]
void SetLanguage (NLLanguage language, NSRange range);
[Export ("setOrthography:range:")]
void SetOrthography (NSOrthography orthography, NSRange range);
[EditorBrowsable (EditorBrowsableState.Advanced)]
[Export ("setModels:forTagScheme:")]
void SetModels (NLModel[] models, NSString tagScheme);
[Wrap ("SetModels (models, tagScheme.GetConstant ())")]
void SetModels (NLModel[] models, NLTagScheme tagScheme);
[EditorBrowsable (EditorBrowsableState.Advanced)]
[Export ("modelsForTagScheme:")]
NLModel[] GetModels (NSString tagScheme);
[Wrap ("GetModels (tagScheme.GetConstant ())")]
NLModel[] GetModels (NLTagScheme tagScheme);
}
}

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

@ -17,6 +17,8 @@ using System;
namespace OpenGLES {
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.TvOS, 12,0, message: "Use 'Metal' instead.")]
[BaseType (typeof (NSObject))]
// <quote>It is created when an EAGLContext object is initialized and disposed of when the last EAGLContext object that references it is released.</quote>
[DisableDefaultCtor]
@ -28,6 +30,8 @@ namespace OpenGLES {
string DebugLabel { get; set; }
}
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.TvOS, 12,0, message: "Use 'Metal' instead.")]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // init now marked with NS_UNAVAILABLE
interface EAGLContext {
@ -88,6 +92,8 @@ namespace OpenGLES {
bool TexImage (IOSurface.IOSurface ioSurface, nuint target, nuint internalFormat, uint width, uint height, nuint format, nuint type, uint plane);
}
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.TvOS, 12,0, message: "Use 'Metal' instead.")]
[Protocol]
// no [Model] because "The EAGLDrawable protocol is not intended to be implemented by objects outside of the iOS."
interface EAGLDrawable {

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

@ -98,9 +98,11 @@ namespace QuartzComposer {
[Field ("QCCompositionInputDestinationImageKey")]
NSString InputDestinationImageKey { get; }
[Obsoleted (PlatformName.MacOSX, 14,0, message: "Field will return 'null'.")]
[Field ("QCCompositionInputRSSFeedURLKey")]
NSString InputRSSFeedURLKey { get; }
[Obsoleted (PlatformName.MacOSX, 14,0, message: "Field will return 'null'.")]
[Field ("QCCompositionInputRSSArticleDurationKey")]
NSString InputRSSArticleDurationKey { get; }
@ -158,6 +160,7 @@ namespace QuartzComposer {
[Field ("QCCompositionProtocolScreenSaver")]
NSString ProtocolScreenSaver { get; }
[Obsoleted (PlatformName.MacOSX, 14,0, message: "Field will return 'null'.")]
[Field ("QCCompositionProtocolRSSVisualizer")]
NSString ProtocolRSSVisualizer { get; }
@ -166,6 +169,7 @@ namespace QuartzComposer {
}
[Deprecated (PlatformName.MacOSX, 10,14, message: "Use 'Metal' instead.")]
[BaseType (typeof (CAOpenGLLayer))]
[DisableDefaultCtor] // return invalid handle
interface QCCompositionLayer {

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

@ -112,6 +112,7 @@ namespace QuickLook {
CGRect FrameForPreviewItem (QLPreviewController controller, [Protocolize] QLPreviewItem item, ref UIView view);
[Export ("previewController:transitionImageForPreviewItem:contentRect:"), DelegateName ("QLTransition"), DefaultValue (null)]
[return: NullAllowed]
UIImage TransitionImageForPreviewItem (QLPreviewController controller, [Protocolize] QLPreviewItem item, CGRect contentRect);
[iOS (10,0)]

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

@ -165,8 +165,9 @@ namespace QuickLookUI {
[Mac (10,13)]
[Protocol]
interface QLPreviewingController {
#if !XAMCORE_4_0 // This is optional in headers
[Abstract]
#endif
[Export ("preparePreviewOfSearchableItemWithIdentifier:queryString:completionHandler:")]
void PreparePreviewOfSearchableItem (string identifier, string queryString, Action<NSError> ItemLoadingHandler);
}

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

@ -13,6 +13,7 @@ using CoreMedia;
using ObjCRuntime;
using Foundation;
using UIKit;
using CoreGraphics;
namespace ReplayKit {
@ -329,4 +330,18 @@ namespace ReplayKit {
[Export ("finishBroadcastWithError:")]
void FinishBroadcast (NSError error);
}
[NoTV, iOS (12,0)]
[BaseType (typeof (UIView))]
interface RPSystemBroadcastPickerView : NSCoding {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
[NullAllowed, Export ("preferredExtension")]
string PreferredExtension { get; set; }
[Export ("showsMicrophoneButton")]
bool ShowsMicrophoneButton { get; set; }
}
}

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

@ -4021,6 +4021,25 @@ namespace SceneKit {
[Export ("affectedByGravity")]
bool AffectedByGravity { [Bind ("isAffectedByGravity")] get; set; }
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("setResting:")]
void SetResting (bool resting);
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("continuousCollisionDetectionThreshold")]
nfloat ContinuousCollisionDetectionThreshold { get; set; }
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("centerOfMassOffset", ArgumentSemantic.Assign)]
SCNVector3 CenterOfMassOffset { get; set; }
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("linearSleepingThreshold")]
nfloat LinearSleepingThreshold { get; set; }
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("angularSleepingThreshold")]
nfloat AngularSleepingThreshold { get; set; }
}
[Mac (10,10), iOS (8,0)]

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

@ -149,8 +149,17 @@ namespace SpriteKit {
[return: NullAllowed]
SKNode Create (string filename);
[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[Internal]
[Static]
[Export ("nodeWithFileNamed:securelyWithClasses:andError:")]
[return: NullAllowed]
SKNode Create (string filename, IntPtr classesPtr, out NSError error);
#if MONOMAC || WATCH
[Export ("frame")]
CGRect Frame { get; }
#endif
[Export ("calculateAccumulatedFrame")]
CGRect CalculateAccumulatedFrame ();
@ -2927,7 +2936,7 @@ namespace SpriteKit {
[Mac (10,11, onlyOn64 : true)]
[BaseType (typeof (SKNode))]
[DisableDefaultCtor]
interface SKAudioNode : NSCoding {
interface SKAudioNode : NSSecureCoding {
[Export ("initWithAVAudioNode:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] AVAudioNode node);
@ -3136,7 +3145,7 @@ namespace SpriteKit {
[iOS (10,0)][Mac (10,12, onlyOn64 : true)]
[TV (10,0)]
[BaseType (typeof(SKNode))]
interface SKTileMapNode : NSCopying, NSCoding
interface SKTileMapNode : NSCopying, NSSecureCoding
{
[Static]
[Export ("tileMapNodeWithTileSet:columns:rows:tileSize:")]

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

@ -22,13 +22,19 @@ namespace StoreKit {
[iOS (6,0)]
[BaseType (typeof (NSObject))]
partial interface SKDownload {
#if MONOMAC
[iOS (12,0)]
[Export ("state")]
SKDownloadState State { get; }
#if MONOMAC
[Obsolete ("Use 'State' instead.")]
[Wrap ("State", IsVirtual = true)]
SKDownloadState DownloadState { get; }
[Export ("contentLength", ArgumentSemantic.Copy)]
NSNumber ContentLength { get; }
#else
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'State' instead.")]
[Export ("downloadState")]
SKDownloadState DownloadState { get; }
@ -62,10 +68,11 @@ namespace StoreKit {
[Export ("deleteContentForProductID:")]
[Static]
void DeleteContentForProduct (string productId);
#else
#endif
[Mac (10,14, onlyOn64: true)]
[Field ("SKDownloadTimeRemainingUnknown")]
double TimeRemainingUnknown { get; }
#endif
[Mac (10,11)]
[Export ("transaction")]
@ -97,11 +104,9 @@ namespace StoreKit {
[Export ("applicationUsername", ArgumentSemantic.Copy)]
string ApplicationUsername { get; }
#if !MONOMAC
[iOS (8,3)]
[iOS (8,3), Mac (10,14, onlyOn64: true)]
[Export ("simulatesAskToBuyInSandbox")]
bool SimulatesAskToBuyInSandbox { get; [NotImplemented ("Not available on SKPayment, only available on SKMutablePayment")] set; }
#endif
}
[BaseType (typeof (SKPayment))]
@ -132,11 +137,9 @@ namespace StoreKit {
[Export ("applicationUsername", ArgumentSemantic.Copy)][New]
string ApplicationUsername { get; set; }
#if !MONOMAC
[iOS (8,3)]
[iOS (8,3), Mac (10,14, onlyOn64: true)]
[Export ("simulatesAskToBuyInSandbox")]
bool SimulatesAskToBuyInSandbox { get; set; }
#endif
}
[BaseType (typeof (NSObject))]
@ -210,29 +213,24 @@ namespace StoreKit {
[iOS (6,0)]
[Export ("downloadable")]
bool Downloadable {
#if MONOMAC
get;
#else
[Bind ("isDownloadable")]
get;
#endif
}
bool Downloadable { [Bind ("isDownloadable")] get; }
[iOS (6,0)]
#if MONOMAC
[NoiOS]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'DownloadContentLengths' instead.")]
[Export ("contentLengths")]
#else
NSNumber [] ContentLengths { get; }
[iOS (6,0), Mac (10,14, onlyOn64: true)]
[Export ("downloadContentLengths")]
#endif
NSNumber [] DownloadContentLengths { get; }
[iOS (6,0)]
#if MONOMAC
[NoiOS]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'DownloadContentVersion' instead.")]
[Export ("contentVersion")]
#else
string ContentVersion { get; }
[iOS (6,0), Mac (10,14, onlyOn64: true)]
[Export ("downloadContentVersion")]
#endif
string DownloadContentVersion { get; }
[iOS (11,2), TV (11,2), Mac (10,13,2)]
@ -242,6 +240,10 @@ namespace StoreKit {
[iOS (11,2), TV (11,2), Mac (10,13,2)]
[NullAllowed, Export ("introductoryPrice")]
SKProductDiscount IntroductoryPrice { get; }
[iOS (12,0), Mac (10,14, onlyOn64: true)]
[NullAllowed, Export ("subscriptionGroupIdentifier")]
string SubscriptionGroupIdentifier { get; }
}
[BaseType (typeof (NSObject))]
@ -652,17 +654,6 @@ namespace StoreKit {
PlayMusic,
}
[iOS (10,3)]
[NoTV]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // Not specified but very likely
interface SKStoreReviewController {
[Static]
[Export ("requestReview")]
void RequestReview ();
}
[iOS (11,0), TV (11,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // static Default property is the only documented way to get the controller
@ -689,6 +680,17 @@ namespace StoreKit {
}
#endif
[iOS (10,3), Mac (10,14, onlyOn64: true)]
[NoTV]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // Not specified but very likely
interface SKStoreReviewController {
[Static]
[Export ("requestReview")]
void RequestReview ();
}
[iOS (11,2), TV (11,2), Mac (10,13,2)]
[BaseType (typeof (NSObject))]
interface SKProductSubscriptionPeriod {
@ -720,7 +722,7 @@ namespace StoreKit {
SKProductDiscountPaymentMode PaymentMode { get; }
}
[iOS (11,3), TV (11,3), NoMac]
[iOS (11,3), NoTV, NoMac]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SKAdNetwork {

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

@ -13,18 +13,19 @@ using ObjCRuntime;
namespace SystemConfiguration {
#if !MONOMAC
[Static]
interface CaptiveNetwork {
[NoTV][NoWatch][NoMac]
[Field ("kCNNetworkInfoKeyBSSID")]
NSString NetworkInfoKeyBSSID { get; }
[NoTV][NoWatch][NoMac]
[Field ("kCNNetworkInfoKeySSID")]
NSString NetworkInfoKeySSID { get; }
[NoTV][NoWatch][NoMac]
[Field ("kCNNetworkInfoKeySSIDData")]
NSString NetworkInfoKeySSIDData { get; }
}
#endif
}

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

@ -1,6 +1,9 @@
// Copyright 2015 Xamarin Inc.
// Copyright 2018 Microsoft Corporation
using System;
using System.ComponentModel;
using AVFoundation;
using Foundation;
using JavaScriptCore;
using ObjCRuntime;
@ -138,6 +141,63 @@ namespace TVMLKit {
Decoration
}
[TV (12,0)]
[Native]
public enum TVPlaybackState : long {
Undefined,
Begin,
Loading,
Playing,
Paused,
Scanning,
FastForwarding,
Rewinding,
End,
}
[TV (12,0)]
[Native]
public enum TVPlaylistRepeatMode : long {
None = 0,
All,
One,
}
[TV (12,0)]
[Native]
public enum TVPlaylistEndAction : long {
Stop = 0,
Pause,
WaitForMoreItems,
}
[TV (12,0)]
public enum TVMediaItemType {
// NS_TYPED_EXTENSIBLE_ENUM
[DefaultEnumValue]
UnknownCustomExtension = -1,
None,
[Field ("TVMediaItemTypeAudio")]
Audio,
[Field ("TVMediaItemTypeVideo")]
Video,
}
[TV (12,0)]
public enum TVMediaItemContentRatingDomain {
// NS_TYPED_EXTENSIBLE_ENUM
[DefaultEnumValue]
UnknownCustomExtension = -1,
[Field (null)] // property is nullable
None,
[Field ("TVMediaItemContentRatingDomainMovie")]
Movie,
[Field ("TVMediaItemContentRatingDomainTVShow")]
TVShow,
[Field ("TVMediaItemContentRatingDomainMusic")]
Music,
}
[TV (9,0)]
[BaseType (typeof (NSObject))]
interface TVApplicationControllerContext : NSCopying {
@ -166,6 +226,11 @@ namespace TVMLKit {
[Export ("appController:didStopWithOptions:")]
void DidStop (TVApplicationController appController, [NullAllowed] NSDictionary<NSString, NSObject> options);
[TV (12,0)]
[Export ("playerForAppController:")]
[return: NullAllowed]
TVPlayer GetPlayer (TVApplicationController appController);
}
interface ITVApplicationControllerDelegate {}
@ -806,6 +871,11 @@ namespace TVMLKit {
[Export ("collectionViewCellClassForElement:")]
[return: NullAllowed]
Class GetCollectionViewCellClass (TVViewElement element);
[TV (12,0)]
[Export ("playerViewControllerForPlayer:")]
[return: NullAllowed]
UIViewController GetPlayerViewController (TVPlayer player);
}
interface ITVInterfaceCreating {}
@ -844,4 +914,184 @@ namespace TVMLKit {
[Export ("attributedStringWithFont:foregroundColor:textAlignment:")]
NSAttributedString GetAttributedString (UIFont font, [NullAllowed] UIColor foregroundColor, UITextAlignment alignment);
}
interface ITVPlaybackEventMarshaling {}
[TV (12,0)]
[Protocol]
interface TVPlaybackEventMarshaling {
[Abstract]
[NullAllowed, Export ("properties", ArgumentSemantic.Strong)]
NSDictionary<NSString, NSObject> Properties { get; }
[Export ("processReturnJSValue:inContext:")]
void ProcessReturn (JSValue value, JSContext jsContext);
}
[TV (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface TVPlaybackCustomEventUserInfo : TVPlaybackEventMarshaling {
[Export ("initWithProperties:expectsReturnValue:")]
IntPtr Constructor ([NullAllowed] NSDictionary<NSString, NSObject> properties, bool expectsReturnValue);
[Export ("expectsReturnValue")]
bool ExpectsReturnValue { get; set; }
[NullAllowed, Export ("returnValue", ArgumentSemantic.Strong)]
NSObject ReturnValue { get; }
}
[TV (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface TVPlaylist {
[Export ("mediaItems", ArgumentSemantic.Copy)]
TVMediaItem[] MediaItems { get; }
[Export ("endAction", ArgumentSemantic.Assign)]
TVPlaylistEndAction EndAction { get; }
[Export ("repeatMode", ArgumentSemantic.Assign)]
TVPlaylistRepeatMode RepeatMode { get; }
[NullAllowed, Export ("userInfo", ArgumentSemantic.Copy)]
NSDictionary<NSString, NSObject> UserInfo { get; }
}
[TV (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface TVMediaItem {
[EditorBrowsable (EditorBrowsableState.Advanced)]
[NullAllowed, Export ("type", ArgumentSemantic.Strong)]
NSString /* NS_TYPED_EXTENSIBLE_ENUM */ WeakType { get; }
[Wrap ("TVMediaItemTypeExtensions.GetValue (WeakType)")]
TVMediaItemType Type { get; }
[NullAllowed, Export ("url", ArgumentSemantic.Strong)]
NSUrl Url { get; }
[NullAllowed, Export ("title", ArgumentSemantic.Strong)]
string Title { get; }
[NullAllowed, Export ("subtitle", ArgumentSemantic.Strong)]
string Subtitle { get; }
[NullAllowed, Export ("itemDescription", ArgumentSemantic.Strong)]
string ItemDescription { get; }
[EditorBrowsable (EditorBrowsableState.Advanced)]
[NullAllowed, Export ("contentRatingDomain", ArgumentSemantic.Strong)]
NSString /* NS_TYPED_EXTENSIBLE_ENUM */ WeakContentRatingDomain { get; }
[Wrap ("TVMediaItemContentRatingDomainExtensions.GetValue (WeakContentRatingDomain)")]
TVMediaItemContentRatingDomain ContentRatingDomain { get; }
[NullAllowed, Export ("contentRatingRanking", ArgumentSemantic.Strong)]
NSNumber ContentRatingRanking { get; }
[NullAllowed, Export ("artworkImageURL", ArgumentSemantic.Strong)]
NSUrl ArtworkImageUrl { get; }
[Export ("explicit")]
bool Explicit { [Bind ("isExplicit")] get; }
[Export ("resumeTime")]
/* NSInterval */ double ResumeTime { get; }
[Export ("interstitials", ArgumentSemantic.Strong)]
TVTimeRange[] Interstitials { get; }
[Export ("highlightGroups", ArgumentSemantic.Strong)]
TVHighlightGroup[] HighlightGroups { get; }
[Export ("userInfo", ArgumentSemantic.Strong)]
NSDictionary<NSString, NSObject> UserInfo { get; }
}
[TV (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface TVTimeRange {
[Export ("startTime")]
/* NSInterval */ double StartTime { get; }
[Export ("endTime")]
/* NSInterval */ double EndTime { get; }
[Export ("duration")]
/* NSInterval */ double Duration { get; }
}
[TV (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface TVHighlightGroup {
[NullAllowed, Export ("localizedName", ArgumentSemantic.Strong)]
string LocalizedName { get; }
[Export ("highlights", ArgumentSemantic.Strong)]
TVHighlight[] Highlights { get; }
}
[TV (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface TVHighlight {
[NullAllowed, Export ("localizedName", ArgumentSemantic.Strong)]
string LocalizedName { get; }
[NullAllowed, Export ("highlightDescription", ArgumentSemantic.Strong)]
string HighlightDescription { get; }
[Export ("timeRange", ArgumentSemantic.Strong)]
TVTimeRange TimeRange { get; }
[NullAllowed, Export ("imageURL", ArgumentSemantic.Strong)]
NSUrl ImageUrl { get; }
}
[TV (12,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface TVPlayer {
[Export ("initWithPlayer:")]
IntPtr Constructor (AVPlayer player);
[Export ("player", ArgumentSemantic.Strong)]
AVPlayer Player { get; }
[NullAllowed, Export ("playlist", ArgumentSemantic.Strong)]
TVPlaylist Playlist { get; }
[Export ("state", ArgumentSemantic.Assign)]
TVPlaybackState State { get; }
[NullAllowed, Export ("currentMediaItem", ArgumentSemantic.Strong)]
TVMediaItem CurrentMediaItem { get; }
[NullAllowed, Export ("nextMediaItem", ArgumentSemantic.Strong)]
TVMediaItem NextMediaItem { get; }
[NullAllowed, Export ("previousMediaItem", ArgumentSemantic.Strong)]
TVMediaItem PreviousMediaItem { get; }
[Async]
[Export ("dispatchEvent:userInfo:completion:")]
void DispatchEvent (string @event, [NullAllowed] ITVPlaybackEventMarshaling userInfo, [NullAllowed] Action<bool> completion);
[Export ("pause")]
void Pause ();
[Export ("next")]
void Next ();
[Export ("previous")]
void Previous ();
[Export ("changeToMediaItemAtIndex:")]
void ChangeToMediaItem (nint index);
}
}

175
src/tvuikit.cs Normal file
Просмотреть файл

@ -0,0 +1,175 @@
// Copyright 2018 Microsoft Corporation
using System;
using System.ComponentModel;
using CoreGraphics;
using Foundation;
using ObjCRuntime;
using UIKit;
namespace TVUIKit {
[TV (12,0)]
[Native]
public enum TVCaptionButtonViewMotionDirection : long {
None = 0,
Horizontal,
Vertical,
All,
}
[TV (12,0)]
[BaseType (typeof (UIControl))]
[DisableDefaultCtor] // initWithFrame is the designated initializer
interface TVLockupView {
[DesignatedInitializer] // inlined
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
[Export ("contentView", ArgumentSemantic.Strong)]
UIView ContentView { get; }
[Export ("contentSize", ArgumentSemantic.Assign)]
CGSize ContentSize { get; set; }
[Export ("headerView", ArgumentSemantic.Strong)]
TVLockupHeaderFooterView HeaderView { get; set; }
[Export ("footerView", ArgumentSemantic.Strong)]
TVLockupHeaderFooterView FooterView { get; set; }
[Export ("contentViewInsets", ArgumentSemantic.Assign)]
NSDirectionalEdgeInsets ContentViewInsets { get; set; }
[Export ("focusSizeIncrease", ArgumentSemantic.Assign)]
NSDirectionalEdgeInsets FocusSizeIncrease { get; set; }
}
[TV (12,0)]
[BaseType (typeof (TVLockupView))]
interface TVCaptionButtonView {
[DesignatedInitializer] // inlined
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
[Export ("motionDirection", ArgumentSemantic.Assign)]
TVCaptionButtonViewMotionDirection MotionDirection { get; set; }
[NullAllowed, Export ("contentImage", ArgumentSemantic.Strong)]
UIImage ContentImage { get; set; }
[NullAllowed, Export ("contentText")]
string ContentText { get; set; }
[NullAllowed, Export ("title")]
string Title { get; set; }
[NullAllowed, Export ("subtitle")]
string Subtitle { get; set; }
}
[TV (12,0)]
[BaseType (typeof (TVLockupView))]
interface TVCardView {
[DesignatedInitializer] // inlined
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
[NullAllowed, Export ("cardBackgroundColor", ArgumentSemantic.Strong)]
UIColor CardBackgroundColor { get; set; }
}
[TV (12,0)]
[BaseType (typeof (UIViewController))]
// note: full screen so the default init makes sense
interface TVDigitEntryViewController {
[Export ("entryCompletionHandler", ArgumentSemantic.Copy)]
Action<NSString> EntryCompletionHandler { get; set; }
[NullAllowed, Export ("titleText")]
string TitleText { get; set; }
[NullAllowed, Export ("promptText")]
string PromptText { get; set; }
[Export ("secureDigitEntry")]
bool SecureDigitEntry { [Bind ("isSecureDigitEntry")] get; set; }
[Export ("numberOfDigits")]
nuint NumberOfDigits { get; set; }
[Export ("clearEntryAnimated:")]
void ClearEntry (bool animated);
}
[TV (12,0)]
[Protocol]
interface TVLockupViewComponent {
[Export ("updateAppearanceForLockupViewState:")]
void UpdateAppearanceForLockupView (UIControlState state);
}
[TV (12,0)]
[BaseType (typeof (UIView))]
[DisableDefaultCtor] // initWithFrame is the designated initializer
interface TVLockupHeaderFooterView : TVLockupViewComponent {
[DesignatedInitializer] // inlined
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
[NullAllowed, Export ("titleLabel", ArgumentSemantic.Strong)]
UILabel TitleLabel { get; }
[NullAllowed, Export ("subtitleLabel", ArgumentSemantic.Strong)]
UILabel SubtitleLabel { get; }
[Export ("showsOnlyWhenAncestorFocused")]
bool ShowsOnlyWhenAncestorFocused { get; set; }
}
[TV (12,0)]
[BaseType (typeof (TVLockupView))]
interface TVMonogramView {
[DesignatedInitializer] // inlined
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
[NullAllowed, Export ("personNameComponents", ArgumentSemantic.Strong)]
NSPersonNameComponents PersonNameComponents { get; set; }
[NullAllowed, Export ("image", ArgumentSemantic.Strong)]
UIImage Image { get; set; }
[NullAllowed, Export ("title")]
string Title { get; set; }
[NullAllowed, Export ("subtitle")]
string Subtitle { get; set; }
}
[TV (12,0)]
[BaseType (typeof (TVLockupView))]
interface TVPosterView {
[DesignatedInitializer] // inlined
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
[Export ("initWithImage:")]
IntPtr Constructor ([NullAllowed] UIImage image);
[NullAllowed, Export ("image", ArgumentSemantic.Strong)]
UIImage Image { get; set; }
[NullAllowed, Export ("title")]
string Title { get; set; }
[NullAllowed, Export ("subtitle")]
string Subtitle { get; set; }
}
}

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

@ -5121,7 +5121,7 @@ namespace UIKit {
// Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: do not call -[UIDocument init] - the designated initializer is -[UIDocument initWithFileURL:
[DisableDefaultCtor]
[ThreadSafe]
interface UIDocument : NSFilePresenter, NSProgressReporting {
interface UIDocument : NSFilePresenter, NSProgressReporting, UIUserActivityRestoring {
[Export ("localizedName", ArgumentSemantic.Copy)]
string LocalizedName { get; }
@ -5233,10 +5233,6 @@ namespace UIKit {
[Export ("updateUserActivityState:")]
void UpdateUserActivityState (NSUserActivity userActivity);
[iOS (8,0)]
[Export ("restoreUserActivityState:")]
void RestoreUserActivityState (NSUserActivity userActivity);
[iOS (8,0)]
[Field ("NSUserActivityDocumentURLKey")]
NSString UserActivityDocumentUrlKey { get; }
@ -5703,8 +5699,8 @@ namespace UIKit {
[Field ("UIFontTextStyleCallout")]
Callout,
[NoWatch, NoTV]
[iOS (11,0)]
[NoTV]
[iOS (11,0), Watch (5,0)]
[Field ("UIFontTextStyleLargeTitle")]
LargeTitle,
}
@ -6133,6 +6129,8 @@ namespace UIKit {
[Export ("opaque")]
bool Opaque { get; set; }
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the 'PreferredRange' property instead.")]
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use the 'PreferredRange' property instead.")]
[Export ("prefersExtendedRange")]
bool PrefersExtendedRange { get; set; }
@ -6145,6 +6143,10 @@ namespace UIKit {
[Static]
[Export ("formatForTraitCollection:")]
UIGraphicsImageRendererFormat GetFormat (UITraitCollection traitCollection);
[TV (12, 0), iOS (12, 0)]
[Export ("preferredRange", ArgumentSemantic.Assign)]
UIGraphicsImageRendererFormatRange PreferredRange { get; set; }
}
[iOS (10,0), TV (10,0)]
@ -6321,6 +6323,10 @@ namespace UIKit {
[iOS (11,0), TV (11,0)]
[Export ("smartInsertDeleteType", ArgumentSemantic.Assign)]
UITextSmartInsertDeleteType SmartInsertDeleteType { get; set; }
[iOS (12, 0)]
[NullAllowed, Export ("passwordRules", ArgumentSemantic.Copy)]
UITextInputPasswordRules PasswordRules { get; set; }
}
interface UIKeyboardEventArgs {
@ -7987,6 +7993,10 @@ namespace UIKit {
[iOS (9,0)]
[Export ("allowsDefaultTighteningForTruncation")]
bool AllowsDefaultTighteningForTruncation { get; set; }
[TV (12, 0), NoWatch, NoiOS]
[Export ("enablesMarqueeWhenAncestorFocused")]
bool EnablesMarqueeWhenAncestorFocused { get; set; }
}
[BaseType (typeof (UIView))]
@ -9712,7 +9722,7 @@ namespace UIKit {
}
[BaseType (typeof (NSObject))]
interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus
interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus, UIUserActivityRestoring
#if !TVOS
, UIAccessibilityDragging
#endif // !TVOS
@ -9862,10 +9872,6 @@ namespace UIKit {
[Export ("updateUserActivityState:")]
void UpdateUserActivityState (NSUserActivity activity);
[iOS (8,0)]
[Export ("restoreUserActivityState:")]
void RestoreUserActivityState (NSUserActivity activity);
[iOS (9,0)]
[Export ("pressesBegan:withEvent:")]
void PressesBegan (NSSet<UIPress> presses, UIPressesEvent evt);
@ -10024,15 +10030,12 @@ namespace UIKit {
}
[BaseType (typeof (UIView), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UIScrollViewDelegate)})]
interface UIScrollView {
interface UIScrollView : UIFocusItemScrollableContainer {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
[Export ("contentOffset")]
CGPoint ContentOffset { get; set; }
[Export ("contentSize")]
CGSize ContentSize { get; set; }
new CGSize ContentSize { get; set; }
[Export ("contentInset")]
UIEdgeInsets ContentInset { get; set; }
@ -12886,7 +12889,7 @@ namespace UIKit {
}
[BaseType (typeof (UIResponder))]
interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynamicItem, NSCoding, UIAccessibilityIdentification, UITraitEnvironment, UICoordinateSpace, UIFocusItem, CALayerDelegate {
interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynamicItem, NSCoding, UIAccessibilityIdentification, UITraitEnvironment, UICoordinateSpace, UIFocusItem, CALayerDelegate, UIFocusItemContainer {
[DesignatedInitializer]
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
@ -12995,7 +12998,7 @@ namespace UIKit {
CoreAnimation.CALayer Layer { get; }
[Export ("frame")]
CGRect Frame { get; set; }
new CGRect Frame { get; set; }
[Export ("center")]
new CGPoint Center { get; set; }
@ -14320,7 +14323,7 @@ namespace UIKit {
[Export ("userInterfaceIdiom")]
UIUserInterfaceIdiom UserInterfaceIdiom { get; }
[TV (10, 0), NoWatch, NoiOS]
[TV (10, 0), NoWatch, iOS (12,0)]
[Export ("userInterfaceStyle")]
UIUserInterfaceStyle UserInterfaceStyle { get; }
@ -14355,7 +14358,7 @@ namespace UIKit {
[Static, Export ("traitCollectionWithForceTouchCapability:")]
UITraitCollection FromForceTouchCapability (UIForceTouchCapability capability);
[TV (10, 0), NoWatch, NoiOS]
[TV (10, 0), NoWatch, iOS (12,0)]
[Static]
[Export ("traitCollectionWithUserInterfaceStyle:")]
UITraitCollection FromUserInterfaceStyle (UIUserInterfaceStyle userInterfaceStyle);
@ -14862,6 +14865,14 @@ namespace UIKit {
[iOS (11,0), TV (11,0)]
[Field ("UITextContentTypePassword")]
NSString Password { get; }
[TV (12, 0), iOS (12, 0)]
[Field ("UITextContentTypeNewPassword")]
NSString NewPassword { get; }
[TV (12, 0), iOS (12, 0)]
[Field ("UITextContentTypeOneTimeCode")]
NSString OneTimeCode { get; }
}
[BaseType (typeof (UIViewController), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UISplitViewControllerDelegate)})]
@ -16679,6 +16690,27 @@ namespace UIKit {
IUIFocusEnvironment[] PreferredFocusEnvironments { get; set; }
}
[TV (12,0), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface UIFocusMovementHint : NSCopying
{
[Export ("movementDirection")]
CGVector MovementDirection { get; }
[Export ("perspectiveTransform")]
CATransform3D PerspectiveTransform { get; }
[Export ("rotation")]
CGVector Rotation { get; }
[Export ("translation")]
CGVector Translation { get; }
[Export ("interactionTransform")]
CATransform3D InteractionTransform { get; }
}
interface IUIFocusItem {}
[iOS (10,0)]
[Protocol]
@ -16687,6 +16719,19 @@ namespace UIKit {
[Abstract]
[Export ("canBecomeFocused")]
bool CanBecomeFocused { get; }
// FIXME: declared as a @required, but this breaks compatibility
// Radar: 41121416
[TV (12, 0), iOS (12, 0), NoWatch]
#if XAMCORE_4_0
[Abstract]
#endif
[Export ("frame")]
CGRect Frame { get; }
[TV (12, 0), iOS (12, 0), NoWatch]
[Export ("didHintFocusMovement:")]
void DidHintFocusMovement (UIFocusMovementHint hint);
}
[DisableDefaultCtor] // [Assert] -init is not a useful initializer for this class. Use one of the designated initializers instead
@ -16747,6 +16792,24 @@ namespace UIKit {
// The 2 values associated with the 'UIFocusSoundIdentifier' smart enum cannot be used.
// See https://developer.apple.com/documentation/uikit/uifocussystem/2887479-register
// Do not specify one of the UIKit sound identifiers (such as default); doing so will cause an immediate assertion failure and crash your app.
[TV (12, 0), iOS (12, 0)]
[NullAllowed, Export ("focusedItem", ArgumentSemantic.Weak)]
IUIFocusItem FocusedItem { get; }
[TV (12,0), iOS (12,0)]
[Static]
[Export ("focusSystemForEnvironment:")]
[return: NullAllowed]
UIFocusSystem Create (IUIFocusEnvironment environment);
[TV (12,0), iOS (12,0)]
[Export ("requestFocusUpdateToEnvironment:")]
void RequestFocusUpdate (IUIFocusEnvironment environment);
[TV (12,0), iOS (12,0)]
[Export ("updateFocusIfNeeded")]
void UpdateFocusIfNeeded ();
}
interface IUIFocusDebuggerOutput {}
@ -16930,7 +16993,35 @@ namespace UIKit {
[Export ("soundIdentifierForFocusUpdateInContext:")]
[return: NullAllowed]
NSString GetSoundIdentifier (UIFocusUpdateContext context);
// FIXME: declared as a @required, but this breaks compatibility
// Radar: 41121293
[TV (12, 0), iOS (12, 0)]
#if XAMCORE_4_0
[Abstract]
#endif
[NullAllowed, Export ("parentFocusEnvironment", ArgumentSemantic.Weak)]
IUIFocusEnvironment ParentFocusEnvironment { get; }
[TV (12, 0), iOS (12, 0)]
#if XAMCORE_4_0
[Abstract]
#endif
[NullAllowed, Export ("focusItemContainer")]
IUIFocusItemContainer FocusItemContainer { get; }
}
[TV (12,0), iOS (12,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface UITextInputPasswordRules : NSSecureCoding, NSCopying
{
[Export ("passwordRulesDescriptor")]
string PasswordRulesDescriptor { get; }
[Static]
[Export ("passwordRulesWithDescriptor:")]
UITextInputPasswordRules Create (string passwordRulesDescriptor);
}
#endif // !WATCH
@ -18235,6 +18326,48 @@ namespace UIKit {
[Export ("supportsMultipleItems")]
bool SupportsMultipleItems { get; set; }
}
interface IUIFocusItemContainer {}
[iOS (12,0), TV (12,0), NoWatch]
[Protocol]
interface UIFocusItemContainer
{
[Abstract]
[Export ("coordinateSpace")]
IUICoordinateSpace CoordinateSpace { get; }
[Abstract]
[Export ("focusItemsInRect:")]
IUIFocusItem[] GetFocusItems (CGRect rect);
}
[iOS (12,0), TV(12,0), NoWatch]
[Protocol]
interface UIFocusItemScrollableContainer : UIFocusItemContainer
{
[Abstract]
[Export ("contentOffset", ArgumentSemantic.Assign)]
CGPoint ContentOffset { get; set; }
[Abstract]
[Export ("contentSize")]
CGSize ContentSize { get; }
[Abstract]
[Export ("visibleSize")]
CGSize VisibleSize { get; }
}
[iOS (8,0), NoWatch] // it was added on 8,0, but was not binded and the method was added in 12,0
[Protocol]
interface UIUserActivityRestoring
{
[Abstract]
[iOS (8,0), TV(12,0)]
[Export ("restoreUserActivityState:")]
void RestoreUserActivityState (NSUserActivity activity);
}
#endif // !WATCH
[Watch (4,0), TV (11,0), iOS (11,0)]
@ -18276,4 +18409,5 @@ namespace UIKit {
nfloat GetScaledValue (nfloat value, [NullAllowed] UITraitCollection traitCollection);
#endif // !WATCH
}
}

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

@ -22,6 +22,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[ErrorDomain ("UNErrorDomain")]
[Native]
public enum UNErrorCode : long {
@ -38,6 +39,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[Native]
[Flags]
@ -50,6 +52,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[Native]
[Flags]
@ -64,16 +67,20 @@ namespace UserNotifications {
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Native]
public enum UNAuthorizationStatus : long {
NotDetermined = 0,
Denied,
Authorized
Authorized,
[iOS (12, 0), TV (12, 0), Watch (5, 0)]
Provisional,
}
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Native]
public enum UNNotificationSetting : long {
NotSupported = 0,
@ -82,6 +89,7 @@ namespace UserNotifications {
}
[iOS (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[Unavailable (PlatformName.WatchOS)]
[Native]
@ -94,6 +102,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Native]
[Flags]
public enum UNAuthorizationOptions : ulong {
@ -101,12 +110,20 @@ namespace UserNotifications {
Badge = (1 << 0),
Sound = (1 << 1),
Alert = (1 << 2),
CarPlay = (1 << 3)
CarPlay = (1 << 3),
[iOS (12, 0), TV(12,0), Watch (5,0)]
CriticalAlert = (1 << 4),
[iOS (12, 0), TV(12,0), Watch (5,0)]
ProvidesAppNotificationSettings = (1 << 5),
[iOS (12, 0), TV(12,0), Watch (5,0)]
Provisional = (1 << 6),
}
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Native]
[Flags]
public enum UNNotificationPresentationOptions : ulong {
@ -117,6 +134,7 @@ namespace UserNotifications {
}
[NoWatch, NoTV, iOS (11,0)]
[Mac (10,14, onlyOn64: true)]
[Native]
public enum UNShowPreviewsSetting : long
{
@ -128,6 +146,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // as per docs (not user created)
interface UNNotification : NSCopying, NSSecureCoding {
@ -141,6 +160,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // as per docs (use FromIdentifier)
@ -162,6 +182,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[BaseType (typeof (UNNotificationAction))]
[DisableDefaultCtor] // as per docs (use FromIdentifier)
@ -180,6 +201,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // as per docs (use FromIdentifier)
@ -202,6 +224,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[Static]
[Internal]
@ -251,6 +274,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // as per docs (use FromIdentifier)
@ -281,11 +305,21 @@ namespace UserNotifications {
[Export ("categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:options:")]
UNNotificationCategory FromIdentifier (string identifier, UNNotificationAction[] actions, string[] intentIdentifiers, string hiddenPreviewsBodyPlaceholder, UNNotificationCategoryOptions options);
[NoWatch, iOS (12,0)]
[Static]
[Export ("categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:categorySummaryFormat:options:")]
UNNotificationCategory FromIdentifier (string identifier, UNNotificationAction[] actions, string[] intentIdentifiers, [NullAllowed] string hiddenPreviewsBodyPlaceholder, [NullAllowed] string categorySummaryFormat, UNNotificationCategoryOptions options);
[NoWatch, iOS (12, 0)]
[Export ("categorySummaryFormat")]
string CategorySummaryFormat { get; }
}
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // as per docs
interface UNNotificationContent : NSCopying, NSMutableCopying, NSSecureCoding {
@ -328,11 +362,20 @@ namespace UserNotifications {
[Unavailable (PlatformName.TvOS)]
[Export ("userInfo", ArgumentSemantic.Copy)]
NSDictionary UserInfo { get; }
[NoWatch, NoTV, iOS (12, 0)]
[Export ("summaryArgument")]
string SummaryArgument { get; }
[NoWatch, NoTV, iOS (12, 0)]
[Export ("summaryArgumentCount")]
nuint SummaryArgumentCount { get; }
}
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (UNNotificationContent))]
interface UNMutableNotificationContent {
@ -373,11 +416,20 @@ namespace UserNotifications {
[Export ("userInfo", ArgumentSemantic.Copy)]
NSDictionary UserInfo { get; set; }
[NoWatch, NoTV, iOS (12, 0)]
[Export ("summaryArgument")]
string SummaryArgument { get; set; }
[NoWatch, NoTV, iOS (12, 0)]
[Export ("summaryArgumentCount")]
nuint SummaryArgumentCount { get; set; }
}
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface UNNotificationRequest : NSCopying, NSSecureCoding {
@ -398,6 +450,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[Static]
[Internal]
@ -412,6 +465,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // as per docs
@ -435,6 +489,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[BaseType (typeof (UNNotificationResponse))]
[DisableDefaultCtor] // as per docs
@ -445,6 +500,7 @@ namespace UserNotifications {
}
[iOS (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[Unavailable (PlatformName.WatchOS)]
[BaseType (typeof (NSObject))]
@ -462,6 +518,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // as per docs
interface UNNotificationSettings : NSCopying, NSSecureCoding {
@ -503,10 +560,19 @@ namespace UserNotifications {
[NoWatch, NoTV, iOS (11, 0)]
[Export ("showPreviewsSetting")]
UNShowPreviewsSetting ShowPreviewsSetting { get; }
[Watch (5, 0), NoTV, Mac (10, 14, onlyOn64: true), iOS (12, 0)]
[Export ("criticalAlertSetting")]
UNNotificationSetting CriticalAlertSetting { get; }
[Watch (5, 0), NoTV, Mac (10, 14, onlyOn64: true), iOS (12, 0)]
[Export ("providesAppNotificationSettings")]
bool ProvidesAppNotificationSettings { get; }
}
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // as per docs (use provided methods)
@ -520,6 +586,26 @@ namespace UserNotifications {
[Static]
[Export ("soundNamed:")]
UNNotificationSound GetSound (string name);
[Watch (5, 0), iOS (12, 0)]
[Static]
[Export ("defaultCriticalSound", ArgumentSemantic.Copy)]
UNNotificationSound DefaultCriticalSound { get; }
[Watch (5,0), iOS (12,0)]
[Static]
[Export ("defaultCriticalSoundWithAudioVolume:")]
UNNotificationSound GetDefaultCriticalSound (float volume);
[NoWatch, iOS (12,0)]
[Static]
[Export ("criticalSoundNamed:")]
UNNotificationSound GetCriticalSound (string name);
[NoWatch, iOS (12,0)]
[Static]
[Export ("criticalSoundNamed:withAudioVolume:")]
UNNotificationSound GetCriticalSound (string name, float volume);
}
[iOS (10, 0)]
@ -537,6 +623,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (UNNotificationTrigger))]
[DisableDefaultCtor] // as per docs (system created)
interface UNPushNotificationTrigger {
@ -546,6 +633,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (UNNotificationTrigger))]
[DisableDefaultCtor] // as per doc, use supplied method (CreateTrigger)
interface UNTimeIntervalNotificationTrigger {
@ -564,6 +652,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[DisableDefaultCtor] // as per doc, use supplied method (CreateTrigger)
[BaseType (typeof (UNNotificationTrigger))]
interface UNCalendarNotificationTrigger {
@ -581,6 +670,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.TvOS)]
[BaseType (typeof (UNNotificationTrigger))]
[DisableDefaultCtor] // as per doc, use supplied method (CreateTrigger)
@ -600,6 +690,7 @@ namespace UserNotifications {
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[Protocol, Model]
[BaseType (typeof (NSObject))]
interface UNUserNotificationCenterDelegate {
@ -610,11 +701,16 @@ namespace UserNotifications {
[Unavailable (PlatformName.TvOS)]
[Export ("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")]
void DidReceiveNotificationResponse (UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler);
[NoWatch, NoTV, Mac (10,14, onlyOn64: true), iOS (12,0)]
[Export ("userNotificationCenter:openSettingsForNotification:")]
void OpenSettings (UNUserNotificationCenter center, [NullAllowed] UNNotification notification);
}
[iOS (10, 0)]
[TV (10, 0)]
[Watch (3, 0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface UNUserNotificationCenter {

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

@ -83,6 +83,23 @@ namespace UserNotificationsUI {
[Export ("mediaPlayingPaused")]
void MediaPlayingPaused ();
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Export ("performNotificationDefaultAction")]
void PerformNotificationDefaultAction ();
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Export ("dismissNotificationContentExtension")]
void DismissNotificationContentExtension ();
// property, but we have to add the two methods since it is a category.
[iOS (12, 0)]
[Export ("notificationActions")]
UNNotificationAction[] GetNotificationActions ();
[iOS (12, 0)]
[Export ("setNotificationActions:")]
void SetNotificationActions (UNNotificationAction[] actions);
}
}

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

@ -5,18 +5,24 @@
// Alex Soto <alex.soto@xamarin.com>
//
// Copyright 2016 Xamarin Inc. All rights reserved.
// Copyright 2018 Microsoft Corporation.
//
using System;
using Foundation;
using ObjCRuntime;
#if MONOMAC
using UIViewController = AppKit.NSViewController;
#else
using UIKit;
#endif
namespace VideoSubscriberAccount {
[Native]
[iOS (10, 0)]
[TV (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.WatchOS)]
[ErrorDomain ("VSErrorDomain")]
public enum VSErrorCode : long {
@ -31,6 +37,7 @@ namespace VideoSubscriberAccount {
[Native]
[iOS (10, 0)]
[TV (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.WatchOS)]
public enum VSAccountAccessStatus : long {
NotDetermined = 0,
@ -41,6 +48,7 @@ namespace VideoSubscriberAccount {
[iOS (10, 0)]
[TV (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.WatchOS)]
[Static]
[Internal]
@ -62,6 +70,7 @@ namespace VideoSubscriberAccount {
[iOS (10, 0)]
[TV (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.WatchOS)]
[StrongDictionary ("VSErrorInfoKeys")]
interface VSErrorInfo {
@ -81,6 +90,7 @@ namespace VideoSubscriberAccount {
[Protocol, Model]
[iOS (10, 0)]
[TV (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.WatchOS)]
[BaseType (typeof (NSObject))]
interface VSAccountManagerDelegate {
@ -100,6 +110,7 @@ namespace VideoSubscriberAccount {
[iOS (10, 0)]
[TV (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.WatchOS)]
[BaseType (typeof (NSObject))]
interface VSAccountManager {
@ -107,10 +118,12 @@ namespace VideoSubscriberAccount {
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
IVSAccountManagerDelegate Delegate { get; set; }
[NoMac]
[Async]
[Export ("checkAccessStatusWithOptions:completionHandler:")]
void CheckAccessStatus (NSDictionary options, Action<VSAccountAccessStatus, NSError> completionHandler);
[NoMac]
[Async]
[Export ("enqueueAccountMetadataRequest:completionHandler:")]
VSAccountManagerResult Enqueue (VSAccountMetadataRequest accountMetadataRequest, Action<VSAccountMetadata, NSError> completionHandler);
@ -118,6 +131,7 @@ namespace VideoSubscriberAccount {
[iOS (10, 0)]
[TV (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.WatchOS)]
[Static]
[Internal]
@ -129,6 +143,7 @@ namespace VideoSubscriberAccount {
[iOS (10, 0)]
[TV (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.WatchOS)]
[StrongDictionary ("VSCheckAccessOptionKeys")]
interface VSAccountManagerAccessOptions {
@ -139,6 +154,7 @@ namespace VideoSubscriberAccount {
[iOS (10, 0)]
[TV (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.WatchOS)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
@ -150,6 +166,7 @@ namespace VideoSubscriberAccount {
[iOS (10, 0)]
[TV (10, 0)]
[Mac (10,14, onlyOn64: true)]
[Unavailable (PlatformName.WatchOS)]
[BaseType (typeof (NSObject))]
interface VSAccountMetadata {
@ -172,6 +189,7 @@ namespace VideoSubscriberAccount {
}
[iOS (10, 0)]
[Mac (10,14, onlyOn64: true)]
[TV (10, 0)]
[Unavailable (PlatformName.WatchOS)]
[BaseType (typeof (NSObject))]
@ -216,6 +234,7 @@ namespace VideoSubscriberAccount {
[iOS (10,2)]
[TV (10,1)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (NSObject))]
interface VSAccountProviderResponse {
@ -235,12 +254,14 @@ namespace VideoSubscriberAccount {
[iOS (10,2)]
[TV (10,1)]
[Mac (10,14, onlyOn64: true)]
enum VSAccountProviderAuthenticationScheme {
[Field ("VSAccountProviderAuthenticationSchemeSAML")]
Saml,
}
[TV (11,0)][iOS (11,0)]
[Mac (10,14, onlyOn64: true)]
[Native]
public enum VSSubscriptionAccessLevel : long {
Unknown,
@ -249,6 +270,7 @@ namespace VideoSubscriberAccount {
}
[TV (11,0)][iOS (11,0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (NSObject))]
interface VSSubscription {
[Export ("expirationDate", ArgumentSemantic.Copy)]
@ -266,6 +288,7 @@ namespace VideoSubscriberAccount {
}
[TV (11,0)][iOS (11,0)]
[Mac (10,14, onlyOn64: true)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface VSSubscriptionRegistrationCenter {

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

@ -42,6 +42,10 @@ namespace VideoToolbox {
[Field ("kVTCompressionPropertyKey_AllowFrameReordering")]
NSString AllowFrameReordering { get; }
[Mac (10,14, onlyOn64: true), iOS (12,0), TV (12,0)]
[Field ("kVTCompressionPropertyKey_AllowOpenGOP")]
NSString AllowOpenGop { get; }
// Rate control
[Field ("kVTCompressionPropertyKey_AverageBitRate")]
@ -83,6 +87,10 @@ namespace VideoToolbox {
[Mac (10,9)]
NSString RealTime { get; }
[Field ("kVTCompressionPropertyKey_MaximizePowerEfficiency")]
[Mac (10,14, onlyOn64: true), iOS (12,0), TV (12,0)]
NSString MaximizePowerEfficiency { get; }
// Hints
[Field ("kVTCompressionPropertyKey_SourceFrameCount")]
@ -189,6 +197,10 @@ namespace VideoToolbox {
[Export ("AllowFrameReordering")]
bool AllowFrameReordering { get; set; }
[Mac (10,14, onlyOn64: true), iOS (12,0), TV (12,0)]
[Export ("AllowOpenGop")]
bool AllowOpenGop { get; set; }
[Export ("AverageBitRate")]
int AverageBitRate { get; set; }
@ -214,6 +226,10 @@ namespace VideoToolbox {
[Export ("RealTime")]
bool RealTime { get; set; }
[Mac (10,14, onlyOn64: true), iOS (12,0), TV (12,0)]
[Export ("MaximizePowerEfficiency")]
bool MaximizePowerEfficiency { get; set; }
[Export ("SourceFrameCount")]
uint SourceFrameCount { get; set; }
@ -551,6 +567,10 @@ namespace VideoToolbox {
[Mac (10,10)]
NSString RealTime { get; }
[Field ("kVTDecompressionPropertyKey_MaximizePowerEfficiency")]
[Mac (10,14, onlyOn64: true), iOS (12,0), TV (12,0)]
NSString MaximizePowerEfficiency { get; }
[Field ("kVTDecompressionPropertyKey_ThreadCount")]
NSString ThreadCount { get; }
@ -660,6 +680,10 @@ namespace VideoToolbox {
[Export ("RealTime")]
bool RealTime { get; set; }
[Mac (10,14, onlyOn64: true), iOS (12,0), TV (12,0)]
[Export ("MaximizePowerEfficiency")]
bool MaximizePowerEfficiency { get; set; }
[Export ("ThreadCount")]
uint ThreadCount { get; set; }

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

@ -234,7 +234,8 @@ function install_visual_studio () {
function install_specific_xcode () {
local XCODE_URL=`grep XCODE$1_URL= Make.config | sed 's/.*=//'`
local XCODE_VERSION=`grep XCODE$1_VERSION= Make.config | sed 's/.*=//'`
local XCODE_ROOT=$(dirname $(dirname $XCODE$1_DEVELOPER_ROOT))
local XCODE_DEVELOPER_ROOT="$2"
local XCODE_ROOT="$(dirname "$(dirname "$XCODE_DEVELOPER_ROOT")")"
if test -z $XCODE_URL; then
fail "No XCODE$1_URL set in Make.config, cannot provision"
@ -248,9 +249,9 @@ function install_specific_xcode () {
# To test this script with new Xcode versions, copy the downloaded file to $XCODE_DMG,
# uncomment the following curl line, and run ./system-dependencies.sh --provision-xcode
if test -f "~/Downloads/$XCODE_NAME"; then
log "Found XCode $XCODE_VERSION in your ~/Downloads folder, copying that version instead."
cp "~/Downloads/$XCODE_NAME" "$XCODE_DMG"
if test -f "$HOME/Downloads/$XCODE_NAME"; then
log "Found Xcode $XCODE_VERSION in your ~/Downloads folder, copying that version instead."
cp "$HOME/Downloads/$XCODE_NAME" "$XCODE_DMG"
else
curl -L $XCODE_URL > $XCODE_DMG
fi
@ -319,7 +320,7 @@ function check_specific_xcode () {
if ! test -d $XCODE_DEVELOPER_ROOT; then
if ! test -z $PROVISION_XCODE; then
if ! test -z $ENABLE_XAMARIN; then
install_specific_xcode $1
install_specific_xcode "$1" "$XCODE_DEVELOPER_ROOT"
else
fail "Automatic provisioning of Xcode is only supported for provisioning internal build bots."
fail "Please download and install Xcode $XCODE_VERSION here: https://developer.apple.com/downloads/index.action?name=Xcode"

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

@ -348,7 +348,7 @@ wrench-%:
wrench-jenkins: xharness/xharness.exe
$(Q) rm -f $@-failed.stamp
$(Q) ulimit -n 4096 && $(SYSTEM_MONO) --debug $< $(XHARNESS_VERBOSITY) --jenkins --autoconf --rootdir $(CURDIR) --sdkroot $(XCODE_DEVELOPER_ROOT) --label run-all-tests,skip-ios-device-tests --markdown-summary=$(abspath $(CURDIR))/TestSummary.md $(TESTS_PERIODIC_COMMAND) || echo "$$?" > $@-failed.stamp
$(Q) ulimit -n 4096 && $(SYSTEM_MONO) --debug $< $(XHARNESS_VERBOSITY) --jenkins --autoconf --rootdir $(CURDIR) --sdkroot $(XCODE_DEVELOPER_ROOT) --label run-all-tests,skip-ios-device-tests,skip-mac-32-tests --markdown-summary=$(abspath $(CURDIR))/TestSummary.md $(TESTS_PERIODIC_COMMAND) || echo "$$?" > $@-failed.stamp
@echo "@MonkeyWrench: SetSummary: <br/>`cat $(abspath $(CURDIR))/TestSummary.md | awk 1 ORS='<br/>'`"
@echo "@MonkeyWrench: AddFile: $(abspath $(CURDIR))/TestSummary.md"
$(Q) if test -e $@-failed.stamp; then EC=`cat $@-failed.stamp`; rm -f $@-failed.stamp; exit $$EC; fi

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

@ -363,6 +363,9 @@ namespace Introspection {
case "UISearchBar":
// - (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER __TVOS_PROHIBITED;
return true;
case "TVDigitEntryViewController":
// full screen, no customization w/NIB
return true;
#endif
case "PdfAnnotationButtonWidget":
case "PdfAnnotationChoiceWidget":
@ -418,8 +421,10 @@ namespace Introspection {
case "MDLColorSwatchTexture":
// they don't make sense without extra arguments
return true;
case "ASCredentialProviderViewController":
// goal is to "provides a standard interface for creating a credential provider extension", not a custom one
case "ASCredentialProviderViewController": // goal is to "provides a standard interface for creating a credential provider extension", not a custom one
case "INUIAddVoiceShortcutViewController": // Doesn't make sense without INVoiceShortcut and there is no other way to set this unless you use the other only .ctor
case "INUIEditVoiceShortcutViewController": // Doesn't make sense without INVoiceShortcut and there is no other way to set this unless you use the other only .ctor
case "ILClassificationUIExtensionViewController": // Meant to be an extension
if (ctor.ToString () == "Void .ctor(String, NSBundle)")
return true;
break;

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

@ -64,6 +64,15 @@ namespace Introspection {
protected virtual bool Skip (Type type, string protocolName)
{
// The following protocols are skipped in classic since they were added in
// later versions
if (IntPtr.Size == 4) {
switch (protocolName) {
case "UIUserActivityRestoring":
return true;
}
}
switch (protocolName) {
case "NSCopying":
switch (type.Name) {
@ -88,6 +97,12 @@ namespace Introspection {
case "MLMultiArrayConstraint":
case "VSSubscription":
return true; // skip
// xcode 10
case "VSAccountMetadata":
case "VSAccountMetadataRequest":
case "VSAccountProviderResponse":
case "HKCumulativeQuantitySeriesSample":
return true;
}
break;
case "NSMutableCopying":
@ -95,6 +110,10 @@ namespace Introspection {
// iOS 10 : test throw because of generic usage
case "NSMeasurement`1":
return true; // skip
// Xcode 10
case "UNNotificationCategory":
case "UNNotificationSound":
return true;
}
break;
case "NSCoding":
@ -127,6 +146,12 @@ namespace Introspection {
case "NSMappingModel":
case "NSPropertyMapping":
return true;
// Xcode 10
case "NSManagedObjectID":
case "VSAccountMetadata":
case "VSAccountMetadataRequest":
case "VSAccountProviderResponse":
return true;
}
break;
case "NSSecureCoding":
@ -167,6 +192,12 @@ namespace Introspection {
case "ARFrame":
case "ARLightEstimate":
case "NSManagedObjectID":
// beta 2
case "NSShadow":
case "NSTextAttachment":
case "VSAccountMetadata":
case "VSAccountMetadataRequest":
case "VSAccountProviderResponse":
return true;
}
break;
@ -198,6 +229,15 @@ namespace Introspection {
return true;
}
break;
case "UIUserActivityRestoring":
switch (type.Name) {
// UIKit.framework/Headers/UIDocument.h
case "UIDocument":
// inherits it from UIDocument
case "UIManagedDocument":
return true;
}
break;
}
return false;
}

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

@ -206,6 +206,7 @@ namespace Introspection
"Exr",
"Felica", // Japanese contactless RFID smart card system
"Femtowatts",
"Fhir",
"Flipside",
"Formati",
"Fov",
@ -219,6 +220,7 @@ namespace Introspection
"Gbrg", // acronym for Green-Blue-Reg-Green
"Geocoder",
"Gigapascals",
"Gop", // acronym for Group Of Pictures
"Gpp",
"Gps",
"Gpu", // acronym for Graphics Processing Unit
@ -829,7 +831,7 @@ namespace Introspection
continue;
string txt = NameCleaner (t.Name);
var typo = GetTypo (txt);
var typo = GetCachedTypo (txt);
if (typo.Length > 0 ) {
if (!Skip (t, typo)) {
ReportError ("Typo in TYPE: {0} - {1} ", t.Name, typo);
@ -848,7 +850,7 @@ namespace Introspection
continue;
txt = NameCleaner (f.Name);
typo = GetTypo (txt);
typo = GetCachedTypo (txt);
if (typo.Length > 0) {
if (!Skip (f, typo)) {
ReportError ("Typo in FIELD name: {0} - {1}, Type: {2}", f.Name, typo, t.Name);
@ -868,7 +870,7 @@ namespace Introspection
continue;
txt = NameCleaner (m.Name);
typo = GetTypo (txt);
typo = GetCachedTypo (txt);
if (typo.Length > 0) {
if (!Skip (m, typo)) {
ReportError ("Typo in METHOD name: {0} - {1}, Type: {2}", m.Name, typo, t.Name);
@ -879,7 +881,7 @@ namespace Introspection
var parameters = m.GetParameters ();
foreach (ParameterInfo p in parameters) {
txt = NameCleaner (p.Name);
typo = GetTypo (txt);
typo = GetCachedTypo (txt);
if (typo.Length > 0) {
ReportError ("Typo in PARAMETER Name: {0} - {1}, Method: {2}, Type: {3}", p.Name, typo, m.Name, t.Name);
totalErrors++;
@ -965,6 +967,14 @@ namespace Introspection
}
}
Dictionary<string, string> cached_typoes = new Dictionary<string, string> ();
string GetCachedTypo (string txt)
{
string rv;
if (!cached_typoes.TryGetValue (txt, out rv))
cached_typoes [txt] = rv = GetTypo (txt);
return rv;
}
public abstract string GetTypo (string txt);
static StringBuilder clean = new StringBuilder ();

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

@ -76,6 +76,17 @@ 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) {
@ -186,6 +197,13 @@ 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);
}

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

@ -68,6 +68,12 @@ namespace Introspection {
case "NSFetchRequest": // Not declared in header file
case "NSManagedObjectModel": // Not declared in header file
case "NSUserInterfaceCompressionOptions": // Not declared in header file
// Xcode 10 (running on macOS 10.14)
case "NSTextAlternatives":
case "QTDataReference": // no header files anymore for deprecated QuickTime
case "NSTextBlock":
case "NSTextTable":
case "NSTextTableBlock":
return true;
default:
// CIFilter started implementing NSSecureCoding in 10.11
@ -137,6 +143,8 @@ namespace Introspection {
case "NSConstraintConflict": // Not declared in header file
case "NSQueryGenerationToken": // Declared in header file but SupportsSecureCoding returns false - radar 32856944
case "NSPersistentHistoryToken": // Conformance not in headers
// Xcode 10 (running on macOS 10.14)
case "NSTextAlternatives":
return true;
}
break;

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

@ -220,6 +220,9 @@ namespace Introspection {
case "INGetAvailableRestaurantReservationBookingsIntentResponse": // Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to initialize 'INGetAvailableRestaurantReservationBookingsIntentResponse'. Please make sure that your intent definition file is valid.
case "INGetRestaurantGuestIntentResponse": // Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to initialize 'INGetRestaurantGuestIntentResponse'. Please make sure that your intent definition file is valid.
return TestRuntime.CheckXcodeVersion (10,0);
case "CMMovementDisorderManager": // Not available in simulator, added info to radar://41110708
case "RPSystemBroadcastPickerView": // Symbol not available in simulator
return Runtime.Arch == Arch.SIMULATOR;
default:
return base.Skip (type);
}

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

@ -63,6 +63,7 @@ namespace Introspection {
break;
case "MTLFence":
case "MTLHeap":
case "RPSystemBroadcastPickerView": // Symbol not available in simulator
if (Runtime.Arch != Arch.DEVICE)
return true;
@ -70,6 +71,13 @@ namespace Introspection {
if (!TestRuntime.CheckXcodeVersion (8, 0))
return true;
break;
case "CMMovementDisorderManager":
// From Xcode 10 beta 2:
// This requires a special entitlement:
// Usage of CMMovementDisorderManager requires a special entitlement. Please see for more information https://developer.apple.com/documentation/coremotion/cmmovementdisordermanager
// but that web page doesn't explain anything (it's mostly empty, so this is probably just lagging documentation)
// I also tried enabling every entitlement in Xcode, but it still didn't work.
return true;
}
return base.Skip (type);
@ -180,10 +188,6 @@ namespace Introspection {
case "MSSession":
case "SFContentBlockerState":
case "SFSafariViewControllerConfiguration":
case "VSAccountMetadata":
case "VSAccountMetadataRequest":
// iOS 10.2
case "VSAccountProviderResponse":
// iOS 10.3
case "MPMusicPlayerControllerMutableQueue":
case "MPMusicPlayerControllerQueue":
@ -234,7 +238,7 @@ namespace Introspection {
case "ARFrame":
case "ARLightEstimate":
case "ASCredentialProviderExtensionContext":
case "NSManagedObjectID":
case "ILClassificationUIExtensionContext": // Conformance not in headers
return true;
#if __WATCHOS__
case "CLKComplicationTemplate":
@ -335,10 +339,6 @@ namespace Introspection {
case "MSSession":
case "SFContentBlockerState":
case "SFSafariViewControllerConfiguration":
case "VSAccountMetadata":
case "VSAccountMetadataRequest":
// iOS 10.2
case "VSAccountProviderResponse":
// iOS 10.3
case "MPMusicPlayerControllerMutableQueue":
case "MPMusicPlayerControllerQueue":
@ -394,6 +394,7 @@ namespace Introspection {
return true;
// Xcode 10
case "ASCredentialProviderExtensionContext":
case "ILClassificationUIExtensionContext": // Conformance not in headers
return true;
#if __WATCHOS__
case "CLKComplicationTemplate":
@ -467,10 +468,6 @@ namespace Introspection {
case "HKDocumentSample":
case "HKCdaDocumentSample":
case "SFSafariViewControllerConfiguration":
case "VSAccountMetadata":
case "VSAccountMetadataRequest":
// iOS 10.2
case "VSAccountProviderResponse":
return true;
// iOS 11.0
case "UICollectionViewUpdateItem": // Conformance not in headers
@ -496,12 +493,12 @@ namespace Introspection {
#endif
// Xcode 10
case "ASCredentialProviderExtensionContext":
case "ILClassificationUIExtensionContext": // Conformance not in headers
return true;
}
break;
case "NSMutableCopying":
switch (type.Name) {
case "UNNotificationSound":
// iOS 10.3
case "MPMusicPlayerControllerMutableQueue":
case "MPMusicPlayerControllerQueue":
@ -511,9 +508,6 @@ namespace Introspection {
case "INPerson":
case "HMCharacteristicEvent": // Selectors not available on 32 bit
return true;
// iOS 12
case "UNNotificationCategory":
return true;
}
break;
case "UIAccessibilityIdentification":

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

@ -138,6 +138,13 @@ namespace Introspection {
case "INPaymentStatusResolutionResult":
case "INPaymentAccountResolutionResult":
return true;
case "CMMovementDisorderManager":
// From Xcode 10 beta 2:
// This requires a special entitlement:
// Usage of CMMovementDisorderManager requires a special entitlement. Please see for more information https://developer.apple.com/documentation/coremotion/cmmovementdisordermanager
// but that web page doesn't explain anything (it's mostly empty, so this is probably just lagging documentation)
// I also tried enabling every entitlement in Xcode, but it still didn't work.
return true;
#endif
default:

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