Merge branch 'main' into xcode13.0-quicklook-b1-b2-b3-b4

This commit is contained in:
Rachel Kang 2021-08-05 10:03:43 -04:00 коммит произвёл GitHub
Родитель 6adb0c56e7 0ffed970d6
Коммит 5b72769db2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
222 изменённых файлов: 5704 добавлений и 2632 удалений

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

@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Nelze vytvořit instanci typu {0}.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>

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

@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{0} 형식의 인스턴스를 만들 수 없습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>

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

@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Nie można utworzyć wystąpienia typu {0}.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>

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

@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Não foi possível criar uma instância do tipo {0}.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>

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

@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Невозможно создать экземпляр типа {0}.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>

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

@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{0} türünde örnek oluşturulamıyor.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>

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

@ -86,7 +86,7 @@ dotnet-install.sh: Makefile
# Fix the BCL assemblies we get for Mac Catalyst
fix-maccatalyst-assembly/bin/Debug/fix-maccatalyst-assembly.exe: $(wildcard fix-maccatalyst-assembly/*.cs*) Makefile
$(Q) $(SYSTEM_MSBUILD) /r fix-maccatalyst-assembly/fix-maccatalyst-assembly.csproj $(MSBUILD_VERBOSITY)
$(Q) $(SYSTEM_MSBUILD) "/bl:$@.binlog" /r fix-maccatalyst-assembly/fix-maccatalyst-assembly.csproj $(MSBUILD_VERBOSITY)
define FixMacCatalystAssembly
$(MONO_MACCATALYST_SDK_DESTDIR)/maccat-bcl/monotouch/$(1).dll: .stamp-$(MONO_BUILD_MODE)

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

@ -203,6 +203,7 @@
<!-- ComputeFilesToPublish will run ILLink -->
<!-- single-rid build (either plain single, or inner build for multi-rid build) -->
<CreateAppBundleDependsOn Condition="'$(RuntimeIdentifiers)' == ''">
$(CreateAppBundleDependsOn);
_DetectAppManifest;
_CopyResourcesToBundle;
_CompileCoreMLModels;
@ -235,6 +236,7 @@
<!-- outer build for multi-rid build -->
<CreateAppBundleDependsOn Condition="'$(RuntimeIdentifiers)' != ''">
$(CreateAppBundleDependsOn);
_CompileEntitlements;
_CreateMergedAppBundle;
</CreateAppBundleDependsOn>
@ -331,7 +333,40 @@
</Touch>
</Target>
<Target Name="_ComputeLinkerArguments" DependsOnTargets="_ComputeLinkMode;_ComputeFrameworkVariables;_ComputeFrameworkAssemblies;ComputeResolvedFilesToPublishList;_ParseBundlerArguments;_ComputeVariables;_CreateRuntimeConfiguration">
<Target Name="_ComputeMonoComponents" Condition="'$(UseMonoRuntime)' == 'true' And '$(_LibMonoLinkMode)' == 'static'" BeforeTargets="_MonoSelectRuntimeComponents" DependsOnTargets="_ComputeVariables">
<!-- https://github.com/dotnet/runtime/blob/main/docs/design/mono/components.md -->
<ItemGroup>
<_MonoComponent Include="hot_reload" Condition="'$(MtouchInterpreter)' == 'true'" />
<_MonoComponent Include="debugger" Condition="'$(_BundlerDebug)' == 'true'" />
<_MonoComponent Include="diagnostics_tracing" Condition="'$(_BundlerDebug)' == 'true'" />
</ItemGroup>
</Target>
<Target Name="_ComputeMonoLibraries" Condition="'$(UseMonoRuntime)' == 'true'" DependsOnTargets="_ComputeMonoComponents;_MonoSelectRuntimeComponents">
<!-- We only include any mono components when linking with mono statically. The components are already included in the dynamic versions of Mono (both the dylib and the framework) -->
<ItemGroup Condition="'$(_LibMonoLinkMode)' == 'static'">
<!-- Remove files mono told us not to link with -->
<_MonoLibrary Remove="@(_MonoRuntimeComponentDontLink -> '$(_MonoRuntimePackPath)/native/%(Identity)')" />
<!-- Add files mono told us to link with -->
<_MonoLibrary Include="@(_MonoRuntimeComponentLink -> '$(_MonoRuntimePackPath)/native/%(Identity)')" />
</ItemGroup>
</Target>
<PropertyGroup>
<_ComputeLinkerArgumentsDependsOn>
_ComputeLinkMode;
_ComputeFrameworkVariables;
_ComputeFrameworkAssemblies;
ComputeResolvedFilesToPublishList;
_ParseBundlerArguments;
_ComputeVariables;
_CreateRuntimeConfiguration;
_ComputeMonoLibraries;
</_ComputeLinkerArgumentsDependsOn>
</PropertyGroup>
<Target Name="_ComputeLinkerArguments" DependsOnTargets="$(_ComputeLinkerArgumentsDependsOn)">
<!-- Validate the linker mode -->
<Error Text="Invalid link mode: '$(_LinkMode)'. Valid link modes are: 'None', 'SdkOnly' and 'Full'" Condition="'$(_LinkMode)' != 'None' And '$(_LinkMode)' != 'SdkOnly' And '$(_LinkMode)' != 'Full'" />
@ -376,6 +411,7 @@
LinkMode=$(_LinkMode)
MarshalManagedExceptionMode=$(_MarshalManagedExceptionMode)
MarshalObjectiveCExceptionMode=$(_MarshalObjectiveCExceptionMode)
@(_MonoLibrary -> 'MonoLibrary=%(Identity)')
Optimize=$(_BundlerOptimize)
PartialStaticRegistrarLibrary=$(_LibPartialStaticRegistrar)
Platform=$(_PlatformName)
@ -515,7 +551,7 @@
<!-- Support a 'CopyToAppBundle' metadata that can be set to 'false' to avoid copying a framework to the app bundle -->
<_FrameworkFilesToPublish Include="%(_FrameworkNativeReference.RootDir)%(_FrameworkNativeReference.Directory)/**/*" Condition="'%(_FrameworkNativeReference.Kind)' == 'Framework' And '%(_FrameworkNativeReference.CopyToAppBundle)' != 'false'">
<_FrameworkIdentity>%(RootDir)%(Directory)</_FrameworkIdentity>
<_FrameworkPath>$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)\$(PublishDir),$(_AppBundleFrameworksDir)))\%(Filename).framework</_FrameworkPath>
<_FrameworkPath>$(_AppBundleFrameworksDir)\%(Filename).framework</_FrameworkPath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</_FrameworkFilesToPublish>
@ -537,7 +573,7 @@
<ItemGroup>
<!-- Support a 'CopyToAppBundle' metadata that can be set to 'false' to avoid copying a framework to the app bundle -->
<_DynamicLibraryToPublish Include="@(_FileNativeReference)" Condition="'%(_FileNativeReference.Kind)' == 'Dynamic' And '%(_FileNativeReference.CopyToAppBundle)' != 'false'">
<RelativePath>$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)\$(PublishDir),$(_DylibPublishDir)))\%(Filename)%(Extension)</RelativePath>
<RelativePath>$(_DylibPublishDir)\%(Filename)%(Extension)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</_DynamicLibraryToPublish>
@ -650,12 +686,19 @@
</PropertyGroup>
<PropertyGroup>
<!-- Compute the absolute path to the publish directory. We only use this to compute the relative path of app bundle path relative to the publish directory -->
<!-- Take into account that 'PublishDir' may or may not be an absolute path to begin with -->
<_AbsolutePublishDir>$(PublishDir)</_AbsolutePublishDir>
<_AbsolutePublishDir Condition="!$([System.IO.Path]::IsPathRooted ('$(_AbsolutePublishDir)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(PublishDir)'))</_AbsolutePublishDir>
<!-- Compute the relative path of the app bundle relative to the publish directory. The _AppBundlePath is relative to the project directory, so to compute this we need to have both app bundle path and the publish directory as absolute paths first. -->
<_RelativeAppBundlePath>$([MSBuild]::MakeRelative($(_AbsolutePublishDir),$(MSBuildProjectDirectory)/$(_AppBundlePath)))</_RelativeAppBundlePath>
<_IntermediateNativeLibraryDir>$(IntermediateOutputPath)nativelibraries/</_IntermediateNativeLibraryDir>
<_NativeExecutableName>$(_AppBundleName)</_NativeExecutableName>
<_NativeExecutablePublishDir Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">$(MSBuildProjectDirectory)\$(_AppBundlePath)\</_NativeExecutablePublishDir>
<_NativeExecutablePublishDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(MSBuildProjectDirectory)\$(_AppBundlePath)\Contents\MacOS\</_NativeExecutablePublishDir>
<_AppBundleFrameworksDir Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">$(MSBuildProjectDirectory)\$(_AppBundlePath)\Frameworks\</_AppBundleFrameworksDir>
<_AppBundleFrameworksDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(MSBuildProjectDirectory)\$(_AppBundlePath)\Contents\Frameworks\</_AppBundleFrameworksDir>
<_NativeExecutablePublishDir Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">$(_RelativeAppBundlePath)\</_NativeExecutablePublishDir>
<_NativeExecutablePublishDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(_RelativeAppBundlePath)\Contents\MacOS\</_NativeExecutablePublishDir>
<_AppBundleFrameworksDir Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">$(_RelativeAppBundlePath)\Frameworks\</_AppBundleFrameworksDir>
<_AppBundleFrameworksDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(_RelativeAppBundlePath)\Contents\Frameworks\</_AppBundleFrameworksDir>
<_AOTCompiler>@(MonoAotCrossCompiler->WithMetadataValue("RuntimeIdentifier", "$(RuntimeIdentifier)"))</_AOTCompiler>
<_AOTInputDirectory>$(_IntermediateNativeLibraryDir)aot-input/</_AOTInputDirectory>
@ -711,6 +754,7 @@
<_RuntimeConfigReservedProperties Include="PINVOKE_OVERRIDE" />
<_RuntimeConfigReservedProperties Include="ICU_DAT_FILE_PATH" />
<_RuntimeConfigReservedProperties Include="TRUSTED_PLATFORM_ASSEMBLIES" />
<_RuntimeConfigReservedProperties Include="NATIVE_DLL_SEARCH_DIRECTORIES" />
</ItemGroup>
<RuntimeConfigParserTask
Condition="'$(GenerateRuntimeConfigurationFiles)' == 'true'"
@ -765,7 +809,7 @@
<!-- copy the aotdata files to the .app -->
<ResolvedFileToPublish Include="%(_AssembliesToAOT.AOTData)" >
<RelativePath>$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)\$(PublishDir),$(_AssemblyPublishDir)))\%(_AssembliesToAOT.Filename).aotdata.%(_AssembliesToAOT.Arch)</RelativePath>
<RelativePath>$(_AssemblyPublishDir)\%(_AssembliesToAOT.Filename).aotdata.%(_AssembliesToAOT.Arch)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</ResolvedFileToPublish>
</ItemGroup>
@ -835,9 +879,7 @@
<ItemGroup>
<_XamarinMainLibraries Include="$(_XamarinNativeLibraryDirectory)/$(_LibXamarinName)" />
<!-- Link with the libraries shipped with the mono runtime pack -->
<_XamarinMainLibraries Include="@(_MonoLibrary)" Condition="'$(_PlatformName)' != 'macOS'" />
<!-- But don't link with any dylibs on macOS, because they might have library initializers which may fail - instead delay any failures until whatever feature they provide is needed -->
<_XamarinMainLibraries Include="@(_MonoLibrary)" Condition="'$(_PlatformName)' == 'macOS' And ('%(_MonoLibrary.Extension)' == '.a' Or '%(_MonoLibrary.Filename)' == 'libcoreclr')" />
<_XamarinMainLibraries Include="@(_MonoLibrary)" />
<!-- Link with static libraries from NativeReference items ((xc)frameworks are handled in the _ComputeFrameworkFilesToPublish target, and dynamic libraries are handled in the _ComputeDynamicLibrariesToPublish target) -->
<_XamarinMainLibraries Include="@(_FileNativeReference)" />
@ -885,7 +927,7 @@
<ItemGroup>
<!-- Copy the executable from the intermediate directory to the .app -->
<ResolvedFileToPublish Include="$(_IntermediateNativeLibraryDir)$(_NativeExecutableName)">
<RelativePath>$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)\$(PublishDir),$(_NativeExecutablePublishDir)))\$(_NativeExecutableName)</RelativePath>
<RelativePath>$(_NativeExecutablePublishDir)\$(_NativeExecutableName)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</ResolvedFileToPublish>
</ItemGroup>
@ -905,33 +947,34 @@
</_ComputeLinkModeDependsOn>
</PropertyGroup>
<Target Name="_ComputePublishLocation" DependsOnTargets="_GenerateBundleName;_ParseBundlerArguments">
<Target Name="_ComputePublishLocation" DependsOnTargets="_GenerateBundleName;_ParseBundlerArguments;_ComputeMonoLibraries">
<PropertyGroup>
<_AssemblyPublishDir Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">$(MSBuildProjectDirectory)\$(_AppBundlePath)\</_AssemblyPublishDir>
<_AssemblyPublishDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(MSBuildProjectDirectory)\$(_AppBundlePath)\Contents\$(_CustomBundleName)\</_AssemblyPublishDir>
<_DylibPublishDir Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">$(MSBuildProjectDirectory)\$(_AppBundlePath)\</_DylibPublishDir>
<_DylibPublishDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(MSBuildProjectDirectory)\$(_AppBundlePath)\Contents\$(_CustomBundleName)\</_DylibPublishDir>
<_ParsedRuntimeConfigFilePath Condition="'$(_ParsedRuntimeConfigFilePath)' == ''">$(_AssemblyPublishDir)\$(_RuntimeConfigurationFile)</_ParsedRuntimeConfigFilePath>
<_AssemblyPublishDir Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">$(_RelativeAppBundlePath)\</_AssemblyPublishDir>
<_AssemblyPublishDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(_RelativeAppBundlePath)\Contents\$(_CustomBundleName)\</_AssemblyPublishDir>
<_DylibPublishDir Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">$(_RelativeAppBundlePath)\</_DylibPublishDir>
<_DylibPublishDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(_RelativeAppBundlePath)\Contents\$(_CustomBundleName)\</_DylibPublishDir>
<!-- _ParsedRuntimeConfigFilePath must be relative to the project directory, since it's not copied to the publish directory by the the CopyFilesToPublishDirectory targets -->
<_ParsedRuntimeConfigFilePath Condition="'$(_ParsedRuntimeConfigFilePath)' == ''">$([MSBuild]::MakeRelative($(MSBuildProjectDirectory),$(_AbsolutePublishDir)\$(_AssemblyPublishDir)\$(_RuntimeConfigurationFile)))</_ParsedRuntimeConfigFilePath>
</PropertyGroup>
<ItemGroup>
<!-- include .dll, .exe and, for debugging only, .pdb files inside the .app -->
<ResolvedFileToPublish
Update="@(ResolvedFileToPublish)"
RelativePath="$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)\$(PublishDir),$(_AssemblyPublishDir)))\%(ResolvedFileToPublish.DestinationSubDirectory)\%(Filename)%(Extension)"
RelativePath="$(_AssemblyPublishDir)\%(ResolvedFileToPublish.DestinationSubDirectory)\%(Filename)%(Extension)"
Condition="'%(Extension)' == '.dll' Or ('$(_BundlerDebug)' == 'true' And '%(Extension)' == '.pdb') Or '%(Extension)' == '.exe'" />
<!-- Copy the app.config file to the app bundle -->
<ResolvedFileToPublish
Update="@(ResolvedFileToPublish)"
RelativePath="$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)\$(PublishDir),$(_AssemblyPublishDir)))\%(ResolvedFileToPublish.DestinationSubDirectory)\%(ResolvedFileToPublish.TargetPath)"
RelativePath="$(_AssemblyPublishDir)\%(ResolvedFileToPublish.DestinationSubDirectory)\%(ResolvedFileToPublish.TargetPath)"
Condition="'$(AppConfig)' != '' And '%(ResolvedFileToPublish.OriginalItemSpec)' == '$(AppConfig)' And '%(ResolvedFileToPublish.Link)' == 'app.config' And '%(ResolvedFileToPublish.TargetPath)' != ''" />
<!-- .dylib are never needed (nor allowed) for fully AOT'ed applications FIXME https://github.com/xamarin/xamarin-macios/issues/11145 -->
<ResolvedFileToPublish
Update="@(ResolvedFileToPublish)"
RelativePath="$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)\$(PublishDir),$(_DylibPublishDir)))\%(Filename)%(Extension)"
RelativePath="$(_DylibPublishDir)\%(Filename)%(Extension)"
Condition="('$(_SdkIsSimulator)' != 'false' Or '$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst') And '%(Extension)' == '.dylib'" />
<ResolvedFileToPublish
Update="@(ResolvedFileToPublish)"
RelativePath="$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)\$(PublishDir),$(_AssemblyPublishDir)))\%(Filename)%(Extension)"
RelativePath="$(_AssemblyPublishDir)\%(Filename)%(Extension)"
Condition="'$(_PlatformName)' != 'macOS' And '$(InvariantGlobalization)' != 'true' And '%(Filename)%(Extension)' == '$(_GlobalizationDataFile)'" />
<!-- Remove the libxamarin-*.dylib files we don't want -->
@ -962,7 +1005,7 @@
<!-- Ref: https://github.com/xamarin/xamarin-macios/issues/11432 -->
<ResolvedFileToPublish
Update="@(ResolvedFileToPublish)"
RelativePath="$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)\$(PublishDir),$(_DylibPublishDir)))\%(Filename)%(Extension)"
RelativePath="$(_DylibPublishDir)\%(Filename)%(Extension)"
Condition=" '$(UseMonoRuntime)' == 'false' And
'%(ResolvedFileToPublish.Filename)' == 'createdump' And
'%(ResolvedFileToPublish.Extension)' == '' And
@ -972,6 +1015,14 @@
"
/>
<!-- Remove any dylibs Mono told us not to link with -->
<ResolvedFileToPublish
Remove="@(_MonoRuntimeComponentDontLink -> '$(_MonoRuntimePackPath)/native/%(Identity)')"
Condition=" '%(ResolvedFileToPublish.AssetType)' == 'native' And
'%(ResolvedFileToPublish.RuntimeIdentifier)' == '$(RuntimeIdentifier)' And
'%(ResolvedFileToPublish.NuGetPackageId)' == '$(_MonoNugetPackageId)'
"
/>
</ItemGroup>
</Target>

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

@ -1,8 +1,8 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.100-rc.1.21379.2">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.100-rc.1.21403.66">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>3b433901a1bb025b3acb3ca2f73fc7c43ffd98b6</Sha>
<Sha>0b62347ded7f73c64f7cc19864b465d19204e25a</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.6.21378.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/mono/linker</Uri>

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

@ -1,7 +1,7 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.100-rc.1.21379.2</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.100-rc.1.21403.66</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>6.0.100-preview.6.21378.1</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>6.0.0-beta.21212.6</MicrosoftDotNetBuildTasksFeedPackageVersion>
</PropertyGroup>

2
external/macios-binaries поставляемый

@ -1 +1 @@
Subproject commit fd29206d98dedbcc08b992916afa2fac1718bf55
Subproject commit b7c6c1c971f94e81d934e112278cd882741918d0

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

@ -7,7 +7,7 @@ MONO_BRANCH := $(shell cd $(MONO_PATH) 2> /dev/null && git symbolic-ref --sho
endif
ifdef ENABLE_XAMARIN
NEEDED_MACCORE_VERSION := 49974a981858f73a3d84ee675a4dcd685988f40a
NEEDED_MACCORE_VERSION := e14b89f9ebd4d1d0dbd2e62ea95cb6676b85da99
NEEDED_MACCORE_BRANCH := main
MACCORE_DIRECTORY := maccore

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

@ -1,5 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MessagingVersion>1.3.26</MessagingVersion>
<MessagingVersion>1.3.27</MessagingVersion>
<HotRestartVersion>1.0.69</HotRestartVersion>
</PropertyGroup>
</Project>

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

@ -84,6 +84,10 @@
<Delete Files="$(IntermediateOutputPath)ilrepack.txt" Condition="'$(ExitCode)' != '0'" />
<Touch AlwaysCreate="true" Files="$(IntermediateOutputPath)ilrepack.txt" Condition="'$(ExitCode)' == '0'" />
<Error Text="$(ILRepackOutput)" Condition="'$(ExitCode)' != '0' And '$(ContinueOnError)' != 'true'" />
<Delete Files="@(MergedAssemblies -&gt; '$(MSBuildProjectDirectory)\$(OutputPath)%(Filename)%(Extension)')" Condition="Exists('$(MSBuildProjectDirectory)\$(OutputPath)%(Filename)%(Extension)')" />
<ItemGroup>
<MergedAssembliesToRemove Include="@(MergedAssemblies)" />
<MergedAssembliesToRemove Remove="@(ReferenceToPreserve)" />
</ItemGroup>
<Delete Files="@(MergedAssembliesToRemove -&gt; '$(MSBuildProjectDirectory)\$(OutputPath)%(Filename)%(Extension)')" Condition="Exists('$(MSBuildProjectDirectory)\$(OutputPath)%(Filename)%(Extension)')" />
</Target>
</Project>

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

@ -23,6 +23,7 @@ MSBUILD_TASK_ASSEMBLIES =
ALL_SOURCES:= $(shell git ls-files | sed 's/ /\\ /g') $(wildcard $(XAMARIN_MACDEV_PATH)/Xamarin.MacDev/*.cs) $(wildcard $(XAMARIN_MACDEV_PATH)/Xamarin.MacDev/*.csproj)
CONFIG = Debug
TARGETFRAMEWORK = netstandard2.0
WINDOWSRUNTIMEIDENTIFIER = win
##
## XI definitions
@ -38,8 +39,8 @@ IOS_TARGETS = \
IOS_WINDOWS_TARGETS = \
$(wildcard Xamarin.iOS.Tasks.Windows/Xamarin.*.props) \
$(wildcard Xamarin.iOS.Tasks.Windows/Xamarin.*.targets) \
$(wildcard Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/Xamarin.*.props) \
$(wildcard Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/Xamarin.*.targets) \
$(wildcard Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(WINDOWSRUNTIMEIDENTIFIER)/Xamarin.*.props) \
$(wildcard Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(WINDOWSRUNTIMEIDENTIFIER)/Xamarin.*.targets) \
IOS_BINDING_TARGETS = $(wildcard Xamarin.ObjcBinding.Tasks/*.targets)
@ -48,6 +49,8 @@ TRANSLATED_ASSEMBLIES = $(foreach locale,$(LOCALIZATION_LANGUAGES),$(locale)/Xam
LOCALIZATION_ASSEMBLIES = Xamarin.Localization.MSBuild
IOS_TASK_ASSEMBLIES = Xamarin.iOS.Tasks $(LOCALIZATION_ASSEMBLIES)
IOS_WINDOWS_TASK_ASSEMBLIES = Xamarin.iOS.Tasks.Windows
IOS_WINDOWS_DEPENDENCIES = Xamarin.iOS.Windows.Client iSign.Core ws2_32 System.Diagnostics.Tracer BouncyCastle.Crypto System.Buffers System.Memory System.Numerics.Vectors System.Runtime.CompilerServices.Unsafe System.Security.Cryptography.ProtectedData System.Security.Cryptography.Pkcs Microsoft.Win32.Registry System.Security.AccessControl System.Security.Principal.Windows
IOS_WINDOWS_MOBILEDEVICE_TOOLS = iMobileDevice-net bz2 getopt ideviceactivation idevicebackup idevicebackup2 idevicecrashreport idevicedate idevicedebug idevicedebugserverproxy idevicediagnostics ideviceenterrecovery ideviceimagemounter ideviceinfo ideviceinstaller idevicename idevicenotificationproxy idevicepair ideviceprovision idevicerestore idevicescreenshot idevicesyslog idevice_id imobiledevice-net-lighthouse imobiledevice ios_webkit_debug_proxy iproxy irecovery irecovery libcharset libcurl LIBEAY32 libiconv libusb-1.0 libusb0 libxml2 lzma pcre pcreposix plist plistutil plist_cmp plist_test pthreadVC3 readline SSLEAY32 usbmuxd usbmuxd vcruntime140 zip zlib1
IOS_DIRECTORIES = \
$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS \
@ -473,12 +476,25 @@ MSBUILD_DIRECTORIES += $(DOTNET_DIRECTORIES)
ifdef ENABLE_DOTNET
MSBUILD_PRODUCTS += $(DOTNET_TARGETS)
DOTNET_IOS_WINDOWS_OUTPUT_FILES = $(foreach dll,$(IOS_WINDOWS_TASK_ASSEMBLIES),$(dll).dll $(dll).pdb) Broker.zip Build.zip
DOTNET_IOS_WINDOWS_FILES = $(IOS_WINDOWS_TARGETS) $(foreach file,$(DOTNET_IOS_WINDOWS_OUTPUT_FILES),Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(file))
DOTNET_IOS_WINDOWS_OUTPUT_FILES = \
$(foreach dll,$(IOS_WINDOWS_TASK_ASSEMBLIES),$(dll).*) \
$(foreach dll,$(IOS_WINDOWS_DEPENDENCIES),$(dll).*) \
Broker.zip \
Build.zip \
Xamarin.PreBuilt.iOS.app.zip
DOTNET_IOS_WINDOWS_FILES = $(IOS_WINDOWS_TARGETS) $(foreach file,$(DOTNET_IOS_WINDOWS_OUTPUT_FILES),Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(WINDOWSRUNTIMEIDENTIFIER)/$(file))
DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X86 = $(foreach file,$(IOS_WINDOWS_MOBILEDEVICE_TOOLS),Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(WINDOWSRUNTIMEIDENTIFIER)/imobiledevice-x86/$(file).*)
DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X64 = $(foreach file,$(IOS_WINDOWS_MOBILEDEVICE_TOOLS),Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(WINDOWSRUNTIMEIDENTIFIER)/imobiledevice-x64/$(file).*)
# Ensures Xamarin.iOS.Tasks.Windows is built and copies the output files to the Sdk Windows pack
.dotnet-windows: .build-stamp | $(DOTNET_DESTDIR)/$(IOS_WINDOWS_NUGET).Sdk/tools/msbuild/iOS
.copy-windows-files: .build-stamp
$(Q) mkdir -p $(DOTNET_DESTDIR)/$(IOS_WINDOWS_NUGET).Sdk/tools/msbuild/iOS
$(Q) $(CP) $(DOTNET_IOS_WINDOWS_FILES) $(DOTNET_DESTDIR)/$(IOS_WINDOWS_NUGET).Sdk/tools/msbuild/iOS/
$(Q) mkdir -p $(DOTNET_DESTDIR)/$(IOS_WINDOWS_NUGET).Sdk/tools/msbuild/iOS/imobiledevice-x86
$(Q) $(CP) $(DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X86) $(DOTNET_DESTDIR)/$(IOS_WINDOWS_NUGET).Sdk/tools/msbuild/iOS/imobiledevice-x86/
$(Q) mkdir -p $(DOTNET_DESTDIR)/$(IOS_WINDOWS_NUGET).Sdk/tools/msbuild/iOS/imobiledevice-x64
$(Q) $(CP) $(DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X64) $(DOTNET_DESTDIR)/$(IOS_WINDOWS_NUGET).Sdk/tools/msbuild/iOS/imobiledevice-x64/
.dotnet-windows: .build-stamp .copy-windows-files
all-local:: .dotnet-windows
dotnet:: .dotnet-windows
@ -493,7 +509,7 @@ all-local:: $(MSBUILD_PRODUCTS) .stamp-test-xml
.build-stamp: $(ALL_SOURCES)
$(Q) $(SYSTEM_MONO) /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore
$(Q) $(SYSTEM_MSBUILD) $(XBUILD_VERBOSITY)
$(Q) $(SYSTEM_MSBUILD) "/bl:$@.binlog" $(XBUILD_VERBOSITY)
$(Q) touch $@
# make all the target assemblies build when any of the sources have changed

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

@ -0,0 +1,117 @@
{
"images": [
{
"scale": "2x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon40.png"
},
{
"scale": "3x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon60.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon58.png"
},
{
"scale": "3x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon87.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon80.png"
},
{
"scale": "3x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "2x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "3x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon180.png"
},
{
"scale": "1x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon20.png"
},
{
"scale": "2x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "1x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon29.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon58.png"
},
{
"scale": "1x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon80.png"
},
{
"scale": "1x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon76.png"
},
{
"scale": "2x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon152.png"
},
{
"scale": "2x",
"size": "83.5x83.5",
"idiom": "ipad",
"filename": "Icon167.png"
},
{
"scale": "1x",
"size": "1024x1024",
"idiom": "ios-marketing",
"filename": "Icon1024.png"
}
],
"properties": {},
"info": {
"version": 1,
"author": "xcode"
}
}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 69 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 845 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.5 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.7 KiB

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

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

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

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>10.0</string>
<key>CFBundleDisplayName</key>
<string>Xamarin.PreBuilt</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.Xamarin-PreBuilt</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleName</key>
<string>Xamarin.PreBuilt</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UIFileSharingEnabled</key>
<true/>
</dict>
</plist>

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

@ -0,0 +1,38 @@
using Foundation;
using ObjCRuntime;
using System;
using System.Runtime.InteropServices;
using UIKit;
namespace Xamarin.PreBuilt.iOS
{
public class Applications
{
static void Main(string[] args)
=> Xamarin.iOS.HotRestart.Application.Run(args, (string frameworkPath) => Dlfcn.dlopen(frameworkPath, 0), () => TerminateApplication());
static void TerminateApplication()
{
Console.WriteLine("Closing the running application to re-launch...");
Console.WriteLine("Trying Exit Option 1...");
Exit(0);
Console.WriteLine("Option 1 failed. Trying Exit Option 2...");
NSThread.Exit();
Console.WriteLine("Option 2 failed. Trying Exit Option 3...");
TerminateWithSuccess();
Console.WriteLine("Option 3 failed. Trying Exit Option 4...");
throw new Xamarin.iOS.HotRestart.KillApplicationException();
}
[DllImport("__Internal", EntryPoint = "exit")]
static extern void Exit(int status);
static void TerminateWithSuccess()
{
var selector = new Selector("terminateWithSuccess");
UIApplication.SharedApplication.PerformSelector(selector, UIApplication.SharedApplication, 0);
}
}
}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 8.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 8.2 KiB

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

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="gAE-YM-kbH">
<objects>
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43"/>
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="center" misplaced="YES" image="HotRestart-LaunchIcon.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39"/>
<constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="349" y="339"/>
</scene>
</scenes>
</document>

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

@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-ios</TargetFramework>
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<ProvisioningType>automatic</ProvisioningType>
<DebugType>portable</DebugType>
<_LinkMode>None</_LinkMode>
<UseInterpreter>true</UseInterpreter>
<MtouchExtraArgs>--registrar:dynamic</MtouchExtraArgs>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.iOS.HotRestart.Application" Version="1.1.2" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\HotRestart-LaunchIcon-568h%402x.png" />
<BundleResource Include="Resources\HotRestart-LaunchIcon.png" />
<BundleResource Include="Resources\HotRestart-LaunchIcon%402x.png" />
</ItemGroup>
<!-- For debug only, copies files from a AdditionalFiles directory into the bundle (i.e. an app to be interpreted) -->
<!-- <Target Name="ResolveAdditionalReferences">
<ItemGroup>
<AdditionalFiles Include="AdditionalReferences\**\*.*" Exclude="AdditionalReferences\Xamarin.Forms.Core.dll" />
</ItemGroup>
</Target>
<Target Name="CopyAdditionalReferences" DependsOnTargets="ResolveAdditionalReferences" AfterTargets="_CalculateCodesignAppBundleInputs" Inputs="@(AdditionalFiles)" Outputs="@(AdditionalFiles -> '$(_AppBundlePath)$(_AppBundleName).content\%(RecursiveDir)%(Filename)%(Extension)')">
<Copy SourceFiles="@(AdditionalFiles)" DestinationFiles="@(AdditionalFiles -> '$(_AppBundlePath)$(_AppBundleName).content\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target> -->
</Project>

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

@ -0,0 +1,81 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29411.138
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.PreBuilt.iOS", "Xamarin.PreBuilt.iOS\Xamarin.PreBuilt.iOS.csproj", "{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
Ad-Hoc|iPhone = Ad-Hoc|iPhone
Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
AppStore|Any CPU = AppStore|Any CPU
AppStore|iPhone = AppStore|iPhone
AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
Debug|Any CPU = Debug|Any CPU
Debug|iPhone = Debug|iPhone
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|Any CPU = Release|Any CPU
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
UI Test|Any CPU = UI Test|Any CPU
UI Test|iPhone = UI Test|iPhone
UI Test|iPhoneSimulator = UI Test|iPhoneSimulator
UITEST|Any CPU = UITEST|Any CPU
UI-Test|Any CPU = UI-Test|Any CPU
UITEST|iPhone = UITEST|iPhone
UI-Test|iPhone = UI-Test|iPhone
UITEST|iPhoneSimulator = UITEST|iPhoneSimulator
UI-Test|iPhoneSimulator = UI-Test|iPhoneSimulator
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Ad-Hoc|Any CPU.ActiveCfg = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Ad-Hoc|Any CPU.Build.0 = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Ad-Hoc|iPhone.ActiveCfg = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Ad-Hoc|iPhone.Build.0 = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.AppStore|Any CPU.ActiveCfg = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.AppStore|Any CPU.Build.0 = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.AppStore|iPhone.ActiveCfg = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.AppStore|iPhone.Build.0 = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.AppStore|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.AppStore|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Debug|iPhone.ActiveCfg = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Debug|iPhone.Build.0 = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Release|iPhone.ActiveCfg = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Release|iPhone.Build.0 = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI Test|Any CPU.ActiveCfg = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI Test|Any CPU.Build.0 = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI Test|iPhone.ActiveCfg = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI Test|iPhone.Build.0 = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI Test|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI Test|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UITEST|Any CPU.ActiveCfg = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UITEST|Any CPU.Build.0 = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI-Test|Any CPU.ActiveCfg = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI-Test|Any CPU.Build.0 = Release|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UITEST|iPhone.ActiveCfg = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UITEST|iPhone.Build.0 = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI-Test|iPhone.ActiveCfg = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI-Test|iPhone.Build.0 = Debug|iPhone
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UITEST|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UITEST|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI-Test|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{CA6E0AA8-7FF0-45DA-BFC9-DBC2B4FB55C0}.UI-Test|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4F35FA41-BF70-4770-ADFD-D7F760F511B1}
EndGlobalSection
EndGlobal

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

@ -47,6 +47,7 @@ Copyright (C) 2014 Xamarin. All rights reserved.
<PropertyGroup>
<CreateAppBundleDependsOn Condition="'$(UsingAppleNETSdk)' != 'true'">
$(CreateAppBundleDependsOn);
_DetectSigningIdentity;
_CopyResourcesToBundle;
_SmeltMetal;

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

@ -107,6 +107,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
<PropertyGroup Condition="'$(UsingAppleNETSdk)' != 'true'">
<CreateAppBundleDependsOn>
$(CreateAppBundleDependsOn);
_DetectAppManifest;
_DetectSigningIdentity;
_CopyResourcesToBundle;

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

@ -64,5 +64,35 @@ namespace Xamarin.iOS.Tasks.Windows.Properties {
return ResourceManager.GetString("LocalUnzip_Unzipping", resourceCulture);
}
}
internal static string CollectDynamicFrameworks_InvalidFramework {
get {
return ResourceManager.GetString("CollectDynamicFrameworks_InvalidFramework", resourceCulture);
}
}
internal static string LocalCodesign_MissingPasswordFile {
get {
return ResourceManager.GetString("LocalCodesign_MissingPasswordFile", resourceCulture);
}
}
internal static string LocalCodesign_MissingTerminal {
get {
return ResourceManager.GetString("LocalCodesign_MissingTerminal", resourceCulture);
}
}
internal static string LocalCodesign_ToolArguments {
get {
return ResourceManager.GetString("LocalCodesign_ToolArguments", resourceCulture);
}
}
internal static string CompileAppManifest_MissinInfoPList {
get {
return ResourceManager.GetString("CompileAppManifest_MissinInfoPList", resourceCulture);
}
}
}
}

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

@ -21,4 +21,23 @@
<data name="LocalUnzip_Unzipping" xml:space="preserve">
<value>Unzipping {0}...</value>
</data>
<data name="CollectDynamicFrameworks_InvalidFramework" xml:space="preserve">
<value>Skipping invalid framework {0}. Reason: {1}</value>
<comment>0: framework name; 1: why the framework was skipped</comment>
</data>
<data name="LocalCodesign_MissingPasswordFile" xml:space="preserve">
<value>Could not find the password for the selected Signing Identity, please create a new Certificate from Tools -&gt; Options -&gt; Apple Accounts -&gt; View Team Details.</value>
</data>
<data name="LocalCodesign_MissingTerminal" xml:space="preserve">
<value>Could not find the winiostermial executable {0}</value>
<comment>0: path to the terminal</comment>
</data>
<data name="LocalCodesign_ToolArguments" xml:space="preserve">
<value>Started signing tool with arguments: {0}</value>
<comment>0: arguments</comment>
</data>
<data name="CompileAppManifest_MissinInfoPList" xml:space="preserve">
<value>Info.plist file does not exist under {0}, please rebuild your project</value>
<comment>0: path</comment>
</data>
</root>

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

@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Xamarin.iOS.Tasks.Windows.Properties;
using Xamarin.iOS.Windows;
namespace Xamarin.iOS.HotRestart.Tasks {
public class Codesign : Task, ICancelableTask {
CancellationTokenSource cancellationSource;
#region Inputs
[Required]
public string AppBundlePath { get; set; }
[Required]
public string BundleIdentifier { get; set; }
[Required]
public string CodeSigningPath { get; set; }
[Required]
public string ProvisioningProfilePath { get; set; }
#endregion
public override bool Execute ()
{
try {
var hotRestartClient = new HotRestartClient ();
var plistArgs = new Dictionary<string, string>
{
{ "CFBundleIdentifier", BundleIdentifier }
};
var password = hotRestartClient.CertificatesManager.GetCertificatePassword (certificatePath: CodeSigningPath);
if (password == null) {
throw new Exception (Resources.LocalCodesign_MissingPasswordFile);
}
hotRestartClient.Sign (AppBundlePath, ProvisioningProfilePath, CodeSigningPath, password, plistArgs);
} catch (WindowsiOSException ex) {
var message = GetFullExceptionMesage (ex);
Log.LogError (null, ex.ErrorCode, null, null, 0, 0, 0, 0, message);
} catch (Exception ex) {
Log.LogErrorFromException (ex);
}
return !Log.HasLoggedErrors;
}
public void Cancel () => cancellationSource?.Cancel ();
string GetFullExceptionMesage (Exception ex)
{
var messageBuilder = new StringBuilder ();
return GetFullExceptionMesage (ex, messageBuilder);
}
string GetFullExceptionMesage (Exception ex, StringBuilder messageBuilder)
{
messageBuilder.AppendLine (ex.Message);
if (ex.InnerException != null) {
return GetFullExceptionMesage (ex.InnerException, messageBuilder);
} else {
return messageBuilder.ToString ();
}
}
}
}

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

@ -0,0 +1,62 @@
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Xamarin.iOS.Tasks.Windows.Properties;
using Xamarin.iOS.Windows;
namespace Xamarin.iOS.HotRestart.Tasks {
public class CollectDynamicFrameworks : Task {
#region Inputs
[Required]
public ITaskItem [] Frameworks { get; set; }
#endregion
#region Outputs
[Output]
public ITaskItem [] DynamicFrameworks { get; set; }
#endregion
public override bool Execute ()
{
var frameworks = new List<ITaskItem> ();
var hotRestartClient = new HotRestartClient ();
foreach (var framework in Frameworks.Where (f => Path.GetExtension (f.ItemSpec.TrimEnd ('\\')) == ".framework")) {
framework.ItemSpec = framework.ItemSpec.TrimEnd ('\\');
if (frameworks.Any (x => x.ItemSpec == framework.ItemSpec)) {
continue;
}
var frameworkDirName = Path.GetFileName (framework.ItemSpec);
try {
var frameworkPath = Path.Combine (framework.ItemSpec, Path.GetFileNameWithoutExtension (frameworkDirName));
hotRestartClient.LoadDynamicFramework (frameworkPath);
} catch (AppleInvalidFrameworkException frameworkEx) {
Log.LogMessage (MessageImportance.Normal, Resources.CollectDynamicFrameworks_InvalidFramework, Path.GetFileName (framework.ItemSpec), frameworkEx.Message);
continue;
} catch (Exception ex) {
Log.LogErrorFromException (ex);
break;
}
framework.SetMetadata ("FrameworkDir", $@"{frameworkDirName}\");
frameworks.Add (framework);
}
DynamicFrameworks = frameworks.ToArray ();
return !Log.HasLoggedErrors;
}
}
}

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

@ -0,0 +1,75 @@
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System;
using System.IO;
using System.Linq;
using Xamarin.iOS.Tasks.Windows.Properties;
using Xamarin.MacDev;
namespace Xamarin.iOS.HotRestart.Tasks
{
public class CompileAppManifest : Task
{
static readonly string[] IgnorePlistKeys = {
"XSAppIconAssets",
"CFBundleIconName",
"XSLaunchImageAssets",
"UIMainStoryboardFile",
"UIFileSharingEnabled",
"UILaunchStoryboardName",
"UIMainStoryboardFile~ipad",
"UIMainStoryboardFile~iphone",
"CFBundleIdentifier",
"CFBundleExecutable"
};
#region Inputs
[Required]
public string AppBundlePath { get; set; }
[Required]
public string AppManifestPath { get; set; }
#endregion
public override bool Execute()
{
try
{
var preBuiltInfoPlistPath = Path.Combine(AppBundlePath, "Info.plist");
if (!File.Exists(preBuiltInfoPlistPath))
{
throw new Exception(string.Format(Resources.CompileAppManifest_MissinInfoPList, preBuiltInfoPlistPath));
}
var infoPlist = PDictionary.FromFile(AppManifestPath);
var preBuiltInfoPlist = PDictionary.FromFile(preBuiltInfoPlistPath);
foreach (var item in infoPlist)
{
if (!IgnorePlistKeys.Contains(item.Key))
{
if (preBuiltInfoPlist.ContainsKey(item.Key))
{
preBuiltInfoPlist.Remove(item.Key);
}
preBuiltInfoPlist.Add(item.Key, item.Value.Clone());
}
}
preBuiltInfoPlist.Save(preBuiltInfoPlistPath, binary: true);
return true;
}
catch (Exception ex)
{
Log.LogErrorFromException(ex);
return false;
}
}
}
}

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

@ -0,0 +1,542 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Xamarin.iOS.Windows;
using Xamarin.MacDev;
namespace Xamarin.iOS.HotRestart.Tasks {
public class DetectSigningIdentity : Task {
static readonly string ProvisioningPath = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData), "Xamarin", "iOS", "Provisioning");
static readonly string ProfilesPath = Path.Combine (ProvisioningPath, "Profiles");
static readonly string CertificatesPath = Path.Combine (ProvisioningPath, "Certificates");
const string AutomaticProvision = "Automatic";
const string AutomaticAdHocProvision = "Automatic:AdHoc";
const string AutomaticAppStoreProvision = "Automatic:AppStore";
const string AutomaticInHouseProvision = "Automatic:InHouse";
protected string PlatformName => "iOS";
protected string ApplicationIdentifierKey => "application-identifier";
protected string [] DevelopmentPrefixes => IPhoneCertificate.DevelopmentPrefixes;
protected string [] AppStoreDistributionPrefixes => IPhoneCertificate.DistributionPrefixes;
string provisioningProfileName;
string codesignCommonName;
IHotRestartClient hotRestartClient;
#region Inputs
// Single-project property that determines whether other single-project properties should have any effect
public bool GenerateApplicationManifest { get; set; }
// Single-project property that maps to CFBundleIdentifier
public string ApplicationId { get; set; }
// Single-project property that maps to CFBundleDisplayName
public string ApplicationTitle { get; set; }
[Required]
public string AppManifest { get; set; }
public string SigningKey { get; set; }
public string ProvisioningProfile { get; set; }
#endregion
#region Outputs
[Output]
public string DetectedCodeSigningPath { get; set; }
[Output]
public string DetectedProvisioningProfilePath { get; set; }
[Output]
public string DetectedProvisioningProfileId { get; set; }
[Output]
public string DetectedAppId { get; set; }
[Output]
public string DetectedBundleId { get; set; }
[Output]
public string DetectedAppDisplayName { get; set; }
#endregion
public override bool Execute ()
{
PDictionary plist;
IList<MobileProvision> profiles;
IList<X509Certificate2> certs;
List<CodeSignIdentity> pairs;
var type = GetProvisioningDistributionType ();
var platform = MobileProvisionPlatform.iOS;
var identity = new CodeSignIdentity ();
hotRestartClient = new HotRestartClient ();
try {
plist = PDictionary.FromFile (AppManifest);
} catch (Exception ex) {
Log.LogError (null, null, null, AppManifest, 0, 0, 0, 0, "Error loading '{0}': {1}", AppManifest, ex.Message);
return false;
}
identity.BundleId = plist.GetCFBundleIdentifier ();
if (string.IsNullOrEmpty (identity.BundleId)) {
if (GenerateApplicationManifest && !string.IsNullOrEmpty (ApplicationId)) {
identity.BundleId = ApplicationId;
} else {
Log.LogError (null, null, null, AppManifest, 0, 0, 0, 0, "{0} does not define CFBundleIdentifier", AppManifest);
return false;
}
}
DetectedBundleId = identity.BundleId;
var appDisplayName = plist.GetCFBundleDisplayName ();
if (string.IsNullOrEmpty (appDisplayName)) {
if (GenerateApplicationManifest && !string.IsNullOrEmpty (ApplicationTitle)) {
appDisplayName = ApplicationTitle;
}
}
DetectedAppDisplayName = appDisplayName;
if (!TryGetSigningCertificates (out certs, false))
return false;
Log.LogMessage (MessageImportance.Low, "Available certificates:");
foreach (var cert in certs)
Log.LogMessage (MessageImportance.Low, " {0}", GetCertificateCommonName (cert));
if (!IsAutoCodeSignProfile (ProvisioningProfile)) {
identity.Profile = MobileProvisionIndex.GetMobileProvision (platform, ProvisioningProfile);
if (identity.Profile == null) {
Log.LogError ("The specified " + PlatformName + " provisioning profile '{0}' could not be found. Please enable Automatic Provisioning from the iOS Bundle Signing page.", ProvisioningProfile);
return false;
}
var profile = identity.Profile; // capture ref for lambda
if (certs.Count > 0) {
identity.SigningKey = certs.FirstOrDefault (c => profile.DeveloperCertificates.Any (p => p.Thumbprint == c.Thumbprint));
if (identity.SigningKey == null) {
Log.LogError ("No " + PlatformName + " signing identities match the specified provisioning profile '{0}'.", ProvisioningProfile);
return false;
}
}
identity.AppId = ConstructValidAppId (identity.Profile, identity.BundleId);
if (identity.AppId == null) {
Log.LogError (null, null, null, AppManifest, 0, 0, 0, 0, "Project bundle identifier '{0}' does not match specified provisioning profile '{1}'. Please enable Automatic Provisioning from the iOS Bundle Signing page.", identity.BundleId, ProvisioningProfile);
return false;
}
if (identity.SigningKey != null) {
codesignCommonName = GetCertificateCommonName (identity.SigningKey);
DetectedCodeSigningPath = Path.Combine (CertificatesPath, $"{identity.SigningKey.SerialNumber}.p12");
}
provisioningProfileName = identity.Profile.Name;
DetectedAppId = identity.AppId;
DetectedProvisioningProfileId = identity.Profile.Uuid;
DetectedProvisioningProfilePath = Path.Combine (ProfilesPath, $"{DetectedProvisioningProfileId}.mobileprovision");
ReportDetectedCodesignInfo ();
return !Log.HasLoggedErrors;
}
if ((profiles = GetProvisioningProfiles (platform, type, identity, certs)) == null)
return false;
if ((pairs = GetCodeSignIdentityPairs (profiles, certs)) == null)
return false;
identity = GetBestMatch (pairs, identity);
if (identity.Profile != null && identity.AppId != null) {
codesignCommonName = identity.SigningKey != null ? GetCertificateCommonName (identity.SigningKey) : null;
provisioningProfileName = identity.Profile.Name;
DetectedAppId = identity.AppId;
DetectedCodeSigningPath = identity.SigningKey != null ? Path.Combine (CertificatesPath, $"{identity.SigningKey.SerialNumber}.p12") : string.Empty;
DetectedProvisioningProfileId = identity.Profile.Uuid;
DetectedProvisioningProfilePath = Path.Combine (ProfilesPath, $"{DetectedProvisioningProfileId}.mobileprovision");
ReportDetectedCodesignInfo ();
} else {
if (identity.SigningKey != null) {
Log.LogError ("Bundle identifier '{0}' does not match any installed provisioning profile for selected signing identity '{0}'. Please enable Automatic Provisioning from the iOS Bundle Signing page.", identity.BundleId, identity.SigningKey);
} else {
Log.LogError ("Bundle identifier '{0}' does not match any installed provisioning profile. Please enable Automatic Provisioning from the iOS Bundle Signing page.", identity.BundleId);
}
}
return !Log.HasLoggedErrors;
}
static bool IsAutoCodeSignProfile (string value)
{
if (string.IsNullOrEmpty (value))
return true;
switch (value) {
case AutomaticAppStoreProvision:
case AutomaticAdHocProvision:
case AutomaticInHouseProvision:
case AutomaticProvision:
return true;
default:
return false;
}
}
string ConstructValidAppId (MobileProvision provision, string bundleId)
{
int matchLength;
return ConstructValidAppId (provision, bundleId, out matchLength);
}
string ConstructValidAppId (MobileProvision provision, string bundleId, out int matchLength)
{
if (!provision.Entitlements.ContainsKey (ApplicationIdentifierKey)) {
matchLength = 0;
return null;
}
return ConstructValidAppId (
provision.ApplicationIdentifierPrefix [0] + "." + bundleId,
((PString) provision.Entitlements [ApplicationIdentifierKey]).Value,
out matchLength
);
}
static string ConstructValidAppId (string appid, string allowed, out int matchLength)
{
// The user can't have a wildcard ID as their actual app id
if (appid.Contains ("*")) {
matchLength = 0;
return null;
}
// Next check if we have an exact match
if (allowed == appid) {
matchLength = allowed.Length;
return appid;
}
// Finally if the profile is a wildcard, ensure that the appid matches it for everything before the '*'
int star = allowed.IndexOf ('*');
if (star != -1 && star + 1 == allowed.Length && appid.Length >= star && appid.StartsWith (allowed.Substring (0, star), StringComparison.Ordinal)) {
matchLength = star;
return appid;
}
// It does not match
matchLength = 0;
return null;
}
void ReportDetectedCodesignInfo ()
{
Log.LogMessage (MessageImportance.High, "Detected signing identity:");
if (codesignCommonName != null)
Log.LogMessage (MessageImportance.High, " Code Signing Key: \"{0}\" ({1})", codesignCommonName, DetectedCodeSigningPath);
if (provisioningProfileName != null)
Log.LogMessage (MessageImportance.High, " Provisioning Profile: \"{0}\" ({1})", provisioningProfileName, DetectedProvisioningProfilePath);
}
static bool MatchesAny (string name, string [] names)
{
for (int i = 0; i < names.Length; i++) {
if (name == names [i])
return true;
}
return false;
}
static bool StartsWithAny (string name, string [] prefixes)
{
foreach (var prefix in prefixes) {
if (name.StartsWith (prefix, StringComparison.Ordinal))
return true;
}
return false;
}
bool TryGetSigningCertificates (out IList<X509Certificate2> certs, string [] prefixes, bool allowZeroCerts)
{
var now = DateTime.Now;
certs = new List<X509Certificate2> ();
foreach (var certificate in GetAllCertificates ()) {
var cname = GetCertificateCommonName (certificate);
if (!StartsWithAny (cname, prefixes)) {
Log.LogMessage (MessageImportance.Low, "The certificate '{0}' does not match any of the prefixes '{1}'.", cname, string.Join ("', '", prefixes));
continue;
}
if (now >= certificate.NotAfter) {
Log.LogMessage (MessageImportance.Low, "The certificate '{0}' has expired ({1})", cname, certificate.NotAfter);
continue;
}
certs.Add (certificate);
}
if (certs.Count == 0 && !allowZeroCerts) {
var message = "No valid " + PlatformName + " code signing keys found in keychain. Please enable Automatic Provisioning from the iOS Bundle Signing page.";
Log.LogError (message);
return false;
}
return true;
}
bool TryGetSigningCertificates (out IList<X509Certificate2> certs, string name)
{
var now = DateTime.Now;
certs = new List<X509Certificate2> ();
foreach (var certificate in GetAllCertificates ()) {
var cname = GetCertificateCommonName (certificate);
if (!name.Equals (certificate.Thumbprint, StringComparison.OrdinalIgnoreCase) && name != cname) {
Log.LogMessage (MessageImportance.Low, "The certificate '{0}' does not match '{1}'.", cname, name);
continue;
}
if (now >= certificate.NotAfter) {
Log.LogMessage (MessageImportance.Low, "The certificate '{0}' has expired ({1})", cname, certificate.NotAfter);
continue;
}
certs.Add (certificate);
}
if (certs.Count == 0) {
Log.LogError (PlatformName + " code signing key '{0}' not found in keychain.", SigningKey);
return false;
}
return true;
}
bool TryGetSigningCertificates (out IList<X509Certificate2> certs, bool allowZeroCerts)
{
try {
if (string.IsNullOrEmpty (SigningKey) || MatchesAny (SigningKey, DevelopmentPrefixes)) {
// Note: we treat an empty signing key as "developer automatic".
if (!TryGetSigningCertificates (out certs, DevelopmentPrefixes, allowZeroCerts))
return false;
} else if (MatchesAny (SigningKey, AppStoreDistributionPrefixes)) {
if (!TryGetSigningCertificates (out certs, AppStoreDistributionPrefixes, false))
return false;
} else {
// The user has specified an exact name to match...
if (!TryGetSigningCertificates (out certs, SigningKey))
return false;
}
return true;
} catch (Exception ex) {
Log.LogError ("{0}", ex.Message);
certs = null;
return false;
}
}
IList<MobileProvision> GetProvisioningProfiles (MobileProvisionPlatform platform, MobileProvisionDistributionType type, CodeSignIdentity identity, IList<X509Certificate2> certs)
{
var failures = new List<string> ();
IList<MobileProvision> profiles;
if (identity.BundleId != null) {
if (certs.Count > 0)
profiles = MobileProvisionIndex.GetMobileProvisions (platform, identity.BundleId, type, certs, unique: true, failures: failures);
else
profiles = MobileProvisionIndex.GetMobileProvisions (platform, identity.BundleId, type, unique: true, failures: failures);
} else if (certs.Count > 0) {
profiles = MobileProvisionIndex.GetMobileProvisions (platform, type, certs, unique: true, failures: failures);
} else {
profiles = MobileProvisionIndex.GetMobileProvisions (platform, type, unique: true, failures: failures);
}
if (profiles.Count == 0) {
foreach (var f in failures)
Log.LogMessage (MessageImportance.Low, "{0}", f);
Log.LogError ($"Could not find any available provisioning profiles for {PlatformName}. Please enable Automatic Provisioning from the iOS Bundle Signing page.");
return null;
}
Log.LogMessage (MessageImportance.Low, "Available profiles:");
foreach (var p in profiles)
Log.LogMessage (MessageImportance.Low, " {0}", p.Name);
return profiles;
}
List<CodeSignIdentity> GetCodeSignIdentityPairs (IList<MobileProvision> profiles, IList<X509Certificate2> certs)
{
List<CodeSignIdentity> pairs;
if (certs.Count > 0) {
pairs = (from p in profiles
from c in certs
where p.DeveloperCertificates.Any (d => {
var rv = d.Thumbprint == c.Thumbprint;
if (!rv)
Log.LogMessage (MessageImportance.Low, "'{0}' doesn't match '{1}'.", d.Thumbprint, c.Thumbprint);
return rv;
})
select new CodeSignIdentity { SigningKey = c, Profile = p }).ToList ();
if (pairs.Count == 0) {
Log.LogError ("No installed provisioning profiles match the installed " + PlatformName + " signing identities. Please enable Automatic Provisioning from the iOS Bundle Signing page.");
return null;
}
} else {
pairs = (from p in profiles select new CodeSignIdentity { Profile = p }).ToList ();
}
return pairs;
}
CodeSignIdentity GetBestMatch (List<CodeSignIdentity> pairs, CodeSignIdentity identity)
{
var matches = new List<CodeSignIdentity> ();
int bestMatchLength = 0;
int matchLength;
// find matching provisioning profiles with compatible appid, keeping only those with the longest matching (wildcard) ids
Log.LogMessage (MessageImportance.Low, "Finding matching provisioning profiles with compatible AppID, keeping only those with the longest matching (wildcard) IDs.");
foreach (var pair in pairs) {
var appid = ConstructValidAppId (pair.Profile, identity.BundleId, out matchLength);
if (appid != null) {
if (matchLength >= bestMatchLength) {
if (matchLength > bestMatchLength) {
bestMatchLength = matchLength;
foreach (var previousMatch in matches)
Log.LogMessage (MessageImportance.Low, "AppID: {0} was ruled out because we found a better match: {1}.", previousMatch.AppId, appid);
matches.Clear ();
}
var match = identity.Clone ();
match.SigningKey = pair.SigningKey;
match.Profile = pair.Profile;
match.AppId = appid;
matches.Add (match);
} else {
string currentMatches = "";
foreach (var match in matches)
currentMatches += $"{match}; ";
Log.LogMessage (MessageImportance.Low, "AppID: {0} was ruled out because we already found better matches: {1}.", appid, currentMatches);
}
}
}
if (matches.Count == 0) {
Log.LogWarning (null, null, null, AppManifest, 0, 0, 0, 0, "No installed provisioning profiles match the bundle identifier.");
return identity;
}
if (matches.Count > 1) {
var spaces = new string (' ', 3);
Log.LogMessage (MessageImportance.Normal, "Multiple provisioning profiles match the bundle identifier; using the first match.");
matches.Sort (new SigningIdentityComparer ());
for (int i = 0; i < matches.Count; i++) {
Log.LogMessage (MessageImportance.Normal, "{0,3}. Provisioning Profile: \"{1}\" ({2})", i + 1, matches [i].Profile.Name, matches [i].Profile.Uuid);
if (matches [i].SigningKey != null)
Log.LogMessage (MessageImportance.Normal, "{0} Signing Identity: \"{1}\"", spaces, GetCertificateCommonName (matches [i].SigningKey));
}
}
return matches [0];
}
MobileProvisionDistributionType GetProvisioningDistributionType ()
{
if (ProvisioningProfile == AutomaticAppStoreProvision)
return MobileProvisionDistributionType.AppStore;
else if (ProvisioningProfile == AutomaticInHouseProvision)
return MobileProvisionDistributionType.InHouse;
else if (ProvisioningProfile == AutomaticAdHocProvision)
return MobileProvisionDistributionType.AdHoc;
return MobileProvisionDistributionType.Any;
}
IEnumerable<X509Certificate2> GetAllCertificates () => hotRestartClient.CertificatesManager.GetInstalledCertificates ();
string GetCertificateCommonName (X509Certificate2 certificate) => hotRestartClient.CertificatesManager.GetCertificateCommonName (certificate.SerialNumber);
class CodeSignIdentity {
public X509Certificate2 SigningKey { get; set; }
public MobileProvision Profile { get; set; }
public string BundleId { get; set; }
public string AppId { get; set; }
public CodeSignIdentity Clone ()
{
return new CodeSignIdentity {
SigningKey = SigningKey,
Profile = Profile,
BundleId = BundleId,
AppId = AppId
};
}
}
class SigningIdentityComparer : IComparer<CodeSignIdentity> {
public int Compare (CodeSignIdentity x, CodeSignIdentity y)
{
// reverse sort by provisioning profile creation date
return y.Profile.CreationDate.CompareTo (x.Profile.CreationDate);
}
}
}
}

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

@ -0,0 +1,45 @@
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System.IO;
using System.IO.Compression;
using Xamarin.iOS.Windows;
namespace Xamarin.iOS.HotRestart.Tasks {
public class PrepareAppBundle : Task {
#region Inputs
[Required]
public string AppBundleName { get; set; }
[Required]
public string SessionId { get; set; }
[Required]
public bool ShouldExtract { get; set; }
#endregion
#region Outputs
[Output]
public string AppBundlePath { get; set; }
#endregion
public override bool Execute ()
{
AppBundlePath = HotRestartContext.Default.GetAppBundlePath (AppBundleName, SessionId.Substring (0, 8));
if (!Directory.Exists (AppBundlePath) && ShouldExtract) {
var preBuiltAppBundlePath = Path.Combine (
Path.GetDirectoryName (typeof (PrepareAppBundle).Assembly.Location),
"Xamarin.PreBuilt.iOS.app.zip");
ZipFile.ExtractToDirectory (preBuiltAppBundlePath, AppBundlePath);
File.WriteAllText (Path.Combine (AppBundlePath, "Extracted"), string.Empty);
}
return true;
}
}
}

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

@ -0,0 +1,79 @@
using Ionic.Zip;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Mono.Cecil;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace Xamarin.iOS.HotRestart.Tasks {
public class UnpackFrameworks : Task {
#region Inputs
[Required]
public ITaskItem [] ReferencedAssemblies { get; set; }
[Required]
public string IntermediateOutputPath { get; set; }
#endregion
#region Outputs
[Output]
public ITaskItem [] Frameworks { get; set; }
#endregion
public override bool Execute ()
{
var frameworks = new List<ITaskItem> ();
Directory.CreateDirectory (Path.Combine (IntermediateOutputPath, "Frameworks"));
foreach (var assemblyPath in ReferencedAssemblies.Distinct ().Where (x => !IsFrameworkItem (x))) {
var assembly = AssemblyDefinition.ReadAssembly (assemblyPath.ItemSpec);
// We should only get the embedded resources that ends with .framework
var embeddedFrameworks = assembly.MainModule.Resources.Where (x => Path.GetExtension (x.Name) == ".framework");
foreach (var resource in embeddedFrameworks) {
var embeddedFramework = resource as EmbeddedResource;
if (embeddedFramework == null)
continue;
var frameworkPath = Path.Combine (IntermediateOutputPath, "Frameworks", embeddedFramework.Name);
var frameworkZipPath = frameworkPath + ".zip";
// The frameworks are embedded as zip files
using (var fileStream = File.OpenWrite (frameworkZipPath)) {
embeddedFramework.GetResourceStream ().CopyTo (fileStream);
}
// Unzip the framework
using (var zipFile = ZipFile.Read (frameworkZipPath)) {
zipFile.ExtractAll (frameworkPath, ExtractExistingFileAction.OverwriteSilently);
}
File.Delete (frameworkZipPath);
var taskItem = new TaskItem (frameworkPath);
frameworks.Add (taskItem);
}
}
Frameworks = frameworks.ToArray ();
return true;
}
bool IsFrameworkItem (ITaskItem item)
{
return (bool.TryParse (item.GetMetadata ("FrameworkFile"), out var isFrameworkFile) && isFrameworkFile) ||
item.GetMetadata ("ResolvedFrom") == "{TargetFrameworkDirectory}" ||
item.GetMetadata ("ResolvedFrom") == "ImplicitlyExpandDesignTimeFacades";
}
}
}

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

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Use single-project MSBuild properties to generate the application manifest by default -->
<GenerateApplicationManifest Condition="'$(GenerateApplicationManifest)' == ''">true</GenerateApplicationManifest>
<HotRestartSignedAppOutputDir>$(TEMP)\Xamarin\HotRestart\Signing\$(_AppBundleName)$(AppBundleExtension)\out\</HotRestartSignedAppOutputDir>
<HotRestartPayloadDir>$(HotRestartSignedAppOutputDir)Payload\</HotRestartPayloadDir>
<HotRestartSignedAppDir>$(HotRestartPayloadDir)$(_AppBundleName).app\</HotRestartSignedAppDir>
<HotRestartContentDir>$(HotRestartSignedAppOutputDir)$(_AppBundleName).content\</HotRestartContentDir>
<HotRestartAppContentDir>$(HotRestartSignedAppDir)$(_AppBundleName).content\</HotRestartAppContentDir>
<HotRestartContentStampDir>$(HotRestartSignedAppOutputDir)$(_AppBundleName).stamp\</HotRestartContentStampDir>
<HotRestartIPAPath>$(HotRestartSignedAppOutputDir)$(_AppBundleName).ipa</HotRestartIPAPath>
<UnpackHotRestartFrameworks Condition="'$(UnpackHotRestartFrameworks)' == ''">true</UnpackHotRestartFrameworks>
<_IsHotRestartDefined>$([System.Text.RegularExpressions.Regex]::IsMatch('$(DefineConstants.Trim())', '(^|;)HOTRESTART($|;)'))</_IsHotRestartDefined>
<DefineConstants Condition="!$(_IsHotRestartDefined) And '$(IsHotRestartBuild)' == 'true'">HOTRESTART;$(DefineConstants)</DefineConstants>
</PropertyGroup>
</Project>

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

@ -0,0 +1,340 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Xamarin.iOS.Tasks.CompileEntitlements" AssemblyFile="Xamarin.iOS.Tasks.dll" />
<UsingTask TaskName="Xamarin.iOS.Tasks.UnpackLibraryResources" AssemblyFile="Xamarin.iOS.Tasks.dll" />
<UsingTask TaskName="Xamarin.iOS.HotRestart.Tasks.Codesign" AssemblyFile="Xamarin.iOS.Tasks.Windows.dll" />
<UsingTask TaskName="Xamarin.iOS.HotRestart.Tasks.CollectDynamicFrameworks" AssemblyFile="Xamarin.iOS.Tasks.Windows.dll" />
<UsingTask TaskName="Xamarin.iOS.HotRestart.Tasks.CompileAppManifest" AssemblyFile="Xamarin.iOS.Tasks.Windows.dll" />
<UsingTask TaskName="Xamarin.iOS.HotRestart.Tasks.DetectSigningIdentity" AssemblyFile="Xamarin.iOS.Tasks.Windows.dll" />
<UsingTask TaskName="Xamarin.iOS.HotRestart.Tasks.PrepareAppBundle" AssemblyFile="Xamarin.iOS.Tasks.Windows.dll" />
<UsingTask TaskName="Xamarin.iOS.HotRestart.Tasks.UnpackFrameworks" AssemblyFile="Xamarin.iOS.Tasks.Windows.dll" />
<Import Project="Xamarin.iOS.HotRestart.props" />
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Messaging.Build.targets" Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.Messaging.Build.targets') And '$(MessagingBuildTargetsImported)' != 'true'" />
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Messaging.Apple.targets" Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.Messaging.Apple.targets') And '$(MessagingAppleTargetsImported)' != 'true'" />
<Target Name="_DetectHotRestartSigningIdentity" AfterTargets="_DetectAppManifest"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsHotRestartBuild)' == 'true' And '$(IsHotRestartEnvironmentReady)' == 'true'" >
<HotRestart.Tasks.DetectSigningIdentity
GenerateApplicationManifest="$(GenerateApplicationManifest)"
ApplicationId="$(ApplicationId)"
ApplicationTitle="$(ApplicationTitle)"
AppManifest="$(_AppManifest)"
ProvisioningProfile="$(CodesignProvision)"
SigningKey="$(CodesignKey)">
<Output TaskParameter="DetectedAppId" PropertyName="_AppIdentifier" />
<Output TaskParameter="DetectedBundleId" PropertyName="_BundleIdentifier" />
<Output TaskParameter="DetectedAppDisplayName" PropertyName="_AppDisplayName" />
<Output TaskParameter="DetectedCodeSigningPath" PropertyName="_CodeSigningPath" />
<Output TaskParameter="DetectedProvisioningProfileId" PropertyName="_ProvisioningProfileId" />
<Output TaskParameter="DetectedProvisioningProfilePath" PropertyName="_ProvisioningProfilePath" />
</HotRestart.Tasks.DetectSigningIdentity>
</Target>
<Target Name="_CollectHotRestartBundleResources" Condition="'$(IsHotRestartBuild)' == 'true'">
<CollectBundleResources
OptimizePropertyLists="$(OptimizePropertyLists)"
OptimizePNGs="$(OptimizePNGs)"
BundleResources="@(Content);@(BundleResource)"
ProjectDir="$(MSBuildProjectDirectory)"
ResourcePrefix="$(IPhoneResourcePrefix)">
<Output TaskParameter="BundleResourcesWithLogicalNames" ItemName="_HotRestartBundleResourceWithLogicalName"/>
</CollectBundleResources>
</Target>
<Target Name="_UnpackHotRestartLibraryResources" DependsOnTargets="_CollectHotRestartBundleResources"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsHotRestartBuild)' == 'true'" >
<UnpackLibraryResources
Prefix="monotouch"
NoOverwrite="@(_HotRestartBundleResourceWithLogicalName)"
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)"
TargetFrameworkDirectory="$(TargetFrameworkDirectory)"
ReferencedLibraries="@(ReferencePath);@(ReferenceDependencyPaths);@(_ReferencesFromNuGetPackages)">
<Output TaskParameter="BundleResourcesWithLogicalNames" ItemName="_HotRestartBundleResourceWithLogicalName" />
</UnpackLibraryResources>
</Target>
<!-- Gets the list of assemblies that may contain frameworks -->
<Target Name="_CollectHotRestartFrameworkAssemblies" Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsHotRestartBuild)' == 'true'">
<ItemGroup>
<AssembliesWithFrameworks Condition="'%(Extension)' == '.dll'" Include="@(ReferenceCopyLocalPaths)" Exclude="@(ReferenceSatellitePaths)"/>
</ItemGroup>
</Target>
<Target Name="_UnpackHotRestartFrameworkAssemblies"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsHotRestartBuild)' == 'true' And '$(UnpackHotRestartFrameworks)' == 'true'"
Inputs="@(AssembliesWithFrameworks)"
Outputs="@(AssembliesWithFrameworks -> '$(DeviceSpecificIntermediateOutputPath)UnpackedFrameworks\%(Filename)%(Extension).stamp')" >
<UnpackFrameworks
ReferencedAssemblies="@(AssembliesWithFrameworks)"
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)">
<Output TaskParameter="Frameworks" ItemName="_UnpackedFramework" />
</UnpackFrameworks>
<MakeDir Directories="$(DeviceSpecificIntermediateOutputPath)UnpackedFrameworks"/>
<Touch AlwaysCreate="true" Files="@(AssembliesWithFrameworks -> '$(DeviceSpecificIntermediateOutputPath)UnpackedFrameworks\%(Filename)%(Extension).stamp')" >
<Output TaskParameter="TouchedFiles" ItemName="FileWrites" />
</Touch>
</Target>
<Target Name="_CollectHotRestartFrameworks" >
<ItemGroup>
<_HotRestartFrameworks Include="@(None -> '%(RootDir)%(Directory)')" Condition="$([System.String]::new('%(Directory)').EndsWith('.framework\'))" KeepDuplicates="false" />
<_HotRestartFrameworks Include="@(_UnpackedFramework);@(NativeReference)" KeepDuplicates="false" />
<_HotRestartFrameworkExecutables Include="@(_HotRestartFrameworks -> '%(FullPath)\%(Filename)')"
Outputs="$(DeviceSpecificIntermediateOutputPath)DynamicFrameworks\%(Filename)%(Extension).stamp" KeepDuplicates="false" />
</ItemGroup>
</Target>
<PropertyGroup>
<_CollectHotRestartDynamicFrameworksDependsOn>
_CollectHotRestartFrameworkAssemblies;
_UnpackHotRestartFrameworkAssemblies;
_CollectHotRestartFrameworks;
</_CollectHotRestartDynamicFrameworksDependsOn>
</PropertyGroup>
<Target Name="_CollectHotRestartDynamicFrameworks" DependsOnTargets="$(_CollectHotRestartDynamicFrameworksDependsOn)"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsHotRestartBuild)' == 'true'"
Inputs="@(_HotRestartFrameworkExecutables)"
Outputs="@(_HotRestartFrameworkExecutables -> '%(Outputs)')" >
<CollectDynamicFrameworks
Frameworks="@(_HotRestartFrameworks)" >
<Output TaskParameter="DynamicFrameworks" ItemName="_DynamicFrameworks" />
</CollectDynamicFrameworks>
<MakeDir Directories="$(DeviceSpecificIntermediateOutputPath)DynamicFrameworks"/>
<Touch AlwaysCreate="true" Files="@(_HotRestartFrameworks -> '$(DeviceSpecificIntermediateOutputPath)DynamicFrameworks\%(Filename)%(Extension).stamp')" >
<Output TaskParameter="TouchedFiles" ItemName="FileWrites" />
</Touch>
<ItemGroup>
<_HotRestartFrameworkFiles Include="%(_DynamicFrameworks.FullPath)\**\*.*" Condition="'%(_DynamicFrameworks.FullPath)' != ''" KeepDuplicates="false" >
<FrameworkDir>%(FrameworkDir)</FrameworkDir>
</_HotRestartFrameworkFiles>
</ItemGroup>
</Target>
<PropertyGroup>
<_CreateHotRestartCachedBundleDependsOn>
_PrepareHotRestartAppBundle;
_CompileHotRestartAppManifest;
_CompileHotRestartEntitlements;
</_CreateHotRestartCachedBundleDependsOn>
</PropertyGroup>
<Target Name="_CreateHotRestartCachedBundle" DependsOnTargets="$(_CreateHotRestartCachedBundleDependsOn)" />
<!-- Creates HotRestart app bundle and collects files to copy -->
<Target Name="_PrepareHotRestartAppBundle" DependsOnTargets="_GenerateBuildSessionId"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsAppExtension)' == 'false' And '$(IsHotRestartBuild)' == 'true'">
<!--Create app bundle dir and get its path-->
<PrepareAppBundle
AppBundleName="$(_AppBundleName)"
SessionId="$(BuildSessionId)"
ShouldExtract="true">
<Output TaskParameter="AppBundlePath" PropertyName="HotRestartAppBundlePath" />
</PrepareAppBundle>
<!-- Delete the build signature to force XMA do a full build next time -->
<Delete Files="$(BuildSignatureFile)" Condition="Exists('$(BuildSignatureFile)')" />
<ItemGroup>
<_FilesToHotRestartBundle Include="$(HotRestartAppBundlePath)\Extracted" />
<_FilesToHotRestartContent Include="@(MainAssembly);" >
<DestinationSubDirectory></DestinationSubDirectory>
</_FilesToHotRestartContent>
<_FilesToHotRestartContent Include="@(_FilesToHotRestartContent -> '%(RootDir)%(Directory)%(Filename).pdb')"
Condition="Exists('%(RootDir)%(Directory)%(Filename).pdb')" />
<!-- TODO: We stopped filtering assemblies until we fix the net6 build -->
<!-- <_FilesToHotRestartContent Include="@(ReferenceCopyLocalPaths -> Distinct())" Condition="Exists('$(HotRestartAppBundlePath)\%(Filename)%(Extension)') == 'false'"/> -->
<_FilesToHotRestartContent Include="@(ReferenceCopyLocalPaths -> Distinct())"/>
</ItemGroup>
</Target>
<Target Name="_CompileHotRestartAppManifest"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsHotRestartBuild)' == 'true'"
Inputs="$(_AppManifest);$(HotRestartAppBundlePath)\Extracted"
Outputs="$(HotRestartSignedAppDir)$(_AppManifest);$(HotRestartSignedAppDir)Extracted">
<HotRestart.Tasks.CompileAppManifest
AppBundlePath="$(HotRestartAppBundlePath)"
AppManifestPath="$(_AppManifest)" />
</Target>
<Target Name="_CompileHotRestartEntitlements"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsHotRestartBuild)' == 'true'"
Inputs="$(CodesignEntitlements);$(_ProvisioningProfilePath);$(HotRestartAppBundlePath)\Extracted"
Outputs="$(HotRestartSignedAppDir)archived-expanded-entitlements.xcent;$(HotRestartSignedAppDir)Extracted">
<CompileEntitlements
AppBundleDir="$(HotRestartAppBundlePath)"
AppIdentifier="$(_AppIdentifier)"
BundleIdentifier="$(_BundleIdentifier)"
Entitlements="$(CodesignEntitlements)"
CompiledEntitlements="$(DeviceSpecificIntermediateOutputPath)Entitlements.xcent"
IsAppExtension="$(IsAppExtension)"
ProvisioningProfile="$(_ProvisioningProfileId)"
SdkIsSimulator="False"
SdkPlatform="iPhoneOS"
SdkVersion="12.2"
SdkDevPath=" "
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)" />
</Target>
<Target Name="_CopyFilesToHotRestartBundle"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsAppExtension)' == 'false' And '$(IsHotRestartBuild)' == 'true'"
DependsOnTargets="_CreateHotRestartCachedBundle;_UnpackHotRestartLibraryResources"
Inputs="@(_HotRestartBundleResourceWithLogicalName);@(_FilesToHotRestartBundle)"
Outputs="@(_HotRestartBundleResourceWithLogicalName -> '$(HotRestartSignedAppDir)%(LogicalName)');
@(_FilesToHotRestartBundle -> '$(HotRestartSignedAppDir)%(Filename)%(Extension)')">
<!-- Copy Bundle resources -->
<Copy SourceFiles="@(_HotRestartBundleResourceWithLogicalName)"
DestinationFiles="@(_HotRestartBundleResourceWithLogicalName -> '$(HotRestartSignedAppDir)\%(LogicalName)')"
SkipUnchangedFiles="true"
Condition="'@(_HotRestartBundleResourceWithLogicalName)' != ''">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
<Copy SourceFiles="@(_FilesToHotRestartBundle)"
DestinationFiles="@(_FilesToHotRestartBundle -> '$(HotRestartSignedAppDir)\%(Filename)%(Extension)')"
SkipUnchangedFiles="true"
Condition="'@(_FilesToHotRestartBundle)' != ''">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
<MakeDir Directories="$(HotRestartContentStampDir)"/>
<Touch AlwaysCreate="true" Files="$(HotRestartContentStampDir)$(_AppBundleName).stamp" />
</Target>
<Target Name="_CopyFilesToHotRestartContent"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsAppExtension)' == 'false' And '$(IsHotRestartBuild)' == 'true'"
DependsOnTargets="_CreateHotRestartCachedBundle"
Inputs="@(_FilesToHotRestartContent)"
Outputs="@(_FilesToHotRestartContent -> '$(HotRestartContentDir)%(DestinationSubDirectory)%(FileName)%(Extension)');
@(_FilesToHotRestartContent -> '$(HotRestartAppContentDir)%(DestinationSubDirectory)%(FileName)%(Extension)')">
<MakeDir Directories="$(HotRestartContentDir)"/>
<MakeDir Directories="$(HotRestartAppContentDir)"/>
<!-- Copy assemblies and debug symbols into incremental Content folder -->
<Copy SourceFiles="@(_FilesToHotRestartContent)"
DestinationFiles="@(_FilesToHotRestartContent -> '$(HotRestartContentDir)%(DestinationSubDirectory)%(FileName)%(Extension)')"
SkipUnchangedFiles="true"
Condition="'@(_FilesToHotRestartContent)' != ''">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
<!-- Copy assemblies and debug symbols into app bundle's content folder -->
<Copy SourceFiles="@(_FilesToHotRestartContent)"
DestinationFiles="@(_FilesToHotRestartContent -> '$(HotRestartAppContentDir)%(DestinationSubDirectory)%(FileName)%(Extension)')"
SkipUnchangedFiles="true"
Condition="'@(_FilesToHotRestartContent)' != ''">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
<MakeDir Directories="$(HotRestartContentStampDir)"/>
<MakeDir Directories="@(_FilesToHotRestartContent -> '$(HotRestartContentStampDir)%(DestinationSubDirectory)')"/>
<Touch AlwaysCreate="true" Files="@(_FilesToHotRestartContent -> '$(HotRestartContentStampDir)%(DestinationSubDirectory)%(FileName)%(Extension).stamp')" />
<Touch AlwaysCreate="true" Files="@(_FilesToHotRestartContent -> '$(HotRestartContentStampDir)$(AssemblyName).hotrestartapp.stamp')" />
<Touch AlwaysCreate="true" Files="@(_FilesToHotRestartContent -> '$(HotRestartContentDir)$(AssemblyName).hotrestartapp')" />
<Touch AlwaysCreate="true" Files="@(_FilesToHotRestartContent -> '$(HotRestartAppContentDir)$(AssemblyName).hotrestartapp')" />
</Target>
<Target Name="_CopyFrameworksToHotRestartBundle"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsAppExtension)' == 'false' And '$(IsHotRestartBuild)' == 'true'"
DependsOnTargets="_CreateHotRestartCachedBundle;_CollectHotRestartDynamicFrameworks"
Inputs="@(_HotRestartFrameworkFiles)"
Outputs="@(_HotRestartFrameworkFiles -> '$(HotRestartSignedAppDir)Frameworks\%(FrameworkDir)%(RecursiveDir)%(Filename)%(Extension)')">
<!-- Copy frameworks -->
<Copy SourceFiles="@(_HotRestartFrameworkFiles)"
DestinationFiles="@(_HotRestartFrameworkFiles -> '$(HotRestartAppBundlePath)\Frameworks\%(FrameworkDir)%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true"
Condition="'@(_HotRestartFrameworkFiles)' != ''">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
</Target>
<Target Name="_CollectCodeSignHotRestartInputs">
<ItemGroup>
<_CodeSignHotRestartInputs Include="$(_AppManifest)" Outputs="$(HotRestartSignedAppDir)$(_AppManifest)" />
<_CodeSignHotRestartInputs Include="$(CodesignEntitlements)" Outputs="$(HotRestartSignedAppDir)$(CodesignEntitlements)" />
<_CodeSignHotRestartInputs Include="$(_ProvisioningProfilePath)" Outputs="$(HotRestartSignedAppDir)embedded.mobileprovision" />
<_CodeSignHotRestartInputs Include="@(_HotRestartFrameworkFiles)" Outputs="$(HotRestartAppBundlePath)\Frameworks\%(_HotRestartFrameworkFiles.FrameworkDir)%(RecursiveDir)%(Filename)%(Extension)" />
<_CodeSignHotRestartInputs Include="$(HotRestartAppBundlePath)\Extracted" Outputs="$(HotRestartSignedAppDir)Extracted" />
</ItemGroup>
</Target>
<PropertyGroup>
<_CreateHotRestartOutputBundleDependsOn>
_CodesignHotRestartAppBundle;
_CopyFilesToHotRestartBundle;
_CopyFilesToHotRestartContent;
</_CreateHotRestartOutputBundleDependsOn>
</PropertyGroup>
<Target Name="_CreateHotRestartOutputBundle" Condition="'$(IsHotRestartEnvironmentReady)' == 'true'" DependsOnTargets="$(_CreateHotRestartOutputBundleDependsOn)"
AfterTargets="_CodesignAppBundle" />
<Target Name="_CodesignHotRestartAppBundle"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsAppExtension)' == 'false' And '$(IsHotRestartBuild)' == 'true'"
DependsOnTargets="_CreateHotRestartCachedBundle;_CopyFrameworksToHotRestartBundle;_CollectCodeSignHotRestartInputs"
Inputs="@(_CodeSignHotRestartInputs)"
Outputs="@(_CodeSignHotRestartInputs -> '%(Outputs)')">
<HotRestart.Tasks.Codesign
AppBundlePath="$(HotRestartAppBundlePath)"
BundleIdentifier="$(_BundleIdentifier)"
CodeSigningPath="$(_CodeSigningPath)"
ProvisioningProfilePath="$(_ProvisioningProfilePath)" />
</Target>
<PropertyGroup>
<CleanDependsOn>
$(CleanDependsOn);
_CleanHotRestartBundle
</CleanDependsOn>
</PropertyGroup>
<Target Name="_CleanHotRestartBundle" DependsOnTargets="_GenerateBuildSessionId" >
<!-- Gets the bundle path -->
<PrepareAppBundle
Condition="'$(IsHotRestartBuild)' == 'true'"
AppBundleName="$(_AppBundleName)"
SessionId="$(BuildSessionId)"
ShouldExtract="false">
<Output TaskParameter="AppBundlePath" PropertyName="HotRestartAppBundlePath" />
</PrepareAppBundle>
<RemoveDir Directories="$(HotRestartAppBundlePath)" />
<RemoveDir Directories="$(HotRestartSignedAppOutputDir)" />
<RemoveDir Directories="$(DeviceSpecificIntermediateOutputPath)UnpackedFrameworks" />
<RemoveDir Directories="$(DeviceSpecificIntermediateOutputPath)DynamicFrameworks" />
</Target>
</Project>

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

@ -4,12 +4,15 @@
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<MergeSystemAssemblies>false</MergeSystemAssemblies>
<RuntimeIdentifier>win</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNetZip" Version="1.14.0" />
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
<PackageReference Include="Xamarin.Messaging.Build.Client" Version="$(MessagingVersion)" IncludeAssets="contentFiles" />
<PackageReference Include="Xamarin.Messaging.Core" Version="$(MessagingVersion)" IncludeAssets="build" />
<PackageReference Include="Xamarin.Messaging.Server" Version="$(MessagingVersion)" IncludeAssets="contentFiles" />
<PackageReference Include="Xamarin.iOS.HotRestart.Client" Version="$(HotRestartVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Messaging\Xamarin.Messaging.Build\Xamarin.Messaging.Build.csproj">
@ -17,6 +20,7 @@
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
<IsAgent>True</IsAgent>
</ProjectReference>
<ProjectReference Include="..\..\external\Xamarin.MacDev\Xamarin.MacDev\Xamarin.MacDev.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="*.props">
@ -25,6 +29,10 @@
<None Include="*.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\external\macios-binaries\HotRestart\Xamarin.PreBuilt.iOS.app.zip">
<Link>Xamarin.PreBuilt.iOS.app.zip</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="Tasks\" />
@ -47,18 +55,16 @@
<Target Name="CopyRuntimeAssemblies" BeforeTargets="ILRepack">
<ItemGroup>
<ReferenceCopyLocalToRemove Include="@(ReferenceCopyLocalPaths)" Condition="'%(FileName)' == 'System.Text.Encoding.CodePages'" />
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalToRemove)" />
<ReferencePathToRemove Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Text.Encoding.CodePages'" />
<ReferencePath Remove="@(ReferencePathToRemove)" />
<ReferencePathToAdd Include="@(RuntimeTargetsCopyLocalItems)" Condition="'%(RuntimeIdentifier)' == 'win' And '%(FileName)' == 'System.Text.Encoding.CodePages'" />
<ReferencePath Include="@(ReferencePathToAdd)">
<DestinationSubDirectory />
</ReferencePath>
<ReferenceToPreserve Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Diagnostics.Tracer'" />
<ReferenceToPreserve Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Security.Cryptography.ProtectedData'" />
<ReferenceToPreserve Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Security.Cryptography.Pkcs'" />
</ItemGroup>
</Target>
</Project>

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

@ -27,5 +27,5 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved.
<RemoveDir SessionId="$(BuildSessionId)" Condition="'$(MtouchTargetsEnabled)' == 'true'" Directories="$(OutputPath);$(IntermediateOutputPath)" RemoveAppDir="$(RemoveAppDir)" ContinueOnError="true" />
</Target>
<Import Project="$(MSBuildThisFileDirectory)Xamarin.iOS.Local.targets" Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.iOS.Local.targets')" />
<Import Project="$(MSBuildThisFileDirectory)Xamarin.iOS.HotRestart.targets" Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.iOS.HotRestart.targets')" />
</Project>

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

@ -2694,6 +2694,70 @@ namespace Xamarin.BindingMethods.Generator
}
);
data.Add (
new FunctionData {
Comment = " // IntPtr func (IntPtr, Quaternion)",
Prefix = "simd__",
Variants = Variants.All,
ReturnType = Types.IntPtr,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.IntPtr },
new ParameterData { TypeData = Types.QuatF }
},
}
);
data.Add (
new FunctionData {
Comment = " // IntPtr func (IntPtr, Quaternion, IntPtr)",
Prefix = "simd__",
Variants = Variants.All,
ReturnType = Types.IntPtr,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.IntPtr },
new ParameterData { TypeData = Types.QuatF },
new ParameterData { TypeData = Types.IntPtr }
},
}
);
data.Add (
new FunctionData {
Comment = " // IntPtr func (Vector2D, IntPtr)",
Prefix = "simd__",
Variants = Variants.All,
ReturnType = Types.IntPtr,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.Vector2d},
new ParameterData { TypeData = Types.IntPtr }
},
}
);
data.Add (
new FunctionData {
Comment = " // IntPtr func (Vector2D, int)",
Prefix = "simd__",
Variants = Variants.All,
ReturnType = Types.IntPtr,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.Vector2d },
new ParameterData { TypeData = Types.NInt }
},
}
);
data.Add (
new FunctionData {
Comment = " // void func (Vector2D)",
Prefix = "simd__",
Variants = Variants.msgSend | Variants.msgSendSuper,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.Vector2d },
},
}
);
// We must expand functions with native types to their actual type as well.
for (int i = data.Count - 1; i >= 0; i--) {
if (!data [i].HasNativeType)

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

@ -80,10 +80,15 @@ bool xamarin_is_gc_coop = false;
#endif
enum MarshalObjectiveCExceptionMode xamarin_marshal_objectivec_exception_mode = MarshalObjectiveCExceptionModeDefault;
enum MarshalManagedExceptionMode xamarin_marshal_managed_exception_mode = MarshalManagedExceptionModeDefault;
enum XamarinTriState xamarin_log_exceptions = XamarinTriStateNone;
enum XamarinLaunchMode xamarin_launch_mode = XamarinLaunchModeApp;
bool xamarin_supports_dynamic_registration = true;
const char *xamarin_runtime_configuration_name = NULL;
const char *xamarin_mono_native_lib_name = "__Internal";
#if DOTNET
enum XamarinNativeLinkMode xamarin_libmono_native_link_mode = XamarinNativeLinkModeStaticObject;
const char **xamarin_runtime_libraries = NULL;
#endif
/* Callbacks */
@ -2149,6 +2154,34 @@ xamarin_skip_encoding_flags (const char *encoding)
}
}
bool
xamarin_log_marshalled_exceptions ()
{
if (xamarin_log_exceptions == XamarinTriStateNone) {
const char *var = getenv ("XAMARIN_LOG_MARSHALLED_EXCEPTIONS");
xamarin_log_exceptions = (var && *var) ? XamarinTriStateEnabled : XamarinTriStateDisabled;
}
return xamarin_log_exceptions == XamarinTriStateEnabled;
}
void
xamarin_log_managed_exception (GCHandle handle, MarshalManagedExceptionMode mode)
{
if (!xamarin_log_marshalled_exceptions ())
return;
NSLog (@PRODUCT ": Processing managed exception for exception marshalling (mode: %i):\n%@", mode, xamarin_print_all_exceptions (handle));
}
void
xamarin_log_objectivec_exception (NSException *exception, MarshalObjectiveCExceptionMode mode)
{
if (!xamarin_log_marshalled_exceptions ())
return;
NSLog (@PRODUCT ": Processing Objective-C exception for exception marshalling (mode: %i):\n%@", mode, [exception debugDescription]);
}
void
xamarin_process_nsexception (NSException *ns_exception)
{
@ -2174,6 +2207,8 @@ xamarin_process_nsexception_using_mode (NSException *ns_exception, bool throwMan
if (mode == MarshalObjectiveCExceptionModeDefault)
mode = xamarin_is_gc_coop ? MarshalObjectiveCExceptionModeThrowManagedException : MarshalObjectiveCExceptionModeUnwindManagedCode;
xamarin_log_objectivec_exception (ns_exception, mode);
switch (mode) {
case MarshalObjectiveCExceptionModeUnwindManagedCode:
if (xamarin_is_gc_coop)
@ -2247,6 +2282,8 @@ xamarin_process_managed_exception (MonoObject *exception)
#endif
}
xamarin_log_managed_exception (handle, mode);
switch (mode) {
#if !defined (CORECLR_RUNTIME) // CoreCLR won't unwind through native frames, so we'll have to abort (in the default case statement)
case MarshalManagedExceptionModeDisable:
@ -2450,6 +2487,39 @@ xamarin_compute_trusted_platform_assemblies ()
return rv;
}
char *
xamarin_compute_native_dll_search_directories ()
{
const char *bundle_path = xamarin_get_bundle_path ();
NSMutableArray<NSString *> *directories = [NSMutableArray array];
// Native libraries might be in the app bundle
[directories addObject: [NSString stringWithUTF8String: bundle_path]];
// They won't be in the runtimeidentifier-specific directory (because they get lipo'ed into a fat file instead)
// However, might also be in the Resources/lib directory
[directories addObject: [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: @"lib"]];
// Missing:
// * The parent app bundle if launched from an app extension. This requires adding app extension tests, which we currently don't have.
// Remove the ones that don't exist
NSFileManager *manager = [NSFileManager defaultManager];
for (int i = (int) [directories count] - 1; i >= 0; i--) {
NSString *dir = [directories objectAtIndex: (NSUInteger) i];
BOOL isDirectory;
if ([manager fileExistsAtPath: dir isDirectory: &isDirectory] && isDirectory)
continue;
[directories removeObjectAtIndex: (NSUInteger) i];
}
// Join them all together with a colon separating them
NSString *joined = [directories componentsJoinedByString: @":"];
char *rv = xamarin_strdup_printf ("%s", [joined UTF8String]);
return rv;
}
void
xamarin_vm_initialize ()
{
@ -2464,6 +2534,7 @@ xamarin_vm_initialize ()
}
char *trusted_platform_assemblies = xamarin_compute_trusted_platform_assemblies ();
char *native_dll_search_directories = xamarin_compute_native_dll_search_directories ();
// All the properties we pass here must also be listed in the _RuntimeConfigReservedProperties item group
// for the _CreateRuntimeConfiguration target in dotnet/targets/Xamarin.Shared.Sdk.targets.
@ -2472,12 +2543,14 @@ xamarin_vm_initialize ()
"PINVOKE_OVERRIDE",
"ICU_DAT_FILE_PATH",
"TRUSTED_PLATFORM_ASSEMBLIES",
"NATIVE_DLL_SEARCH_DIRECTORIES",
};
const char *propertyValues[] = {
xamarin_get_bundle_path (),
pinvokeOverride,
icu_dat_file_path,
trusted_platform_assemblies,
native_dll_search_directories,
};
static_assert (sizeof (propertyKeys) == sizeof (propertyValues), "The number of keys and values must be the same.");
@ -2486,36 +2559,34 @@ xamarin_vm_initialize ()
xamarin_free (pinvokeOverride);
xamarin_free (trusted_platform_assemblies);
xamarin_free (native_dll_search_directories);
if (!rv)
xamarin_assertion_message ("Failed to initialize the VM");
}
static bool
xamarin_is_native_library (const char *libraryName)
{
if (xamarin_runtime_libraries == NULL)
return false;
for (int i = 0; xamarin_runtime_libraries [i] != NULL; i++) {
if (!strcmp (xamarin_runtime_libraries [i], libraryName))
return true;
}
return false;
}
void*
xamarin_pinvoke_override (const char *libraryName, const char *entrypointName)
{
void* symbol = NULL;
#if TARGET_OS_MACCATALYST
static void *monoNativeLibrary = NULL;
#endif
if (!strcmp (libraryName, "__Internal")) {
symbol = dlsym (RTLD_DEFAULT, entrypointName);
#if TARGET_OS_MACCATALYST
} else if (!strcmp (libraryName, "libSystem.Native") ||
!strcmp (libraryName, "libSystem.Security.Cryptography.Native.Apple") ||
!strcmp (libraryName, "libSystem.Net.Security.Native")) {
if (monoNativeLibrary == NULL) {
if (xamarin_mono_native_lib_name == NULL || !strcmp (xamarin_mono_native_lib_name, "__Internal")) {
monoNativeLibrary = RTLD_DEFAULT;
} else {
monoNativeLibrary = dlopen (xamarin_mono_native_lib_name, RTLD_LAZY);
}
}
symbol = dlsym (monoNativeLibrary, entrypointName);
#endif // TARGET_OS_MACCATALYST
#if !defined (CORECLR_RUNTIME) // we're intercepting objc_msgSend calls using the managed System.Runtime.InteropServices.ObjectiveC.Bridge.SetMessageSendCallback instead.
#if defined (__i386__) || defined (__x86_64__) || defined (__arm64__)
} else if (!strcmp (libraryName, "/usr/lib/libobjc.dylib")) {
@ -2536,6 +2607,21 @@ xamarin_pinvoke_override (const char *libraryName, const char *entrypointName)
}
#endif // defined (__i386__) || defined (__x86_64__) || defined (__arm64__)
#endif // !defined (CORECLR_RUNTIME)
} else if (xamarin_is_native_library (libraryName)) {
switch (xamarin_libmono_native_link_mode) {
case XamarinNativeLinkModeStaticObject:
// lookup the symbol in loaded memory, like __Internal does.
symbol = dlsym (RTLD_DEFAULT, entrypointName);
break;
case XamarinNativeLinkModeDynamicLibrary:
// if we're not linking statically, then don't do anything at all, let mono handle whatever needs to be done
return NULL;
case XamarinNativeLinkModeFramework:
default:
// handle this as "DynamicLibrary" for now - do nothing.
LOG (PRODUCT ": Unhandled libmono link mode: %i when looking up %s in %s", xamarin_libmono_native_link_mode, entrypointName, libraryName);
return NULL;
}
} else {
return NULL;
}

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

@ -83,6 +83,19 @@ enum XamarinExceptionTypes : int {
XamarinExceptionTypes_System_OutOfMemoryException,
};
// Keep in sync with AssemblyBuildTarget in AssemblyBuildTarget.cs
enum XamarinNativeLinkMode : int {
XamarinNativeLinkModeStaticObject,
XamarinNativeLinkModeDynamicLibrary,
XamarinNativeLinkModeFramework,
};
enum XamarinTriState : int {
XamarinTriStateNone,
XamarinTriStateEnabled,
XamarinTriStateDisabled,
};
extern bool mono_use_llvm; // this is defined inside mono
#if DEBUG
@ -109,7 +122,8 @@ extern enum MarshalManagedExceptionMode xamarin_marshal_managed_exception_mode;
extern enum XamarinLaunchMode xamarin_launch_mode;
extern bool xamarin_supports_dynamic_registration;
extern const char *xamarin_runtime_configuration_name;
extern const char *xamarin_mono_native_lib_name;
extern enum XamarinNativeLinkMode xamarin_libmono_native_link_mode;
extern const char** xamarin_runtime_libraries;
typedef void (*xamarin_setup_callback) ();
typedef int (*xamarin_extension_main_callback) (int argc, char** argv);

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

@ -258,6 +258,9 @@ MonoException * xamarin_create_system_exception (const char *message);
MonoException * xamarin_create_system_invalid_cast_exception (const char *message);
MonoException * xamarin_create_system_entry_point_not_found_exception (const char *entrypoint);
NSString * xamarin_print_all_exceptions (GCHandle handle);
bool xamarin_log_marshalled_exceptions ();
void xamarin_log_managed_exception (GCHandle handle, MarshalManagedExceptionMode mode);
void xamarin_log_objectivec_exception (NSException *exception, MarshalObjectiveCExceptionMode mode);
id xamarin_invoke_objc_method_implementation (id self, SEL sel, IMP xamarin_impl);
MonoType * xamarin_get_nsnumber_type ();

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

@ -0,0 +1,55 @@
//
// PublicPrivateKeyAuthentication.cs
//
// Authors:
// TJ Lambert <antlambe@microsoft.com>
//
// Copyright 2021 Microsoft Corporation
//
#if !TVOS && !WATCH
using System;
using System.Runtime.InteropServices;
using CoreGraphics;
using Foundation;
using ObjCRuntime;
using System.Linq;
#nullable enable
namespace AuthenticationServices {
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
public static class PublicPrivateKeyAuthentication {
[DllImport (Constants.AuthenticationServicesLibrary)]
static extern /* NSString[] */ IntPtr ASAuthorizationAllSupportedPublicKeyCredentialDescriptorTransports ();
public static ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport[]? GetAllSupportedPublicKeyCredentialDescriptorTransports () {
NSString[]? nsStringArray = NSArray.ArrayFromHandle<NSString> (ASAuthorizationAllSupportedPublicKeyCredentialDescriptorTransports ());
if (nsStringArray == null)
return null;
ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport[] asArray = new ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport[nsStringArray.Count ()];
for (var i = 0; i < nsStringArray.Count (); i++) {
switch (nsStringArray[i].Description){
case "usb":
asArray[i] = ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport.Usb;
break;
case "nfc":
asArray[i] = ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport.Nfc;
break;
case "ble":
asArray[i] = ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport.Bluetooth;
break;
default:
break;
}
}
return asArray;
}
}
}
#endif

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

@ -0,0 +1,25 @@
#if MONOMAC
using System;
using System.Runtime.InteropServices;
using ObjCRuntime;
namespace FileProvider {
[NoiOS, NoMacCatalyst, Mac (12,0)]
[StructLayout (LayoutKind.Sequential)]
public struct NSFileProviderTypeAndCreator
{
public uint Type;
public uint Creator;
#if !COREBUILD
public string GetTypeAsFourCC ()
=> Runtime.ToFourCCString (Type);
public string GetCreatorAsFourCC()
=> Runtime.ToFourCCString (Creator);
#endif
}
}
#endif

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

@ -1,10 +1,13 @@
#if !MONOMAC
using System;
using System.Text;
#nullable enable
namespace Foundation {
public class MonoTouchException : Exception {
private NSException native_exc;
NSException? native_exc;
public MonoTouchException () : base () {
native_exc = new NSException ("default", String.Empty, null);
@ -14,49 +17,51 @@ namespace Foundation {
native_exc = exc;
}
public NSException NSException {
public NSException? NSException {
get {
return native_exc;
}
}
public string Reason {
public string? Reason {
get {
return native_exc.Reason;
return native_exc?.Reason;
}
}
public string Name {
public string? Name {
get {
return native_exc.Name;
return native_exc?.Name;
}
}
public override string Message {
get {
return string.Format ("Objective-C exception thrown. Name: {0} Reason: {1}\nNative stack trace:\n{2}", Name, Reason, NativeStackTrace);
var sb = new StringBuilder ("Objective-C exception thrown. Name: ").Append (Name);
sb.Append (" Reason: ").AppendLine (Reason);
sb.AppendLine ("Native stack trace:");
AppendNativeStackTrace (sb);
return sb.ToString ();
}
}
string NativeStackTrace {
get {
var symbols = native_exc.CallStackSymbols;
var msg = string.Empty;
for (int i = 0; i < symbols.Length; i++) {
msg += "\t" + symbols [i] + "\n";
}
return msg;
void AppendNativeStackTrace (StringBuilder sb)
{
if (native_exc is not null) {
foreach (var symbol in native_exc.CallStackSymbols)
sb.Append ('\t').AppendLine (symbol);
}
}
public override string ToString ()
{
var msg = base.ToString ();
if (native_exc is null)
return msg;
if (native_exc != null)
msg += NativeStackTrace;
return msg;
var sb = new StringBuilder (msg);
AppendNativeStackTrace (sb);
return sb.ToString ();
}
}
}

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

@ -6,6 +6,7 @@ namespace HomeKit {
[iOS (8,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMError : long {
UnexpectedError = -1,
@ -115,12 +116,15 @@ namespace HomeKit {
TimedOutWaitingForAccessory = 100,
AccessoryCommunicationFailure = 101,
FailedToJoinNetwork = 102,
// iOS 15
AccessoryIsSuspended = 103,
}
// conveniance enum (ObjC uses NSString)
[iOS (8,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
public enum HMCharacteristicType {
None,
@ -637,6 +641,7 @@ namespace HomeKit {
// conveniance enum (ObjC uses NSString)
[iOS (8,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Flags]
public enum HMServiceType {
None,
@ -828,6 +833,7 @@ namespace HomeKit {
[iOS (8,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueDoorState : long {
Open = 0,
@ -839,6 +845,7 @@ namespace HomeKit {
[iOS (8,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueHeatingCooling : long {
Off = 0,
@ -849,6 +856,7 @@ namespace HomeKit {
[iOS (8,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueRotationDirection : long {
Clockwise = 0,
@ -857,6 +865,7 @@ namespace HomeKit {
[iOS (8,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueTemperatureUnit : long {
Celsius = 0,
@ -865,6 +874,7 @@ namespace HomeKit {
[iOS (8,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueLockMechanismState : long {
Unsecured = 0,
@ -875,6 +885,7 @@ namespace HomeKit {
[iOS (8,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
// in iOS 8.3 this was renamed HMCharacteristicValueLockMechanismLastKnownAction but that would be a breaking change for us
public enum HMCharacteristicValueLockMechanism : long {
@ -893,6 +904,7 @@ namespace HomeKit {
[iOS (9,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueAirParticulate : long {
Size2_5 = 0,
@ -901,6 +913,7 @@ namespace HomeKit {
[iOS (9,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueCurrentSecuritySystemState : long {
StayArm = 0,
@ -912,6 +925,7 @@ namespace HomeKit {
[iOS (9,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValuePositionState : long {
Closing = 0,
@ -921,6 +935,7 @@ namespace HomeKit {
[iOS (9,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueTargetSecuritySystemState : long {
StayArm = 0,
@ -929,42 +944,42 @@ namespace HomeKit {
Disarm
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueBatteryStatus : long {
Normal = 0,
Low
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueJammedStatus : long {
None = 0,
Jammed
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueTamperedStatus : long {
None = 0,
Tampered
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueLeakStatus : long {
None = 0,
Detected
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueSmokeDetectionStatus : long {
None = 0,
Detected
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueChargingState : long {
None = 0,
@ -973,42 +988,42 @@ namespace HomeKit {
NotChargeable,
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueContactState : long {
Detected = 0,
None,
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueStatusFault : long {
NoFault = 0,
GeneralFault
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueCarbonMonoxideDetectionStatus : long {
NotDetected = 0,
Detected
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueCarbonDioxideDetectionStatus : long {
NotDetected = 0,
Detected
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueOccupancyStatus : long {
NotOccupied = 0,
Occupied
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueSecuritySystemAlarmType : long {
NoAlarm = 0,
@ -1031,6 +1046,7 @@ namespace HomeKit {
[iOS (9,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
// conveniance enum (ObjC uses NSString)
public enum HMAccessoryCategoryType {
[Field ("HMAccessoryCategoryTypeOther")]
@ -1135,6 +1151,7 @@ namespace HomeKit {
[iOS (9,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
public enum HMSignificantEvent {
[Field ("HMSignificantEventSunrise")]
@ -1144,7 +1161,7 @@ namespace HomeKit {
Sunset,
}
[iOS (13,0), TV (13,0), Watch (6,0), NoMac]
[iOS (13,0), TV (13,0), Watch (6,0), NoMac, MacCatalyst (14,0)]
[Flags]
[Native]
public enum HMHomeManagerAuthorizationStatus : ulong {
@ -1155,6 +1172,7 @@ namespace HomeKit {
[iOS (9,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueAirQuality : long {
Unknown = 0,
@ -1167,6 +1185,7 @@ namespace HomeKit {
[iOS (10,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCameraStreamState : ulong
{
@ -1178,6 +1197,7 @@ namespace HomeKit {
[iOS (10,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[Native]
public enum HMCameraAudioStreamSetting : ulong
{
@ -1187,7 +1207,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueLockPhysicalControlsState : long {
NotLocked = 0,
@ -1195,7 +1215,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueCurrentAirPurifierState : long {
Inactive = 0,
@ -1204,7 +1224,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueTargetAirPurifierState : long {
Manual = 0,
@ -1212,7 +1232,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueCurrentSlatState : long {
Stationary = 0,
@ -1221,7 +1241,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueSlatType : long {
Horizontal = 0,
@ -1229,7 +1249,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueFilterChange : long {
NotNeeded = 0,
@ -1237,7 +1257,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueCurrentFanState : long {
Inactive = 0,
@ -1246,7 +1266,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueTargetFanState : long {
Manual = 0,
@ -1254,7 +1274,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueCurrentHeaterCoolerState : long {
Inactive = 0,
@ -1264,7 +1284,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueTargetHeaterCoolerState : long {
Automatic = 0,
@ -1273,7 +1293,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueCurrentHumidifierDehumidifierState : long {
Inactive = 0,
@ -1283,7 +1303,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueTargetHumidifierDehumidifierState : long {
Automatic = 0,
@ -1292,7 +1312,7 @@ namespace HomeKit {
}
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[TV (10,1), iOS (10,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueSwingMode : long {
Disabled = 0,
@ -1301,13 +1321,14 @@ namespace HomeKit {
[Watch (3,1,1)]
[TV (10,1), iOS (10,2)]
[MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueActivationState : long {
Inactive = 0,
Active,
}
[Watch (3,2), TV (10,2), iOS (10,3)]
[Watch (3,2), TV (10,2), iOS (10,3), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueInputEvent : long {
SinglePress = 0,
@ -1315,14 +1336,14 @@ namespace HomeKit {
LongPress,
}
[Watch (3,2), TV (10,2), iOS (10,3)]
[Watch (3,2), TV (10,2), iOS (10,3), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueLabelNamespace : long {
Dot = 0,
Numeral,
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[Native]
public enum HMEventTriggerActivationState : ulong {
Disabled = 0,
@ -1332,7 +1353,7 @@ namespace HomeKit {
Enabled = 4,
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[Native]
public enum HMHomeHubState : ulong {
NotAvailable = 0,
@ -1340,7 +1361,7 @@ namespace HomeKit {
Disconnected,
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[Native]
public enum HMPresenceEventType : ulong {
EveryEntry = 1,
@ -1351,7 +1372,7 @@ namespace HomeKit {
NotAtHome = LastExit,
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[Native]
public enum HMPresenceEventUserType : ulong {
CurrentUser = 1,
@ -1359,7 +1380,7 @@ namespace HomeKit {
CustomUsers = 3,
}
[Watch (4,2), TV (11,2), iOS (11,2)]
[Watch (4,2), TV (11,2), iOS (11,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueProgramMode : long {
NotScheduled = 0,
@ -1367,14 +1388,14 @@ namespace HomeKit {
ScheduleOverriddenToManual,
}
[Watch (4,2), TV (11,2), iOS (11,2)]
[Watch (4,2), TV (11,2), iOS (11,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueUsageState : long {
NotInUse = 0,
InUse,
}
[Watch (4,2), TV (11,2), iOS (11,2)]
[Watch (4,2), TV (11,2), iOS (11,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueValveType : long {
GenericValve = 0,
@ -1383,7 +1404,7 @@ namespace HomeKit {
WaterFaucet,
}
[Watch (4,2), TV (11,2), iOS (11,2)]
[Watch (4,2), TV (11,2), iOS (11,2), MacCatalyst (14,0)]
[Native]
public enum HMCharacteristicValueConfigurationState : long {
NotConfigured = 0,

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

@ -51,6 +51,7 @@ namespace LocalAuthentication {
WatchNotAvailable = -11,
BiometryNotPaired = -12,
BiometryDisconnected = -13,
InvalidDimension = -14,
BiometryNotAvailable = TouchIDNotAvailable,
BiometryNotEnrolled = TouchIDNotEnrolled,

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

@ -235,4 +235,24 @@ namespace MLCompute {
return CFString.FromHandle (MLCComparisonOperationDebugDescription (self));
}
}
#if NET
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("tvos15.0")]
[SupportedOSPlatform ("macos12.0")]
[SupportedOSPlatform ("maccatalyst15.0")]
#else
[NoWatch]
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
#endif
public static class MLCGradientClippingTypeExtensions {
[DllImport (Constants.MLComputeLibrary)]
static extern /* NSString */ IntPtr MLCGradientClippingTypeDebugDescription (MLCGradientClippingType gradientClippingType);
public static string GetDebugDescription (this MLCGradientClippingType self)
{
return CFString.FromHandle (MLCGradientClippingTypeDebugDescription (self));
}
}
}

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

@ -1403,7 +1403,7 @@ $(PROJECT_DIR)/MonoTouch.NUnitLite.maccatalyst.csproj: MonoTouch.NUnitLite.macca
GENERATE_TYPE_FORWARDERS=generate-type-forwarders/bin/Debug/generate-type-forwarders.exe
$(GENERATE_TYPE_FORWARDERS): $(wildcard generate-type-forwarders/*.cs*) Makefile
$(Q) $(SYSTEM_MSBUILD) /r generate-type-forwarders/generate-type-forwarders.csproj $(MSBUILD_VERBOSITY)
$(Q) $(SYSTEM_MSBUILD) "/bl:$@.binlog" /r generate-type-forwarders/generate-type-forwarders.csproj $(MSBUILD_VERBOSITY)
$(MACCATALYST_BUILD_DIR)/reference/Xamarin.iOS.cs: $(MACCATALYST_BUILD_DIR)/reference/Xamarin.MacCatalyst.dll $(IOS_BUILD_DIR)/reference/Xamarin.iOS.dll Makefile $(GENERATE_TYPE_FORWARDERS)
$(Q) mono $(GENERATE_TYPE_FORWARDERS) $(abspath $(IOS_BUILD_DIR)/reference/Xamarin.iOS.dll) $(abspath $(MACCATALYST_BUILD_DIR)/reference/Xamarin.MacCatalyst.dll) $(abspath $@.tmp) $(MIN_MACCATALYST_SDK_VERSION)
@ -1604,7 +1604,7 @@ $(DOTNET_COMPILER): Makefile $(TOP)/Make.config | $(DOTNET_BUILD_DIR)
GENERATE_FRAMEWORKS_CONSTANTS=generate-frameworks-constants/bin/Debug/generate-frameworks-constants.exe
$(GENERATE_FRAMEWORKS_CONSTANTS): $(wildcard generate-frameworks-constants/*.cs*) $(TOP)/tools/common/Frameworks.cs Makefile
$(Q) $(SYSTEM_MSBUILD) /r generate-frameworks-constants/generate-frameworks-constants.csproj $(MSBUILD_VERBOSITY)
$(Q) $(SYSTEM_MSBUILD) "/bl:$@.binlog" /r generate-frameworks-constants/generate-frameworks-constants.csproj $(MSBUILD_VERBOSITY)
# This rule means: generate a Constants.<platform>.generated.cs for the frameworks in the variable <PLATFORM>_FRAMEWORKS
$(BUILD_DIR)/Constants.%.generated.cs: Makefile $(GENERATE_FRAMEWORKS_CONSTANTS) | $(BUILD_DIR)

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

@ -11,7 +11,7 @@ $(BUILD_DIR)/generator.csproj: generator.csproj | $(BUILD_DIR)
-include $(BUILD_DIR)/generator.csproj.inc
$(BUILD_DIR)/common/bgen.exe: $(generator_dependencies) Makefile.generator $(BUILD_DIR)/generator-frameworks.g.cs
$(Q_GEN) $(SYSTEM_MSBUILD) $(XBUILD_VERBOSITY) /p:Configuration=Debug generator.csproj /p:IntermediateOutputPath=$(BUILD_DIR)/IDE/obj/common/ /p:OutputPath=$(BUILD_DIR)/common /restore
$(Q_GEN) $(SYSTEM_MSBUILD) "/bl:$@.binlog" $(XBUILD_VERBOSITY) /p:Configuration=Debug generator.csproj /p:IntermediateOutputPath=$(BUILD_DIR)/IDE/obj/common/ /p:OutputPath=$(BUILD_DIR)/common /restore
$(DOTNET_BUILD_DIR)/bgen/bgen: $(generator_dependencies) Makefile.generator $(BUILD_DIR)/generator-frameworks.g.cs global.json | $(DOTNET_BUILD_DIR)/bgen
$(Q_DOTNET_BUILD) $(DOTNET6) publish bgen/bgen.csproj $(DOTNET_BUILD_VERBOSITY) /p:Configuration=Debug /p:IntermediateOutputPath=$(abspath $(DOTNET_BUILD_DIR)/IDE/obj/common/bgen)/ /p:OutputPath=$(abspath $(DOTNET_BUILD_DIR)/IDE/bin/common/bgen/)/

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

@ -1,4 +1,3 @@
#if IOS
using System;
using CoreFoundation;
@ -9,11 +8,10 @@ namespace MetricKit {
public partial class MXMetricManager {
public static OSLog MakeLogHandle (NSString category)
public static CoreFoundation.OSLog MakeLogHandle (NSString category)
{
var ptr = _MakeLogHandle (category);
return new OSLog (ptr, owns: true);
return new CoreFoundation.OSLog (ptr, owns: true);
}
}
}
#endif

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

@ -114,7 +114,9 @@ namespace ModelIO {
public enum MDLMeshBufferType : ulong
{
Vertex = 1,
Index = 2
Index = 2,
[iOS (15,0), TV (15,0), Mac (12,0), MacCatalyst (15,0)]
Custom = 3,
}
[Native]
@ -177,7 +179,9 @@ namespace ModelIO {
Float2,
Float3,
Float4,
Matrix44
Matrix44,
[iOS (15,0), TV (15,0), Mac (12,0), MacCatalyst (15,0)]
Buffer,
}
[Native]

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

@ -508,7 +508,7 @@ namespace ObjCRuntime {
{
if (isInnerException)
sb.AppendLine (" --- inner exception ---");
sb.AppendLine ($"{exc.Message} ({exc.GetType ().FullName})");
sb.Append (exc.Message).Append (" (").Append (exc.GetType ().FullName).AppendLine (")");
var trace = exc.StackTrace;
if (!string.IsNullOrEmpty (trace))
sb.AppendLine (trace);
@ -526,7 +526,7 @@ namespace ObjCRuntime {
exc = exc.InnerException;
} while (counter < 10 && exc != null);
} catch (Exception exception) {
str.Append ($"Failed to print exception: {exception}");
str.Append ("Failed to print exception: ").Append (exception);
}
return Marshal.StringToHGlobalAuto (str.ToString ());
@ -560,8 +560,8 @@ namespace ObjCRuntime {
// This method will register all assemblies referenced by the entry assembly.
// For XM it will also register all assemblies loaded in the current appdomain.
//
// NOTE: the (XI) linker remove this method for device builds (RemoveCode.cs) and as such cannot be renamed
// without updating mtouch
// NOTE: the linker will remove this method when the dynamic registrar has been optimized away (RemoveCode.cs)
// and as such cannot be renamed without updating the linker
internal static void RegisterEntryAssembly (Assembly entry_assembly)
{
var assemblies = new List<Assembly> ();

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

@ -26,6 +26,8 @@ using System;
using System.Runtime.InteropServices;
using Foundation;
#nullable enable
namespace ObjCRuntime {
public partial class Selector : IEquatable<Selector>, INativeObject {
internal const string Alloc = "alloc";
@ -89,12 +91,14 @@ namespace ObjCRuntime {
return left.handle == right.handle;
}
public override bool Equals (object right) {
public override bool Equals (object? right)
{
return Equals (right as Selector);
}
public bool Equals (Selector right) {
if (right == null)
public bool Equals (Selector? right)
{
if (right is null)
return false;
return handle == right.handle;
@ -107,12 +111,12 @@ namespace ObjCRuntime {
internal static string GetName (IntPtr handle)
{
return Marshal.PtrToStringAuto (sel_getName (handle));
return Marshal.PtrToStringAuto (sel_getName (handle))!;
}
// return null, instead of throwing, if an invalid pointer is used (e.g. IntPtr.Zero)
// so this looks better in the debugger watch when no selector is assigned (ref: #10876)
public static Selector FromHandle (IntPtr sel)
public static Selector? FromHandle (IntPtr sel)
{
if (!sel_isMapped (sel))
return null;

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

@ -174,6 +174,8 @@ namespace PassKit {
Contribute = 14,
[iOS (14,0)]
Tip = 15,
[Mac (12,0), iOS (15,0), Watch (8,0)]
Continue = 16,
}
[Mac (11,0)]
@ -221,7 +223,8 @@ namespace PassKit {
Debit,
Credit,
Prepaid,
Store
Store,
EMoney,
}
[Mac (11,0)]
@ -252,6 +255,8 @@ namespace PassKit {
ShippingContactInvalid = 1,
BillingContactInvalid,
ShippingAddressUnserviceable,
CouponCodeInvalid,
CouponCodeExpired,
}
[iOS (12,0)]

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

@ -283,7 +283,7 @@ namespace SceneKit {
None,
Multisampling2X,
Multisampling4X,
#if MONOMAC
#if MONOMAC || __MACCATALYST__
Multisampling8X,
Multisampling16X,
#endif

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

@ -530,7 +530,6 @@ namespace Security {
}
}
#if !COREBUILD
public partial class SecKey : INativeObject, IDisposable {
internal IntPtr handle;
@ -548,6 +547,7 @@ namespace Security {
CFObject.CFRetain (handle);
}
#if !COREBUILD
[DllImport (Constants.SecurityLibrary, EntryPoint="SecKeyGetTypeID")]
public extern static nint GetTypeID ();
@ -1038,6 +1038,7 @@ namespace Security {
return GetKeyExchangeResult (algorithm, publicKey, parameters?.Dictionary, out error);
}
#endif
~SecKey ()
{
Dispose (false);
@ -1063,5 +1064,4 @@ namespace Security {
}
}
}
#endif
}

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

@ -1845,6 +1845,7 @@ namespace AppKit {
void EditItemAtIndexPath (NSIndexPath indexPath, NSEvent theEvent, bool select);
//Detected properties
[NullAllowed]
[Export ("doubleAction")]
Selector DoubleAction { get; set; }
@ -5186,9 +5187,11 @@ namespace AppKit {
[Export ("initWithDrawSelector:delegate:")]
IntPtr Constructor (Selector drawSelectorMethod, NSObject delegateObject);
[NullAllowed]
[Export ("drawSelector")]
Selector DrawSelector { get; }
[NullAllowed]
[Export ("delegate", ArgumentSemantic.Assign)]
NSObject Delegate { get; }
}
@ -7901,6 +7904,7 @@ namespace AppKit {
[Export ("target", ArgumentSemantic.Weak), NullAllowed]
NSObject Target { get; set; }
[NullAllowed]
[Export ("action")]
Selector Action { get; set; }
@ -10541,6 +10545,7 @@ namespace AppKit {
[Export ("drawsBackground")]
bool DrawsBackground { get; set; }
[NullAllowed]
[Export ("doubleAction")]
Selector DoubleAction { get; set; }
@ -11291,6 +11296,7 @@ namespace AppKit {
[Export ("mouseExited:withFrame:inView:")]
void MouseExited (NSEvent evt, CGRect frame, NSView view);
[NullAllowed]
[Export ("doubleAction")]
Selector DoubleAction { get; set; }
@ -11348,6 +11354,7 @@ namespace AppKit {
[Export ("setDraggingSourceOperationMask:forLocal:")]
void SetDraggingSource (NSDragOperation operationMask, bool isLocal);
[NullAllowed]
[Export ("doubleAction")]
Selector DoubleAction { get; set; }
@ -14793,6 +14800,7 @@ namespace AppKit {
//Detected properties
[Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")]
[NullAllowed]
[Export ("doubleAction")]
Selector DoubleAction { get; set; }
@ -16949,6 +16957,7 @@ namespace AppKit {
[Export ("rowHeight")]
nfloat RowHeight { get; set; }
[NullAllowed]
[Export ("doubleAction")]
Selector DoubleAction { get; set; }

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

@ -7,6 +7,7 @@
using System;
using Foundation;
using ObjCRuntime;
using Security;
#if MONOMAC
using AppKit;
using UIControl = AppKit.NSControl;
@ -382,6 +383,10 @@ namespace AuthenticationServices {
[Export ("authorizationController:didCompleteWithError:")]
void DidComplete (ASAuthorizationController controller, NSError error);
[TV (15,0), NoWatch, NoMac, NoiOS, NoMacCatalyst]
[Export ("authorizationController:didCompleteWithCustomMethod:")]
void DidComplete (ASAuthorizationController controller, NSString method);
}
interface IASAuthorizationControllerPresentationContextProviding { }
@ -420,6 +425,10 @@ namespace AuthenticationServices {
[Export ("performRequests")]
void PerformRequests ();
[TV (15,0), NoWatch, NoMac, NoiOS, NoMacCatalyst]
[Export ("customAuthorizationMethods", ArgumentSemantic.Copy)]
NSString[] CustomAuthorizationMethods { get; set; }
}
interface IASAuthorizationCredential { }
@ -437,6 +446,7 @@ namespace AuthenticationServices {
InvalidResponse = 1002,
NotHandled = 1003,
Failed = 1004,
NotInteractive = 1005,
}
[Watch (6, 0), TV (13, 0), Mac (10, 15), iOS (13, 0)]
@ -543,6 +553,10 @@ namespace AuthenticationServices {
[Export ("completeWithError:")]
void Complete (NSError error);
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("completeWithAuthorizationResult:")]
void Complete (ASAuthorizationProviderExtensionAuthorizationResult authorizationResult);
[Async]
[Export ("presentAuthorizationViewControllerWithCompletion:")]
void PresentAuthorizationViewController (Action<bool, NSError> completion);
@ -623,6 +637,10 @@ namespace AuthenticationServices {
[NullAllowed, Export ("authenticatedResponse", ArgumentSemantic.Copy)]
NSHttpUrlResponse AuthenticatedResponse { get; }
[Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("privateKeys")]
SecKey[] PrivateKeys { get; }
}
[NoWatch, NoTV, Mac (10,15), iOS (13,0)]
@ -651,6 +669,10 @@ namespace AuthenticationServices {
[Export ("authorizationOptions", ArgumentSemantic.Copy)]
NSUrlQueryItem[] AuthorizationOptions { get; set; }
[Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("userInterfaceEnabled")]
bool UserInterfaceEnabled { [Bind ("isUserInterfaceEnabled")] get; set; }
}
[TV (13,0), NoWatch, Mac (10,15), iOS (13,0)]
@ -930,4 +952,357 @@ namespace AuthenticationServices {
void CancelRequest ();
}
[iOS (15,0), Mac (12,0), MacCatalyst (15,0), NoWatch, NoTV]
[Static]
interface ASAuthorizationPublicKeyCredentialAttestationKind
{
[Field ("ASAuthorizationPublicKeyCredentialAttestationKindNone")]
NSString None { get; }
[Field ("ASAuthorizationPublicKeyCredentialAttestationKindDirect")]
NSString Direct { get; }
[Field ("ASAuthorizationPublicKeyCredentialAttestationKindIndirect")]
NSString Indirect { get; }
[Field ("ASAuthorizationPublicKeyCredentialAttestationKindEnterprise")]
NSString Enterprise { get; }
}
[iOS (15,0), Mac (12,0), MacCatalyst (15,0), NoWatch, NoTV]
[Static]
interface ASAuthorizationPublicKeyCredentialUserVerificationPreference
{
[Field ("ASAuthorizationPublicKeyCredentialUserVerificationPreferencePreferred")]
NSString Preferred { get; }
[Field ("ASAuthorizationPublicKeyCredentialUserVerificationPreferenceRequired")]
NSString Required { get; }
[Field ("ASAuthorizationPublicKeyCredentialUserVerificationPreferenceDiscouraged")]
NSString Discouraged { get; }
}
[iOS (15,0), Mac (12,0), MacCatalyst (15,0), NoWatch, NoTV]
enum ASAuthorizationPublicKeyCredentialResidentKeyPreference {
[Field ("ASAuthorizationPublicKeyCredentialResidentKeyPreferenceDiscouraged")]
Discouraged,
[Field ("ASAuthorizationPublicKeyCredentialResidentKeyPreferencePreferred")]
Preferred,
[Field ("ASAuthorizationPublicKeyCredentialResidentKeyPreferenceRequired")]
Required,
}
[iOS (15,0), Mac (12,0), MacCatalyst (15,0), NoWatch, NoTV]
enum ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport {
[Field ("ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransportUSB")]
Usb,
[Field ("ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransportNFC")]
Nfc,
[Field ("ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransportBluetooth")]
Bluetooth,
}
[Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoWatch, NoTV]
[Native]
enum ASCoseAlgorithmIdentifier : long {
ES256 = -7,
}
// Introduced in Xcode13 Beta3 but not used anywhere
// [Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoWatch, NoTV]
// [Native]
// enum AscoseEllipticCurveIdentifier : long {
// P256 = 1,
// }
interface IASAuthorizationPublicKeyCredentialAssertion { }
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV]
[Protocol]
interface ASAuthorizationPublicKeyCredentialAssertion : ASPublicKeyCredential
{
[Abstract]
[Export ("rawAuthenticatorData", ArgumentSemantic.Copy)]
NSData RawAuthenticatorData { get; }
[Abstract]
[Export ("userID", ArgumentSemantic.Copy)]
NSData UserId { get; }
[Abstract]
[Export ("signature", ArgumentSemantic.Copy)]
NSData Signature { get; }
}
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV]
[BaseType (typeof (ASAuthorizationRequest))]
[DisableDefaultCtor]
interface ASAuthorizationPlatformPublicKeyCredentialAssertionRequest : ASAuthorizationPublicKeyCredentialAssertionRequest
{
/* issues when overriding this property */
[Sealed]
[Export ("allowedCredentials", ArgumentSemantic.Copy)]
ASAuthorizationPlatformPublicKeyCredentialDescriptor[] PlatformAllowedCredentials { get; set; }
}
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (ASAuthorizationRequest))]
[DisableDefaultCtor]
interface ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest : ASAuthorizationPublicKeyCredentialAssertionRequest
{
/* issues when overriding this property */
[Sealed]
[Export ("allowedCredentials", ArgumentSemantic.Copy)]
ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor[] SecurityAllowedCredentials { get; set; }
}
interface IASAuthorizationPublicKeyCredentialAssertionRequest { }
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV]
[Protocol]
interface ASAuthorizationPublicKeyCredentialAssertionRequest : NSSecureCoding, NSCopying
{
[Abstract]
[Export ("challenge", ArgumentSemantic.Copy)]
NSData Challenge { get; set; }
[Abstract]
[Export ("relyingPartyIdentifier")]
string RelyingPartyIdentifier { get; set; }
[Abstract]
[Export ("allowedCredentials", ArgumentSemantic.Copy)]
IASAuthorizationPublicKeyCredentialDescriptor[] AllowedCredentials { get; set; }
[Abstract]
[Export ("userVerificationPreference")]
NSString UserVerificationPreference { get; set; }
}
interface IASAuthorizationPublicKeyCredentialDescriptor { }
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV]
[Protocol]
interface ASAuthorizationPublicKeyCredentialDescriptor : NSSecureCoding, NSCopying
{
[Abstract]
[Export ("credentialID", ArgumentSemantic.Copy)]
NSData CredentialId { get; set; }
}
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV]
[Protocol]
interface ASAuthorizationPublicKeyCredentialRegistration : ASPublicKeyCredential
{
[Abstract]
[NullAllowed, Export ("rawAttestationObject", ArgumentSemantic.Copy)]
NSData RawAttestationObject { get; }
}
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV]
[Protocol]
interface ASAuthorizationPublicKeyCredentialRegistrationRequest : NSSecureCoding, NSCopying
{
[Abstract]
[Export ("relyingPartyIdentifier")]
string RelyingPartyIdentifier { get; }
[Abstract]
[Export ("userID", ArgumentSemantic.Copy)]
NSData UserId { get; set; }
[Abstract]
[Export ("name")]
string Name { get; set; }
[Abstract]
[NullAllowed, Export ("displayName")]
string DisplayName { get; set; }
[Abstract]
[Export ("challenge", ArgumentSemantic.Copy)]
NSData Challenge { get; set; }
[Abstract]
[Export ("userVerificationPreference")]
NSString UserVerificationPreference { get; set; }
[Abstract]
[Export ("attestationPreference")]
NSString AttestationPreference { get; set; }
}
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV]
[Protocol]
interface ASPublicKeyCredential : ASAuthorizationCredential
{
[Abstract]
[Export ("rawClientDataJSON", ArgumentSemantic.Copy)]
NSData RawClientDataJson { get; }
[Abstract]
[Export ("credentialID", ArgumentSemantic.Copy)]
NSData CredentialId { get; }
}
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface ASAuthorizationPlatformPublicKeyCredentialDescriptor : ASAuthorizationPublicKeyCredentialDescriptor
{
[Export ("initWithCredentialID:")]
[DesignatedInitializer]
IntPtr Constructor (NSData credentialId);
}
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0), NoTV]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface ASAuthorizationPlatformPublicKeyCredentialProvider : ASAuthorizationProvider
{
[Export ("initWithRelyingPartyIdentifier:")]
[DesignatedInitializer]
IntPtr Constructor (string relyingPartyIdentifier);
[Export ("createCredentialRegistrationRequestWithChallenge:name:userID:")]
ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest CreateCredentialRegistrationRequest (NSData challenge, string name, NSData userId);
[Export ("createCredentialAssertionRequestWithChallenge:")]
ASAuthorizationPlatformPublicKeyCredentialAssertionRequest CreateCredentialAssertionRequest (NSData challenge);
[Export ("relyingPartyIdentifier")]
string RelyingPartyIdentifier { get; }
}
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface ASAuthorizationProviderExtensionAuthorizationResult
{
[Export ("initWithHTTPAuthorizationHeaders:")]
IntPtr Constructor (NSDictionary<NSString, NSString> httpAuthorizationHeaders);
[Export ("initWithHTTPResponse:httpBody:")]
IntPtr Constructor (NSHttpUrlResponse httpResponse, [NullAllowed] NSData httpBody);
[NullAllowed, Export ("httpAuthorizationHeaders", ArgumentSemantic.Assign)]
NSDictionary<NSString, NSString> HttpAuthorizationHeaders { get; set; }
[NullAllowed, Export ("httpResponse", ArgumentSemantic.Copy)]
NSHttpUrlResponse HttpResponse { get; set; }
[NullAllowed, Export ("httpBody", ArgumentSemantic.Assign)]
NSData HttpBody { get; set; }
[Export ("privateKeys", ArgumentSemantic.Assign)]
SecKey[] PrivateKeys { get; set; }
}
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface ASAuthorizationPublicKeyCredentialParameters : NSSecureCoding, NSCopying
{
[Export ("initWithAlgorithm:")]
IntPtr Constructor (ASCoseAlgorithmIdentifier algorithm);
[Export ("algorithm")]
ASCoseAlgorithmIdentifier Algorithm { get; }
}
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor : ASAuthorizationPublicKeyCredentialDescriptor
{
[Export ("initWithCredentialID:transports:")]
[DesignatedInitializer]
IntPtr Constructor (NSData credentialId, [BindAs (typeof (ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport[]))] NSString[] allowedTransports);
[Export ("transports", ArgumentSemantic.Assign)]
[BindAs (typeof (ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport[]))]
NSString[] Transports { get; set; }
}
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface ASAuthorizationSecurityKeyPublicKeyCredentialProvider : ASAuthorizationProvider
{
[Export ("initWithRelyingPartyIdentifier:")]
[DesignatedInitializer]
IntPtr Constructor (string relyingPartyIdentifier);
[Export ("createCredentialRegistrationRequestWithChallenge:displayName:name:userID:")]
ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest Create (NSData challenge, string displayName, string name, NSData userId);
[Export ("createCredentialAssertionRequestWithChallenge:")]
ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest Create (NSData challenge);
[Export ("relyingPartyIdentifier")]
string RelyingPartyIdentifier { get; }
}
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (ASAuthorizationRequest))]
[DisableDefaultCtor]
interface ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest : ASAuthorizationPublicKeyCredentialRegistrationRequest
{
[Export ("credentialParameters", ArgumentSemantic.Copy)]
ASAuthorizationPublicKeyCredentialParameters[] CredentialParameters { get; set; }
[Export ("excludedCredentials", ArgumentSemantic.Copy)]
ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor[] ExcludedCredentials { get; set; }
[Export ("residentKeyPreference")]
[BindAs (typeof (ASAuthorizationPublicKeyCredentialResidentKeyPreference))]
NSString ResidentKeyPreference { get; set; }
}
[TV (15,0), NoWatch, NoiOS, NoMac, NoMacCatalyst]
[Static]
interface ASAuthorizationCustomMethod
{
[Field ("ASAuthorizationCustomMethodVideoSubscriberAccount")]
NSString SubscriberAccount { get; }
[Field ("ASAuthorizationCustomMethodRestorePurchase")]
NSString RestorePurchase { get; }
[Field ("ASAuthorizationCustomMethodOther")]
NSString Other { get; }
}
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
interface ASAuthorizationPlatformPublicKeyCredentialAssertion : ASAuthorizationPublicKeyCredentialAssertion
{
}
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (ASAuthorizationRequest))]
[DisableDefaultCtor]
interface ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest : ASAuthorizationPublicKeyCredentialRegistrationRequest
{
}
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
interface ASAuthorizationSecurityKeyPublicKeyCredentialAssertion : ASAuthorizationPublicKeyCredentialAssertion
{
}
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface ASAuthorizationSecurityKeyPublicKeyCredentialRegistration : ASAuthorizationPublicKeyCredentialRegistration
{
}
[NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
interface ASAuthorizationPlatformPublicKeyCredentialRegistration : ASAuthorizationPublicKeyCredentialRegistration
{
}
}

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

@ -182,11 +182,17 @@ namespace FileProvider {
OlderExtensionVersionRunning = -2003,
NewerExtensionVersionFound = -2004,
CannotSynchronize = -2005,
#if MONOMAC
NonEvictableChildren = -2006,
UnsyncedEdits = -2007,
NonEvictable = -2008,
#endif
}
[NoiOS, Mac (12,0), NoMacCatalyst]
[Native]
public enum NSFileProviderDomainRemovalMode : long {
RemoveAll = 0,
PreserveDirtyUserData = 1,
PreserveDownloadedUserData = 2,
}
[iOS (11,0)]
@ -203,7 +209,7 @@ namespace FileProvider {
[Field ("NSFileProviderErrorNonExistentItemIdentifierKey")]
NSString NonExistentItemIdentifierKey { get; }
[NoiOS]
[iOS (15,0)]
[Field ("NSFileProviderErrorItemKey")]
NSString ItemKey { get; }
}
@ -330,6 +336,10 @@ namespace FileProvider {
[Notification]
[Field ("NSFileProviderDomainDidChange")]
NSString DidChange { get; }
[NoWatch, NoTV, NoiOS, Mac (12, 0), NoMacCatalyst]
[NullAllowed, Export ("backingStoreIdentity")]
NSData BackingStoreIdentity { get; }
}
interface INSFileProviderEnumerationObserver { }
@ -542,6 +552,12 @@ namespace FileProvider {
[NoiOS]
[NullAllowed, Export ("symlinkTargetPath")]
string SymlinkTargetPath { get; }
#if MONOMAC
[NoiOS, Mac (12, 0), NoMacCatalyst]
[Export ("typeAndCreator")]
NSFileProviderTypeAndCreator TypeAndCreator { get; }
#endif
}
[iOS (11,0)]
@ -716,6 +732,12 @@ namespace FileProvider {
[return: NullAllowed]
NSDictionary<INSFileProviderTestingOperation, NSError> GetRunTestingOperations (INSFileProviderTestingOperation[] operations, [NullAllowed] out NSError error);
[NoiOS, Mac (12,0), NoMacCatalyst]
[Async (ResultTypeName = "NSFileProviderRemoveDomainResult")]
[Static]
[Export ("removeDomain:mode:completionHandler:")]
void RemoveDomain (NSFileProviderDomain domain, NSFileProviderDomainRemovalMode mode, Action<NSUrl, NSError> completionHandler);
}
interface INSFileProviderPendingSetEnumerator { }
@ -815,6 +837,8 @@ namespace FileProvider {
ContentModificationDate = 1uL << 7,
FileSystemFlags = 1uL << 8,
ExtendedAttributes = 1uL << 9,
[Mac (12,0)]
TypeAndCreator = 1uL << 10,
}
[Mac (11,0)]
@ -826,9 +850,8 @@ namespace FileProvider {
Temporary = 1,
}
[Mac (11,0)]
[iOS (15,0), Mac (11,0)]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")]
[NoiOS]
[Native][Flags]
enum NSFileProviderFileSystemFlags : ulong
{
@ -1002,9 +1025,7 @@ namespace FileProvider {
NSDictionary UserInfo { get; }
}
[Advice ("This API is not available when using UIKit on macOS.")]
[Unavailable (PlatformName.MacCatalyst)]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[NoWatch, NoTV, iOS (15,0), Mac (12,0), NoMacCatalyst]
[Flags]
[Native]
public enum NSFileProviderDomainTestingModes : ulong {
@ -1263,4 +1284,18 @@ namespace FileProvider {
[Export ("renamedItem")]
INSFileProviderItem RenamedItem { get; }
}
[NoWatch, NoTV, NoiOS, Mac (12,0), NoMacCatalyst]
[Protocol]
interface NSFileProviderUserInteractionSuppressing
{
[Abstract]
[Export ("setInteractionSuppressed:forIdentifier:")]
void SetInteractionSuppressed (bool suppression, string suppressionIdentifier);
[Abstract]
[Export ("isInteractionSuppressedForIdentifier:")]
bool IsInteractionSuppressed (string suppressionIdentifier);
}
}

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

@ -1386,6 +1386,7 @@ namespace Foundation
[Export ("rightExpression")]
NSExpression RightExpression { get; }
[NullAllowed]
[Export ("customSelector")]
Selector CustomSelector { get; }
@ -5036,6 +5037,7 @@ namespace Foundation
[Export ("ascending")]
bool Ascending { get; }
[NullAllowed]
[Export ("selector")]
Selector Selector { get; }

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

@ -232,6 +232,7 @@ AUDIOUNIT_SOURCES = \
AUTHENTICATIONSERVICES_SOURCES = \
AuthenticationServices/ASAuthorization.cs \
AuthenticationServices/ASAuthorizationRequest.cs \
AuthenticationServices/PublicPrivateKeyAuthentication.cs \
# AVFoundation
@ -716,6 +717,9 @@ EXTERNALACCESSORY_API_SOURCES = \
# FileProvider
FILEPROVIDER_CORE_SOURCES = \
FileProvider/Structs.cs \
FILEPROVIDER_SOURCES = \
FileProvider/Compat.cs \
@ -1976,6 +1980,7 @@ MAC_FRAMEWORKS = \
Metal \
MetalKit \
MetalPerformanceShaders \
MetricKit \
MLCompute \
MobileCoreServices \
ModelIO \
@ -1988,6 +1993,7 @@ MAC_FRAMEWORKS = \
PassKit \
PdfKit \
PencilKit \
Phase \
Photos \
PhotosUI \
PrintCore \
@ -2096,6 +2102,7 @@ IOS_FRAMEWORKS = \
PassKit \
PdfKit \
PencilKit \
Phase \
Photos \
PhotosUI \
PushKit \
@ -2240,6 +2247,7 @@ MACCATALYST_FRAMEWORKS = \
FileProvider \
GameController \
GameplayKit \
HomeKit \
IdentityLookup \
ImageIO \
Intents \
@ -2264,6 +2272,7 @@ MACCATALYST_FRAMEWORKS = \
PassKit \
PdfKit \
PencilKit \
Phase \
Photos \
PhotosUI \
PushKit \

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

@ -2228,7 +2228,7 @@ public partial class Generator : IMemberGatherer {
GeneratedTypes = new GeneratedTypes (this);
marshal_types.Add (new MarshalType (TypeManager.NSObject, create: "Runtime.GetNSObject ("));
marshal_types.Add (new MarshalType (TypeManager.Selector, create: "Selector.FromHandle ("));
marshal_types.Add (new MarshalType (TypeManager.Selector, create: "Selector.FromHandle (", closingCreate: ")!"));
marshal_types.Add (new MarshalType (TypeManager.BlockLiteral, "BlockLiteral", "{0}", "THIS_IS_BROKEN"));
if (TypeManager.MusicSequence != null)
marshal_types.Add (new MarshalType (TypeManager.MusicSequence, create: "global::AudioToolbox.MusicSequence.Lookup ("));

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

@ -14,6 +14,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[Static]
partial interface HMErrors {
[Field ("HMErrorDomain")]
@ -22,6 +23,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject), Delegates=new string[] {"WeakDelegate"}, Events=new Type[] {typeof(HMHomeManagerDelegate)})]
partial interface HMHomeManager {
@ -64,6 +66,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[Model, Protocol]
[BaseType (typeof (NSObject))]
partial interface HMHomeManagerDelegate {
@ -92,6 +95,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject), Delegates=new string[] {"WeakDelegate"}, Events=new Type[] {typeof(HMAccessoryDelegate)})]
partial interface HMAccessory {
@ -184,6 +188,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[Model, Protocol]
[BaseType (typeof (NSObject))]
partial interface HMAccessoryDelegate {
@ -277,6 +282,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
partial interface HMAction {
@ -287,6 +293,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject))]
partial interface HMActionSet {
@ -335,6 +342,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (9,0)]
[MacCatalyst (14,0)]
[Static]
[Internal]
interface HMActionSetTypesInternal {
@ -360,6 +368,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
partial interface HMCharacteristic {
@ -412,10 +421,12 @@ namespace HomeKit {
NSUuid UniqueIdentifier { get; }
[iOS (9,0)]
[MacCatalyst (14,0)]
[Field ("HMCharacteristicKeyPath")]
NSString KeyPath { get; }
[iOS (9,0)]
[MacCatalyst (14,0)]
[Field ("HMCharacteristicValueKeyPath")]
NSString ValueKeyPath { get; }
}
@ -477,6 +488,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
partial interface HMCharacteristicMetadata {
@ -510,6 +522,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[DisableDefaultCtor]
[BaseType (typeof (HMAction))]
partial interface HMCharacteristicWriteAction {
@ -547,6 +560,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Delegates=new string[] {"WeakDelegate"}, Events=new Type[] {typeof(HMHomeDelegate)})]
partial interface HMHome {
@ -617,7 +631,7 @@ namespace HomeKit {
[Export ("addAndSetupAccessoriesWithCompletionHandler:")]
void AddAndSetupAccessories (Action<NSError> completion);
[NoWatch, NoTV, iOS (11,3)]
[NoWatch, NoTV, iOS (11,3), NoMacCatalyst]
[Async]
[Export ("addAndSetupAccessoriesWithPayload:completionHandler:")]
void AddAndSetupAccessories (HMAccessorySetupPayload payload, Action<HMAccessory[], NSError> completion);
@ -751,6 +765,7 @@ namespace HomeKit {
// constants
[MacCatalyst (14,0)]
[Field ("HMUserFailedAccessoriesKey")]
NSString UserFailedAccessoriesKey { get; }
@ -761,6 +776,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[Model, Protocol]
[BaseType (typeof (NSObject))]
partial interface HMHomeDelegate {
@ -867,6 +883,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject))]
partial interface HMRoom {
@ -890,6 +907,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
partial interface HMService {
@ -948,6 +966,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject))]
partial interface HMServiceGroup {
@ -983,6 +1002,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[DisableDefaultCtor]
[BaseType (typeof (HMTrigger))]
partial interface HMTimerTrigger {
@ -1026,6 +1046,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject))]
partial interface HMTrigger {
@ -1073,6 +1094,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[DisableDefaultCtor]
[BaseType (typeof (NSObject))]
partial interface HMZone {
@ -1149,6 +1171,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (8,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface HMUser {
@ -1162,6 +1185,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (9,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // NSInternalInconsistencyException Reason: init is unavailable
interface HMAccessoryCategory {
@ -1178,6 +1202,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (9,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (HMEvent))]
[DisableDefaultCtor]
interface HMCharacteristicEvent : NSMutableCopying {
@ -1203,6 +1228,7 @@ namespace HomeKit {
[TV (10,0)]
[iOS (9,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
interface HMEvent {
[Export ("uniqueIdentifier", ArgumentSemantic.Copy)]
@ -1214,12 +1240,13 @@ namespace HomeKit {
bool IsSupported (HMHome home);
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof (HMEvent))]
interface HMTimeEvent {}
[TV (10,0)]
[iOS (9,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (HMTrigger))]
[DisableDefaultCtor]
interface HMEventTrigger {
@ -1356,6 +1383,7 @@ namespace HomeKit {
[iOS (9,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (HMAccessControl))]
[DisableDefaultCtor]
interface HMHomeAccessControl {
@ -1365,6 +1393,7 @@ namespace HomeKit {
[iOS (9,0)]
[TV (10,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (HMEvent))]
[DisableDefaultCtor]
interface HMLocationEvent : NSMutableCopying {
@ -1384,7 +1413,7 @@ namespace HomeKit {
void UpdateRegion (CLRegion region, Action<NSError> completion);
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMLocationEvent))]
[DisableDefaultCtor]
interface HMMutableLocationEvent {
@ -1398,7 +1427,7 @@ namespace HomeKit {
}
[NoWatch]
[TV (10,0), iOS (10,0)]
[TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[BaseType (typeof(UIView))]
interface HMCameraView
{
@ -1410,7 +1439,7 @@ namespace HomeKit {
HMCameraSource CameraSource { get; set; }
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Abstract] // documented as such in header file
[BaseType (typeof(NSObject))]
interface HMCameraSource {
@ -1420,7 +1449,7 @@ namespace HomeKit {
double AspectRatio { get; }
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[BaseType (typeof(HMAccessoryProfile))]
[DisableDefaultCtor]
interface HMCameraProfile
@ -1441,11 +1470,11 @@ namespace HomeKit {
HMCameraAudioControl MicrophoneControl { get; }
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[BaseType (typeof(NSObject))]
interface HMCameraControl {}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[BaseType (typeof(HMCameraControl))]
interface HMCameraStreamControl
{
@ -1467,7 +1496,7 @@ namespace HomeKit {
interface IHMCameraStreamControlDelegate {}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Protocol, Model]
[BaseType (typeof(NSObject))]
interface HMCameraStreamControlDelegate
@ -1480,7 +1509,7 @@ namespace HomeKit {
}
// TODO: Type still available for tvOS even if everything in it is __TVOS_PROHIBITED.
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[BaseType (typeof(HMCameraSource))]
interface HMCameraStream
{
@ -1494,7 +1523,7 @@ namespace HomeKit {
void UpdateAudioStreamSetting (HMCameraAudioStreamSetting audioStreamSetting, Action<NSError> completion);
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[BaseType (typeof(HMCameraControl))]
interface HMCameraSnapshotControl
{
@ -1510,7 +1539,7 @@ namespace HomeKit {
interface IHMCameraSnapshotControlDelegate {}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[Protocol, Model]
[BaseType (typeof(NSObject))]
interface HMCameraSnapshotControlDelegate
@ -1523,7 +1552,7 @@ namespace HomeKit {
void DidUpdateMostRecentSnapshot (HMCameraSnapshotControl cameraSnapshotControl);
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[BaseType (typeof(HMCameraSource))]
interface HMCameraSnapshot
{
@ -1531,7 +1560,7 @@ namespace HomeKit {
NSDate CaptureDate { get; }
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[BaseType (typeof(HMCameraControl))]
[DisableDefaultCtor]
interface HMCameraSettingsControl
@ -1564,7 +1593,7 @@ namespace HomeKit {
HMCharacteristic ImageMirroring { get; }
}
[Watch (3,0), TV (10,0), iOS (10,0)]
[Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)]
[BaseType (typeof(HMCameraControl))]
[DisableDefaultCtor]
interface HMCameraAudioControl
@ -1576,7 +1605,7 @@ namespace HomeKit {
HMCharacteristic Volume { get; }
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMTimeEvent))]
[DisableDefaultCtor]
interface HMCalendarEvent : NSMutableCopying {
@ -1588,7 +1617,7 @@ namespace HomeKit {
NSDateComponents FireDateComponents { get; [NotImplemented] set; }
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMCalendarEvent))]
[DisableDefaultCtor]
interface HMMutableCalendarEvent {
@ -1601,7 +1630,7 @@ namespace HomeKit {
NSDateComponents FireDateComponents { get; set; }
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMCharacteristicEvent))]
[DisableDefaultCtor]
interface HMMutableCharacteristicEvent : NSMutableCopying {
@ -1618,7 +1647,7 @@ namespace HomeKit {
INSCopying TriggerValue { get; set; }
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMEvent))]
[DisableDefaultCtor]
interface HMCharacteristicThresholdRangeEvent : NSMutableCopying {
@ -1633,7 +1662,7 @@ namespace HomeKit {
HMNumberRange ThresholdRange { get; [NotImplemented] set; }
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMCharacteristicThresholdRangeEvent))]
[DisableDefaultCtor]
interface HMMutableCharacteristicThresholdRangeEvent {
@ -1650,7 +1679,7 @@ namespace HomeKit {
HMNumberRange ThresholdRange { get; set; }
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMTimeEvent))]
[DisableDefaultCtor]
interface HMDurationEvent : NSMutableCopying {
@ -1662,7 +1691,7 @@ namespace HomeKit {
double Duration { get; [NotImplemented] set; }
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMDurationEvent))]
[DisableDefaultCtor]
interface HMMutableDurationEvent {
@ -1675,7 +1704,7 @@ namespace HomeKit {
double Duration { get; set; }
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface HMNumberRange {
@ -1699,7 +1728,7 @@ namespace HomeKit {
NSNumber Max { get; }
}
[iOS (13,0), NoWatch, NoMac, NoTV]
[iOS (13,0), NoWatch, NoMac, NoTV, NoMacCatalyst]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface HMAccessoryOwnershipToken {
@ -1740,7 +1769,7 @@ namespace HomeKit {
HMAccessorySetupPayload GetPayload (NSUrl setupPayloadUrl, HMAccessoryOwnershipToken ownershipToken);
}
[iOS (13,0), Watch (6,0), TV (13,0), NoMac]
[iOS (13,0), Watch (6,0), TV (13,0), NoMac, MacCatalyst (14,0)]
[BaseType (typeof(HMAccessoryProfile))]
[DisableDefaultCtor]
interface HMNetworkConfigurationProfile {
@ -1757,7 +1786,7 @@ namespace HomeKit {
interface IHMNetworkConfigurationProfileDelegate {}
[Watch (6,0), TV (13,0), NoMac, iOS (13,0)]
[Watch (6,0), TV (13,0), NoMac, iOS (13,0), MacCatalyst (14,0)]
[Protocol, Model (AutoGeneratedName = true)]
[BaseType (typeof (NSObject))]
interface HMNetworkConfigurationProfileDelegate {
@ -1765,7 +1794,7 @@ namespace HomeKit {
void DidUpdateNetworkAccessMode (HMNetworkConfigurationProfile profile);
}
[NoWatch, NoTV, iOS (11,3)]
[NoWatch, NoTV, iOS (11,3), NoMacCatalyst]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface HMAccessorySetupPayload {
@ -1778,7 +1807,7 @@ namespace HomeKit {
IntPtr Constructor (NSUrl setupPayloadUrl, [NullAllowed] HMAccessoryOwnershipToken ownershipToken);
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMEvent))]
[DisableDefaultCtor]
interface HMPresenceEvent : NSMutableCopying {
@ -1792,11 +1821,12 @@ namespace HomeKit {
[Export ("presenceUserType")]
HMPresenceEventUserType PresenceUserType { get; [NotImplemented] set; }
[MacCatalyst (14,0)]
[Field ("HMPresenceKeyPath")]
NSString KeyPath { get; }
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMPresenceEvent))]
[DisableDefaultCtor]
interface HMMutablePresenceEvent {
@ -1808,7 +1838,7 @@ namespace HomeKit {
HMPresenceEventUserType PresenceUserType { get; /* Radar 33883958: https://trello.com/c/TIlzWzrL*/ [NotImplemented] set; }
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMTimeEvent))]
[DisableDefaultCtor]
interface HMSignificantTimeEvent : NSMutableCopying {
@ -1836,7 +1866,7 @@ namespace HomeKit {
NSDateComponents Offset { get; [NotImplemented] set; }
}
[Watch (4,0), TV (11,0), iOS (11,0)]
[Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)]
[BaseType (typeof(HMSignificantTimeEvent))]
interface HMMutableSignificantTimeEvent {
@ -1867,12 +1897,85 @@ namespace HomeKit {
NSDateComponents Offset { get; set; }
}
[Watch (4,2), TV (11,2), iOS (11,2)]
[Watch (4,2), TV (11,2), iOS (11,2), MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface HMAccessControl {
}
delegate void HMErrorHandler ([NullAllowed] NSError error);
[iOS (15,0), NoWatch, NoTV, NoMacCatalyst]
[BaseType (typeof (NSObject))]
interface HMAccessorySetupManager
{
[Async]
[Export ("addAndSetUpAccessoriesForTopology:completionHandler:")]
void AddAndSetUpAccessories (HMChipServiceTopology topology, HMErrorHandler completion);
}
[iOS (15,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject), Name = "HMCHIPServiceHome")]
[DisableDefaultCtor]
interface HMChipServiceHome : NSCopying, NSSecureCoding
{
[Export ("uuid", ArgumentSemantic.Strong)]
NSUuid Uuid { get; }
[Export ("name", ArgumentSemantic.Strong)]
string Name { get; }
[Export ("initWithUUID:name:")]
[DesignatedInitializer]
IntPtr Constructor (NSUuid uuid, string name);
}
delegate void FetchRoomHandler (NSArray<HMChipServiceRoom> rooms, NSError error);
[iOS (15,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject), Name = "HMCHIPServiceRequestHandler")]
interface HMChipServiceRequestHandler : NSExtensionRequestHandling
{
[Async]
[Export ("fetchRoomsInHome:completion:")]
void FetchRooms (HMChipServiceHome home, FetchRoomHandler completion);
[Async]
[Export ("pairAccessoryInHome:onboardingPayload:completion:")]
void PairAccessory (HMChipServiceHome home, string onboardingPayload, Action<NSError> completion);
[Async]
[Export ("configureAccessoryWithName:room:completion:")]
void ConfigureAccessory (string accessoryName, HMChipServiceRoom accessoryRoom, Action<NSError> completion);
}
[iOS (15,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject), Name = "HMCHIPServiceRoom")]
[DisableDefaultCtor]
interface HMChipServiceRoom : NSCopying, NSSecureCoding
{
[Export ("uuid", ArgumentSemantic.Strong)]
NSUuid Uuid { get; }
[Export ("name", ArgumentSemantic.Strong)]
string Name { get; }
[Export ("initWithUUID:name:")]
[DesignatedInitializer]
IntPtr Constructor (NSUuid uuid, string name);
}
[iOS (15,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject), Name = "HMCHIPServiceTopology")]
[DisableDefaultCtor]
interface HMChipServiceTopology : NSCopying, NSSecureCoding
{
[Export ("initWithHomes:")]
IntPtr Constructor (HMChipServiceHome[] homes);
[Export ("homes", ArgumentSemantic.Copy)]
HMChipServiceHome[] Homes { get; }
}
}

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

@ -87,7 +87,7 @@ namespace MetricKit {
MXUnitAveragePixelLuminance Apl { get; }
}
[NoWatch, NoTV, NoMac, iOS (13,0)]
[NoWatch, NoTV, Mac (12,0), iOS (13,0)]
[BaseType (typeof(NSObject))]
interface MXHistogramBucket<UnitType> : NSSecureCoding
where UnitType : NSUnit {
@ -101,7 +101,7 @@ namespace MetricKit {
nuint BucketCount { get; }
}
[NoWatch, NoTV, NoMac, iOS (13,0)]
[NoWatch, NoTV, Mac (12,0), iOS (13,0)]
[BaseType (typeof(NSObject))]
interface MXHistogram<UnitType> : NSSecureCoding
where UnitType : NSUnit {
@ -119,7 +119,7 @@ namespace MetricKit {
MXHistogram<MXUnitSignalBars> HistogrammedCellularConditionTime { get; }
}
[NoWatch, NoTV, NoMac, iOS (13,0)]
[NoWatch, NoTV, Mac (12,0), iOS (13,0)]
[BaseType (typeof(NSObject))]
interface MXMetaData : NSSecureCoding {
[Export ("regionFormat", ArgumentSemantic.Strong)]
@ -137,6 +137,7 @@ namespace MetricKit {
[Export ("JSONRepresentation")]
NSData JsonRepresentation { get; }
#if !MONOMAC
[Internal]
[Deprecated (PlatformName.iOS, 14,0)]
[Export ("DictionaryRepresentation")]
@ -147,6 +148,10 @@ namespace MetricKit {
[MacCatalyst (14,0)]
[Export ("dictionaryRepresentation")]
NSDictionary _DictionaryRepresentation14 { get; }
#else
[Export ("dictionaryRepresentation")]
NSDictionary DictionaryRepresentation { get; }
#endif
[iOS (14,0)]
[MacCatalyst (14,0)]
@ -232,7 +237,7 @@ namespace MetricKit {
NSMeasurement<NSUnitInformationStorage> CumulativeLogicalWrites { get; }
}
[NoWatch, NoTV, NoMac, iOS (13,0)]
[NoWatch, NoTV, Mac (12,0), iOS (13,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface MXAverage<UnitType> : NSSecureCoding
@ -278,6 +283,11 @@ namespace MetricKit {
[NullAllowed, Export ("cumulativeLogicalWrites", ArgumentSemantic.Strong)]
NSMeasurement<NSUnitInformationStorage> CumulativeLogicalWrites { get; }
[NullAllowed]
[NoWatch, NoTV, NoMac, iOS (15,0), MacCatalyst (15,0)]
[Export ("cumulativeHitchTimeRatio", ArgumentSemantic.Strong)]
NSMeasurement<NSUnit> CumulativeHitchTimeRatio { get; }
}
[NoWatch, NoTV, NoMac, iOS (13,0)]
@ -377,10 +387,11 @@ namespace MetricKit {
MXAppExitMetric ApplicationExitMetrics { get; }
}
[NoWatch, NoTV, NoMac, iOS (13,0)]
[NoWatch, NoTV, Mac (12,0), iOS (13,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface MXMetricManager {
[NoMac]
[Export ("pastPayloads", ArgumentSemantic.Strong)]
MXMetricPayload[] PastPayloads { get; }
@ -407,10 +418,13 @@ namespace MetricKit {
interface IMXMetricManagerSubscriber { }
[NoWatch, NoTV, NoMac, iOS (13,0)]
[NoWatch, NoTV, Mac (12,0), iOS (13,0)]
[Protocol]
interface MXMetricManagerSubscriber {
#if !XAMCORE_4_0
[Abstract]
#endif
[NoMac]
[Export ("didReceiveMetricPayloads:")]
void DidReceiveMetricPayloads (MXMetricPayload[] payloads);
@ -508,7 +522,7 @@ namespace MetricKit {
nuint CumulativeAppWatchdogExitCount { get; }
}
[NoWatch, NoTV, NoMac]
[NoWatch, NoTV, Mac (12,0)]
[iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
@ -519,7 +533,7 @@ namespace MetricKit {
NSData JsonRepresentation { get; }
}
[NoWatch, NoTV, NoMac]
[NoWatch, NoTV, Mac (12,0)]
[iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (MXDiagnostic), Name = "MXCPUExceptionDiagnostic")]
@ -536,7 +550,7 @@ namespace MetricKit {
NSMeasurement<NSUnitDuration> TotalSampledTime { get; }
}
[NoWatch, NoTV, NoMac]
[NoWatch, NoTV, Mac (12,0)]
[iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (MXDiagnostic))]
@ -568,7 +582,7 @@ namespace MetricKit {
NSNumber Signal { get; }
}
[NoWatch, NoTV, NoMac]
[NoWatch, NoTV, Mac (12,0)]
[iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
@ -588,7 +602,7 @@ namespace MetricKit {
NSDictionary DictionaryRepresentation { get; }
}
[NoWatch, NoTV, NoMac]
[NoWatch, NoTV, Mac (12,0)]
[iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
@ -620,7 +634,7 @@ namespace MetricKit {
NSDictionary DictionaryRepresentation { get; }
}
[NoWatch, NoTV, NoMac]
[NoWatch, NoTV, Mac (12,0)]
[iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (MXDiagnostic))]
@ -634,7 +648,7 @@ namespace MetricKit {
NSMeasurement<NSUnitInformationStorage> TotalWritesCaused { get; }
}
[NoWatch, NoTV, NoMac]
[NoWatch, NoTV, Mac (12,0)]
[iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (MXDiagnostic))]

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

@ -92,9 +92,15 @@ namespace MLCompute {
enum MLCDataType {
Invalid = 0,
Float32 = 1,
[iOS (15,0), TV (15,0), Mac (12,0), MacCatalyst (15,0)]
Float16 = 3,
Boolean = 4,
Int64 = 5,
Int32 = 7,
Inot32 = 7,
[iOS (15,0), TV (15,0), Mac (12,0), MacCatalyst (15,0)]
Int8 = 8,
[iOS (15,0), TV (15,0), Mac (12,0), MacCatalyst (15,0)]
UInt8 = 9,
// Count, // must be last, not available in swift
}
@ -104,6 +110,8 @@ namespace MLCompute {
Cpu = 0,
Gpu = 1,
Any = 2,
[iOS (15,0), TV (15,0), Mac (12,0), MacCatalyst (15,0)]
Ane = 3, // Apple neural engine
// Count, // must be last, not available in swift
}
@ -116,6 +124,8 @@ namespace MLCompute {
Synchronous = 0x2,
Profiling = 0x4,
ForwardForInference = 0x8,
[iOS (15,0), TV (15,0), Mac (12,0), MacCatalyst (15,0)]
PerLayerProfiling = 0x10,
}
[iOS (14,0)][TV (14,0)][Mac (11,0)]
@ -229,6 +239,14 @@ namespace MLCompute {
LogSoftmax = 1,
}
[iOS (15,0), TV (15,0), Mac (12,0), NoWatch, MacCatalyst (15,0)]
public enum MLCGradientClippingType {
Value = 0,
Norm = 1,
GlobalNorm = 2,
}
[iOS (14,0)][TV (14,0)][Mac (11,0)]
[NoWatch]
[BaseType (typeof (NSObject))]
@ -286,6 +304,10 @@ namespace MLCompute {
[Static]
[Export ("supportsDataType:onDevice:")]
bool SupportsDataType (MLCDataType dataType, MLCDeviceType device);
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("deviceType")]
MLCDeviceType DeviceType { get; }
}
[iOS (14,0)][TV (14,0)][Mac (11,0)]
@ -442,6 +464,18 @@ namespace MLCompute {
[Export ("regularizationType")]
MLCRegularizationType RegularizationType { get; }
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("gradientClippingType")]
MLCGradientClippingType GradientClippingType { get; }
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("maximumClippingNorm")]
float MaximumClippingNorm { get; }
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("customGlobalNorm")]
float CustomGlobalNorm { get; }
}
[iOS (14,0)][TV (14,0)][Mac (11,0)]
@ -478,6 +512,23 @@ namespace MLCompute {
[Static]
[Export ("descriptorWithLearningRate:gradientRescale:appliesGradientClipping:gradientClipMax:gradientClipMin:regularizationType:regularizationScale:")]
MLCOptimizerDescriptor Create (float learningRate, float gradientRescale, bool appliesGradientClipping, float gradientClipMax, float gradientClipMin, MLCRegularizationType regularizationType, float regularizationScale);
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Static]
[Export ("descriptorWithLearningRate:gradientRescale:appliesGradientClipping:gradientClippingType:gradientClipMax:gradientClipMin:maximumClippingNorm:customGlobalNorm:regularizationType:regularizationScale:")]
MLCOptimizerDescriptor Create (float learningRate, float gradientRescale, bool appliesGradientClipping, MLCGradientClippingType gradientClippingType, float gradientClipMax, float gradientClipMin, float maximumClippingNorm, float customGlobalNorm, MLCRegularizationType regularizationType, float regularizationScale);
[TV (15, 0), Mac (12, 0), iOS (15, 0), MacCatalyst (15,0)]
[Export ("gradientClippingType")]
MLCGradientClippingType GradientClippingType { get; }
[TV (15, 0), Mac (12, 0), iOS (15, 0), MacCatalyst (15,0)]
[Export ("maximumClippingNorm")]
float MaximumClippingNorm { get; }
[TV (15, 0), Mac (12, 0), iOS (15, 0), MacCatalyst (15,0)]
[Export ("customGlobalNorm")]
float CustomGlobalNorm { get; }
}
[iOS (14,0)][TV (14,0)][Mac (11,0)]
@ -498,6 +549,10 @@ namespace MLCompute {
[Export ("timeStep")]
nuint TimeStep { get; }
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("usesAMSGrad")]
bool UsesAmsGrad { get; }
[Static]
[Export ("optimizerWithDescriptor:")]
MLCAdamOptimizer Create (MLCOptimizerDescriptor optimizerDescriptor);
@ -505,6 +560,11 @@ namespace MLCompute {
[Static]
[Export ("optimizerWithDescriptor:beta1:beta2:epsilon:timeStep:")]
MLCAdamOptimizer Create (MLCOptimizerDescriptor optimizerDescriptor, float beta1, float beta2, float epsilon, nuint timeStep);
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Static]
[Export ("optimizerWithDescriptor:beta1:beta2:epsilon:usesAMSGrad:timeStep:")]
MLCAdamOptimizer Create (MLCOptimizerDescriptor optimizerDescriptor, float beta1, float beta2, float epsilon, bool usesAmsGrad, nuint timeStep);
}
[iOS (14,0)][TV (14,0)][Mac (11,0)]
@ -538,11 +598,21 @@ namespace MLCompute {
[return: NullAllowed]
MLCDevice GetDevice (IMTLDevice[] gpus);
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Static]
[Export ("aneDevice")]
[return: NullAllowed]
MLCDevice GetAneDevice ();
[iOS (14,2)][TV (14,2)]
[Static]
[Export ("deviceWithType:selectsMultipleComputeDevices:")]
[return: NullAllowed]
MLCDevice GetDevice (MLCDeviceType type, bool selectsMultipleComputeDevices);
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("actualDeviceType")]
MLCDeviceType ActualDeviceType { get; }
}
[iOS (14,0)][TV (14,0)][Mac (11,0)]
@ -673,6 +743,31 @@ namespace MLCompute {
[Export ("bindOptimizerData:deviceData:")]
bool BindOptimizer (MLCTensorData[] data, [NullAllowed] MLCTensorOptimizerDeviceData[] deviceData);
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("tensorByQuantizingToType:scale:bias:")]
[return: NullAllowed]
MLCTensor CreateByQuantizing (MLCDataType type, float scale, nint bias);
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("tensorByDequantizingToType:scale:bias:")]
[return: NullAllowed]
MLCTensor CreateByDequantizing (MLCDataType type, MLCTensor scale, MLCTensor bias);
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("tensorByQuantizingToType:scale:bias:axis:")]
[return: NullAllowed]
MLCTensor CreateByQuantizing (MLCDataType type, MLCTensor scale, MLCTensor bias, nint axis);
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("tensorByDequantizingToType:scale:bias:axis:")]
[return: NullAllowed]
MLCTensor CreateByDequantizing (MLCDataType type, MLCTensor scale, MLCTensor bias, nint axis);
[Static]
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("tensorWithShape:randomInitializerType:dataType:")]
MLCTensor Create ([BindAs (typeof (nint[]))] NSNumber[] shape, MLCRandomInitializerType randomInitializerType, MLCDataType dataType);
}
[iOS (14,0)][TV (14,0)][Mac (11,0)]
@ -2282,4 +2377,49 @@ namespace MLCompute {
[Export ("layer")]
MLCSelectionLayer Create ();
}
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface MLCPlatform {
[Static]
[Export ("setRNGSeedTo:")]
void SetRngSeed ([BindAs (typeof (nuint))] NSNumber seed);
[return: BindAs (typeof (nuint)), NullAllowed]
[Static]
[Export ("getRNGseed")]
NSNumber GetRngSeed ();
}
[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (MLCOptimizer))]
[DisableDefaultCtor]
interface MLCAdamWOptimizer : NSCopying
{
[Export ("beta1")]
float Beta1 { get; }
[Export ("beta2")]
float Beta2 { get; }
[Export ("epsilon")]
float Epsilon { get; }
[Export ("usesAMSGrad")]
bool UsesAmsGrad { get; }
[Export ("timeStep")]
nuint TimeStep { get; }
[Static]
[Export ("optimizerWithDescriptor:")]
MLCAdamWOptimizer GetOptimizer (MLCOptimizerDescriptor optimizerDescriptor);
[Static]
[Export ("optimizerWithDescriptor:beta1:beta2:epsilon:usesAMSGrad:timeStep:")]
MLCAdamWOptimizer GetOptimizer (MLCOptimizerDescriptor optimizerDescriptor, float beta1, float beta2, float epsilon, bool usesAmsGrad, nuint timeStep);
}
}

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

@ -516,6 +516,11 @@ namespace MobileCoreServices {
[Field ("kUTTypeUniversalSceneDescription", "ModelIO")]
NSString UniversalSceneDescription { get; }
[NoWatch]
[iOS (15,0), Mac(12,0), TV (15,0), MacCatalyst (15,0)]
[Field ("kUTTypeUniversalSceneDescriptionMobile", "ModelIO")]
NSString UniversalSceneDescriptionMobile { get; }
[Watch (2,2)]
[iOS (9,1)][TV (9,0)]
[NoMac]

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

@ -227,12 +227,20 @@ namespace ModelIO {
[Export ("objectAtIndex:")]
MDLObject GetObject (nuint index);
[Deprecated (PlatformName.iOS, 15, 0, message: "Use the 'Originals' property instead.")]
[Deprecated (PlatformName.TvOS, 15, 0, message: "Use the 'Originals' property instead.")]
[Deprecated (PlatformName.MacOSX, 12, 0, message: "Use the 'Originals' property instead.")]
[Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use the 'Originals' property instead.")]
[iOS (10,0)]
[Mac (10,12)]
[TV (10,0)]
[Export ("masters", ArgumentSemantic.Retain)]
IMDLObjectContainerComponent Masters { get; set; }
[iOS (15,0), Mac (12,0), TV (15,0), MacCatalyst (15,0)]
[Export ("originals", ArgumentSemantic.Retain)]
IMDLObjectContainerComponent Originals { get; set; }
[TV (11,0), Mac (10,13), iOS (11,0)]
[Export ("animations", ArgumentSemantic.Retain)]
IMDLObjectContainerComponent Animations { get; set; }

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

@ -97,7 +97,7 @@ namespace NetworkExtension {
}
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[Native]
enum NEFilterManagerGrade : long {
Firewall = 1,
@ -113,7 +113,7 @@ namespace NetworkExtension {
}
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[Native]
enum NENetworkRuleProtocol : long {
Any = 0,
@ -122,7 +122,7 @@ namespace NetworkExtension {
}
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[Native]
enum NEFilterPacketProviderVerdict : long {
Allow = 0,
@ -140,7 +140,7 @@ namespace NetworkExtension {
Statistics = 4,
}
[NoWatch, NoTV, NoiOS, Mac (10,15,4)]
[NoWatch, NoTV, NoiOS, Mac (10,15,4), MacCatalyst (15,0)]
[Native]
enum NEFilterReportFrequency : long {
None,
@ -149,12 +149,23 @@ namespace NetworkExtension {
High,
}
[NoWatch, NoTV, NoiOS, Mac (10,15,5)]
[NoWatch, NoTV, NoiOS, Mac (10,15,5), MacCatalyst (15,0)]
[Native]
public enum NEFilterDataAttribute : long {
HasIpHeader = 1,
}
[Watch (8,0), NoTV, NoMac, iOS (15,0), MacCatalyst (15,0)]
[Native]
enum NEHotspotNetworkSecurityType : long
{
Open = 0,
Wep = 1,
Personal = 2,
Enterprise = 3,
Unknown = 4,
}
[iOS (9,0)][Mac (10,11)]
[BaseType (typeof (NSObject))]
[Abstract] // documented as such and ...
@ -171,11 +182,11 @@ namespace NetworkExtension {
void CloseWrite ([NullAllowed] NSError error);
[Internal]
[NoWatch, NoTV, NoiOS, Mac (10,15,4)]
[NoWatch, NoTV, NoiOS, Mac (10,15,4), MacCatalyst (15,0)]
[Export ("setMetadata:")]
void SetMetadata (OS_nw_parameters nwparameters);
[NoWatch, NoTV, NoiOS, Mac (10,15,4)]
[NoWatch, NoTV, NoiOS, Mac (10,15,4), MacCatalyst (15,0)]
[Wrap ("SetMetadata (parameters.GetHandle ())")]
void SetMetadata (NWParameters parameters);
@ -291,13 +302,13 @@ namespace NetworkExtension {
[Export ("initWithSigningIdentifier:")]
IntPtr Constructor (string signingIdentifier);
#if MONOMAC
[NoiOS, NoTV, NoWatch, MacCatalyst (15,0)]
[Export ("initWithSigningIdentifier:designatedRequirement:")]
IntPtr Constructor (string signingIdentifier, string designatedRequirement);
[NoiOS, NoTV, NoWatch, MacCatalyst (15,0)]
[Export ("matchDesignatedRequirement")]
string MatchDesignatedRequirement { get; }
#endif
[iOS (9,3)]
[NullAllowed, Export ("matchPath")]
@ -309,7 +320,7 @@ namespace NetworkExtension {
[NullAllowed, Export ("matchDomains", ArgumentSemantic.Copy)]
string [] MatchDomains { get; set; }
[NoWatch, NoTV, NoiOS, Mac (10,15,4)]
[NoWatch, NoTV, NoiOS, Mac (10,15,4), MacCatalyst (15,0)]
[NullAllowed, Export ("matchTools", ArgumentSemantic.Copy)]
NEAppRule[] MatchTools { get; set; }
}
@ -424,16 +435,16 @@ namespace NetworkExtension {
[Export ("handleRulesChanged")]
void HandleRulesChanged ();
[NoiOS]
[NoiOS, MacCatalyst (15,0)]
[Export ("applySettings:completionHandler:")]
[Async]
void ApplySettings ([NullAllowed] NEFilterSettings settings, Action<NSError> completionHandler);
[NoiOS]
[NoiOS, MacCatalyst (15,0)]
[Export ("resumeFlow:withVerdict:")]
void ResumeFlow (NEFilterFlow flow, NEFilterVerdict verdict);
[NoWatch, NoTV, NoiOS, Mac (10,15,4)]
[NoWatch, NoTV, NoiOS, Mac (10,15,4), MacCatalyst (15,0)]
[Export ("updateFlow:usingVerdict:forDirection:")]
void UpdateFlow (NEFilterSocketFlow flow, NEFilterDataVerdict verdict, NETrafficDirection direction);
}
@ -443,7 +454,7 @@ namespace NetworkExtension {
[BaseType (typeof(NEFilterVerdict))]
interface NEFilterDataVerdict : NSSecureCoding, NSCopying
{
[NoWatch, NoTV, NoiOS, Mac (10,15,4)]
[NoWatch, NoTV, NoiOS, Mac (10,15,4), MacCatalyst (15,0)]
[Export ("statisticsReportFrequency", ArgumentSemantic.Assign)]
NEFilterReportFrequency StatisticsReportFrequency { get; set; }
@ -467,7 +478,7 @@ namespace NetworkExtension {
[Export ("needRulesVerdict")]
NEFilterDataVerdict NeedRulesVerdict ();
[NoiOS]
[NoiOS, MacCatalyst (15,0)]
[Static]
[Export ("pauseVerdict")]
NEFilterDataVerdict PauseVerdict ();
@ -497,7 +508,7 @@ namespace NetworkExtension {
[Export ("direction")]
NETrafficDirection Direction { get; }
[NoiOS]
[NoiOS, MacCatalyst (15,0)]
[NullAllowed, Export ("sourceAppAuditToken")]
NSData SourceAppAuditToken { get; }
@ -542,7 +553,7 @@ namespace NetworkExtension {
NSString ConfigurationDidChangeNotification { get; }
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[Export ("grade", ArgumentSemantic.Assign)]
NEFilterManagerGrade Grade { get; set; }
@ -557,7 +568,7 @@ namespace NetworkExtension {
[BaseType (typeof(NEFilterVerdict))]
interface NEFilterNewFlowVerdict : NSSecureCoding, NSCopying
{
[NoWatch, NoTV, NoiOS, Mac (10, 15, 4)]
[NoWatch, NoTV, NoiOS, Mac (10, 15, 4), MacCatalyst (15,0)]
[Export ("statisticsReportFrequency", ArgumentSemantic.Assign)]
NEFilterReportFrequency StatisticsReportFrequency { get; set; }
@ -585,7 +596,7 @@ namespace NetworkExtension {
[Export ("filterDataVerdictWithFilterInbound:peekInboundBytes:filterOutbound:peekOutboundBytes:")]
NEFilterNewFlowVerdict FilterDataVerdict (bool filterInbound, nuint peekInboundBytes, bool filterOutbound, nuint peekOutboundBytes);
[NoiOS]
[NoiOS, MacCatalyst (15,0)]
[Static]
[Export ("pauseVerdict")]
NEFilterDataVerdict PauseVerdict ();
@ -649,17 +660,17 @@ namespace NetworkExtension {
NSData IdentityReference { get; set; }
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[Export ("filterPackets")]
bool FilterPackets { get; set; }
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[NullAllowed, Export ("filterDataProviderBundleIdentifier")]
string FilterDataProviderBundleIdentifier { get; set; }
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[NullAllowed, Export ("filterPacketProviderBundleIdentifier")]
string FilterPacketProviderBundleIdentifier { get; set; }
}
@ -703,11 +714,11 @@ namespace NetworkExtension {
string SourceAppSigningIdentifier { get; }
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[NullAllowed, Export ("sourceAppAuditToken")]
NSData SourceAppAuditToken { get; }
[NoWatch, NoTV, NoiOS, Mac (10,15,4)]
[NoWatch, NoTV, NoiOS, Mac (10,15,4), MacCatalyst (15,0)]
[NullAllowed, Export ("filterFlowIdentifier")]
NSUuid FilterFlowIdentifier { get; }
}
@ -822,6 +833,10 @@ namespace NetworkExtension {
[Static]
[Export ("fetchCurrentWithCompletionHandler:")]
void FetchCurrent (Action<NEHotspotNetwork> completionHandler);
[Watch (8, 0), NoTV, NoMac, iOS (15, 0), MacCatalyst (15,0)]
[Export ("securityType")]
NEHotspotNetworkSecurityType SecurityType { get; }
}
#endif
@ -940,7 +955,7 @@ namespace NetworkExtension {
void DisplayMessage (string message, Action<bool> completionHandler);
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[Static]
[Export ("startSystemExtensionMode")]
void StartSystemExtensionMode ();
@ -1058,7 +1073,7 @@ namespace NetworkExtension {
[Async]
void LoadAllFromPreferences (Action<NSArray, NSError> completionHandler);
[NoWatch, NoTV, NoiOS, Mac (10,15,4)]
[NoWatch, NoTV, NoiOS, Mac (10,15,4), MacCatalyst (15,0)]
[Static]
[Export ("forPerAppVPN")]
NETunnelProviderManager CreatePerAppVpn ();
@ -1068,8 +1083,8 @@ namespace NetworkExtension {
NEAppRule[] CopyAppRules ();
// CopyAppRules was incorrectly bound to AppRules and it is only available on macOS
#if XAMCORE_4_0 || MONOMAC
[NoWatch, NoTV, NoiOS, Mac (10,15,4)]
#if XAMCORE_4_0 || MONOMAC || __MACCATALYST__
[NoWatch, NoTV, NoiOS, Mac (10,15,4), MacCatalyst (15,0)]
[Export ("appRules", ArgumentSemantic.Copy)]
NEAppRule[] AppRules { get; set; }
#else
@ -1080,19 +1095,19 @@ namespace NetworkExtension {
[Export ("routingMethod")]
NETunnelProviderRoutingMethod RoutingMethod { get; }
[NoWatch, NoTV, NoiOS, Mac (10, 15, 4)]
[NoWatch, NoTV, NoiOS, Mac (10, 15, 4), MacCatalyst (15,0)]
[Export ("safariDomains", ArgumentSemantic.Copy)]
string[] SafariDomains { get; set; }
[NoWatch, NoTV, NoiOS, Mac (10, 15, 4)]
[NoWatch, NoTV, NoiOS, Mac (10, 15, 4), MacCatalyst (15,0)]
[Export ("mailDomains", ArgumentSemantic.Copy)]
string[] MailDomains { get; set; }
[NoWatch, NoTV, NoiOS, Mac (10, 15, 4)]
[NoWatch, NoTV, NoiOS, Mac (10, 15, 4), MacCatalyst (15,0)]
[Export ("calendarDomains", ArgumentSemantic.Copy)]
string[] CalendarDomains { get; set; }
[NoWatch, NoTV, NoiOS, Mac (10, 15, 4)]
[NoWatch, NoTV, NoiOS, Mac (10, 15, 4), MacCatalyst (15,0)]
[Export ("contactsDomains", ArgumentSemantic.Copy)]
string[] ContactsDomains { get; set; }
@ -1101,11 +1116,11 @@ namespace NetworkExtension {
NSString ErrorDomain { get; }
#endif
[NoWatch, NoTV, NoiOS, Mac (11, 0)]
[NoWatch, NoTV, NoiOS, Mac (11, 0), MacCatalyst (15,0)]
[Export ("excludedDomains", ArgumentSemantic.Copy)]
string[] ExcludedDomains { get; set; }
[NoWatch, NoTV, NoiOS, Mac (11, 0)]
[NoWatch, NoTV, NoiOS, Mac (11, 0), MacCatalyst (15,0)]
[Export ("associatedDomains", ArgumentSemantic.Copy)]
string[] AssociatedDomains { get; set; }
}
@ -1847,7 +1862,7 @@ namespace NetworkExtension {
NEFlowMetaData Metadata { get; }
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[Export ("direction")]
NETrafficDirection Direction { get; }
}
@ -2057,7 +2072,7 @@ namespace NetworkExtension {
}
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface NENetworkRule : NSSecureCoding, NSCopying {
@ -2091,7 +2106,7 @@ namespace NetworkExtension {
}
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface NEFilterRule : NSSecureCoding, NSCopying {
@ -2107,7 +2122,7 @@ namespace NetworkExtension {
}
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface NEFilterSettings : NSSecureCoding, NSCopying {
@ -2123,7 +2138,7 @@ namespace NetworkExtension {
}
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
interface NEFilterPacketContext {
}
@ -2133,7 +2148,7 @@ namespace NetworkExtension {
delegate NEFilterPacketProviderVerdict NEFilterPacketHandler (NEFilterPacketContext context, IntPtr @interface, NETrafficDirection directiom, IntPtr packetBytes, nuint packetLength);
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[BaseType (typeof (NEFilterProvider))]
[DisableDefaultCtor] // returns `nil`
interface NEFilterPacketProvider {
@ -2148,7 +2163,7 @@ namespace NetworkExtension {
}
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[BaseType (typeof (NEVpnManager))]
[DisableDefaultCtor]
interface NETransparentProxyManager {
@ -2160,7 +2175,7 @@ namespace NetworkExtension {
}
[NoiOS]
[Mac (10,15)]
[Mac (10,15), MacCatalyst (15,0)]
[BaseType (typeof (NETunnelNetworkSettings))]
interface NETransparentProxyNetworkSettings {
@ -2218,6 +2233,10 @@ namespace NetworkExtension {
[Export ("active")]
bool Active { [Bind ("isActive")] get; }
[NoWatch, NoTV, NoMac, iOS (15, 0), MacCatalyst (15,0)]
[Export ("matchPrivateLTENetworks", ArgumentSemantic.Copy)]
NEPrivateLteNetwork[] MatchPrivateLteNetworks { get; set; }
}
[NoWatch, NoTV, NoMac, iOS (14,0)]
@ -2229,6 +2248,8 @@ namespace NetworkExtension {
[Export ("providerConfiguration")]
NSDictionary<NSString, NSObject> ProviderConfiguration { get; }
[Deprecated (PlatformName.iOS, 15,0, message: "Use the synchronoys 'Start' method instead..")]
[Deprecated (PlatformName.MacCatalyst, 12,0, message: "Use the synchronoys 'Start' method instead..")]
[Async]
[Export ("startWithCompletionHandler:")]
void Start (Action<NSError> completionHandler);
@ -2242,6 +2263,10 @@ namespace NetworkExtension {
[Export ("handleTimerEvent")]
void HandleTimerEvent ();
[NoWatch, NoTV, NoMac, iOS (15,0), MacCatalyst (15,0)]
[Export ("start")]
void Start ();
}
[NoWatch, NoTV, Mac (11,0), iOS (14,0)]
@ -2312,10 +2337,26 @@ namespace NetworkExtension {
void DidReceiveIncomingCall (NEAppPushManager manager, NSDictionary userInfo);
}
[Mac (11,0)]
[Mac (11,0), MacCatalyst (15,0)]
[NoiOS][NoTV][NoWatch]
[BaseType (typeof (NEAppProxyProvider))]
[DisableDefaultCtor] // `init` returns `nil`
interface NETransparentProxyProvider {
}
[NoWatch, NoTV, NoMac, iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof(NSObject), Name="NEPrivateLTENetwork")]
interface NEPrivateLteNetwork : NSCopying, NSSecureCoding
{
[Export ("mobileCountryCode")]
string MobileCountryCode { get; set; }
[Export ("mobileNetworkCode")]
string MobileNetworkCode { get; set; }
[NullAllowed]
[Export ("trackingAreaCode")]
string TrackingAreaCode { get; set; }
}
}

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

@ -207,6 +207,11 @@ namespace PassKit {
[Watch (6,2), iOS (13,4)]
[Export ("signData:withSecureElementPass:completion:")]
void SignData (NSData signData, PKSecureElementPass secureElementPass, PKPassLibrarySignDataCompletionHandler completion);
[Async (ResultTypeName = "PKServiceProviderDataCompletionResult")]
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[Export ("serviceProviderDataForSecureElementPass:completion:")]
void GetServiceProviderData (PKSecureElementPass secureElementPass, Action<NSData, NSError> completion);
}
[Static]
@ -345,6 +350,11 @@ namespace PassKit {
[Export ("paymentAuthorizationViewController:didRequestMerchantSessionUpdate:")]
[EventArgs ("PKPaymentRequestMerchantSessionUpdate")]
void DidRequestMerchantSessionUpdate (PKPaymentAuthorizationViewController controller, Action<PKPaymentRequestMerchantSessionUpdate> updateHandler);
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("paymentAuthorizationViewController:didChangeCouponCode:handler:")]
[EventArgs ("PKPaymentRequestCouponCodeUpdate")]
void DidChangeCouponCode (PKPaymentAuthorizationViewController controller, string couponCode, Action<PKPaymentRequestCouponCodeUpdate> completion);
}
[Mac (11,0)]
@ -416,6 +426,11 @@ namespace PassKit {
[NullAllowed] // by default this property is null
[Export ("detail")]
string Detail { get; set; }
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[NullAllowed]
[Export ("dateComponentsRange", ArgumentSemantic.Copy)]
PKDateComponentsRange DateComponentsRange { get; set; }
}
[Watch (3,0)]
@ -446,6 +461,19 @@ namespace PassKit {
[Export ("currencyCode")]
string CurrencyCode { get; set; }
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("supportsCouponCode")]
bool SupportsCouponCode { get; set; }
[NullAllowed]
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("couponCode")]
string CouponCode { get; set; }
[Watch (8,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("shippingContactEditingMode", ArgumentSemantic.Assign)]
PKShippingContactEditingMode ShippingContactEditingMode { get; set; }
[NoMac]
[Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'RequiredBillingContactFields' instead.")]
[Deprecated (PlatformName.iOS, 11,0, message: "Use 'RequiredBillingContactFields' instead.")]
@ -548,6 +576,16 @@ namespace PassKit {
[Static]
[Export ("paymentShippingAddressUnserviceableErrorWithLocalizedDescription:")]
NSError CreatePaymentShippingAddressUnserviceableError ([NullAllowed] string localizedDescription);
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Static]
[Export ("paymentCouponCodeInvalidErrorWithLocalizedDescription:")]
NSError GetCouponCodeInvalidError ([NullAllowed] string localizedDescription);
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Static]
[Export ("paymentCouponCodeExpiredErrorWithLocalizedDescription:")]
NSError GetCouponCodeExpiredError ([NullAllowed] string localizedDescription);
}
[Mac (11,0)]
@ -1141,6 +1179,10 @@ namespace PassKit {
[Export ("paymentAuthorizationController:didRequestMerchantSessionUpdate:")]
void DidRequestMerchantSessionUpdate (PKPaymentAuthorizationController controller, Action<PKPaymentRequestMerchantSessionUpdate> handler);
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("paymentAuthorizationController:didChangeCouponCode:handler:")]
void DidChangeCouponCode (PKPaymentAuthorizationController controller, string couponCode, Action<PKPaymentRequestCouponCodeUpdate> completion);
[Watch (7,0)][iOS (14,0)]
[MacCatalyst (14,0)]
[Export ("presentationWindowForPaymentAuthorizationController:")]
@ -1171,7 +1213,7 @@ namespace PassKit {
[Mac (11,0)]
[Watch (4,3), iOS (11,3)]
[BaseType (typeof (NSObject))]
[BaseType (typeof (PKStoredValuePassProperties))]
[DisableDefaultCtor]
interface PKTransitPassProperties {
@ -1180,9 +1222,17 @@ namespace PassKit {
[return: NullAllowed]
PKTransitPassProperties GetPassProperties (PKPass pass);
[Deprecated (PlatformName.iOS, 15, 0)]
[Deprecated (PlatformName.WatchOS, 8, 0)]
[Deprecated (PlatformName.MacOSX, 12, 0)]
[Deprecated (PlatformName.MacCatalyst, 15, 0)]
[Export ("transitBalance", ArgumentSemantic.Copy)]
NSDecimalNumber TransitBalance { get; }
[Deprecated (PlatformName.iOS, 15, 0)]
[Deprecated (PlatformName.WatchOS, 8, 0)]
[Deprecated (PlatformName.MacOSX, 12, 0)]
[Deprecated (PlatformName.MacCatalyst, 15, 0)]
[Export ("transitBalanceCurrencyCode")]
string TransitBalanceCurrencyCode { get; }
@ -1192,6 +1242,7 @@ namespace PassKit {
[Deprecated (PlatformName.iOS, 14,5, message: "Use 'Blocked' instead.")]
[Deprecated (PlatformName.MacCatalyst, 14,5, message: "Use 'Blocked' instead.")]
[Deprecated (PlatformName.WatchOS, 7,4, message: "Use 'Blocked' instead.")]
[Deprecated (PlatformName.MacOSX, 11,3, message: "Use 'Blocked' instead.")]
[Export ("blacklisted")]
bool Blacklisted { [Bind ("isBlacklisted")] get; }
@ -1244,6 +1295,8 @@ namespace PassKit {
[Export ("blacklisted")]
[Deprecated (PlatformName.iOS, 14,5, message: "Use 'Blocked' instead.")] // exists in base class
[Deprecated (PlatformName.WatchOS, 7,4, message: "Use 'Blocked' instead.")]
[Deprecated (PlatformName.MacOSX, 11,3, message: "Use 'Blocked' instead.")]
[Deprecated (PlatformName.MacCatalyst, 14,5, message: "Use 'Blocked' instead.")]
bool Blacklisted { [Bind ("isBlacklisted")] get; }
}
@ -1278,6 +1331,10 @@ namespace PassKit {
[Export ("paymentSummaryItems", ArgumentSemantic.Copy)]
PKPaymentSummaryItem[] PaymentSummaryItems { get; set; }
[Watch (8,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("shippingMethods", ArgumentSemantic.Copy)]
PKShippingMethod[] ShippingMethods { get; set; }
}
[Mac (11,0)]
@ -1569,6 +1626,10 @@ namespace PassKit {
[Export ("initWithProvisioningCredentialIdentifier:cardConfigurationIdentifier:sharingInstanceIdentifier:passThumbnailImage:ownerDisplayName:localizedDescription:")]
IntPtr Constructor (string credentialIdentifier, string cardConfigurationIdentifier, string sharingInstanceIdentifier, CGImage passThumbnailImage, string ownerDisplayName, string localizedDescription);
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[Export ("initWithProvisioningCredentialIdentifier:sharingInstanceIdentifier:passThumbnailImage:ownerDisplayName:localizedDescription:accountHash:templateIdentifier:relyingPartyIdentifier:requiresUnifiedAccessCapableDevice:")]
IntPtr Constructor (string credentialIdentifier, string sharingInstanceIdentifier, CGImage passThumbnailImage, string ownerDisplayName, string localizedDescription, string accountHash, string templateIdentifier, string relyingPartyIdentifier, bool requiresUnifiedAccessCapableDevice);
[Export ("credentialIdentifier", ArgumentSemantic.Strong)]
string CredentialIdentifier { get; }
@ -1586,6 +1647,22 @@ namespace PassKit {
[Export ("ownerDisplayName", ArgumentSemantic.Strong)]
string OwnerDisplayName { get; }
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[Export ("accountHash", ArgumentSemantic.Strong)]
string AccountHash { get; }
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[Export ("templateIdentifier", ArgumentSemantic.Strong)]
string TemplateIdentifier { get; }
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[Export ("relyingPartyIdentifier", ArgumentSemantic.Strong)]
string RelyingPartyIdentifier { get; }
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[Export ("requiresUnifiedAccessCapableDevice")]
bool RequiresUnifiedAccessCapableDevice { get; }
}
[NoWatch, NoTV]
@ -1858,6 +1935,23 @@ namespace PassKit {
PKPaymentMerchantSession Session { get; set; }
}
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof(PKPaymentRequestUpdate))]
[DisableDefaultCtor]
interface PKPaymentRequestCouponCodeUpdate
{
[Export ("initWithPaymentSummaryItems:")]
[DesignatedInitializer]
IntPtr Constructor (PKPaymentSummaryItem[] paymentSummaryItems);
[Export ("initWithErrors:paymentSummaryItems:shippingMethods:")]
[DesignatedInitializer]
IntPtr Constructor ([NullAllowed] NSError[] errors, PKPaymentSummaryItem[] paymentSummaryItems, PKShippingMethod[] shippingMethods);
[NullAllowed, Export ("errors", ArgumentSemantic.Copy)]
NSError[] Errors { get; set; }
}
[Watch (7,0)][Mac (11,0)][iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
@ -1873,4 +1967,105 @@ namespace PassKit {
Nfc = 1 << 0,
Bluetooth = 1 << 1,
}
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface PKDateComponentsRange : NSCopying, NSSecureCoding
{
[Export ("initWithStartDateComponents:endDateComponents:")]
[return: NullAllowed]
IntPtr Constructor (NSDateComponents startDateComponents, NSDateComponents endDateComponents);
[Export ("startDateComponents", ArgumentSemantic.Copy)]
NSDateComponents StartDateComponents { get; }
[Export ("endDateComponents", ArgumentSemantic.Copy)]
NSDateComponents EndDateComponents { get; }
}
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[BaseType (typeof(PKPaymentSummaryItem))]
[DisableDefaultCtor]
interface PKDeferredPaymentSummaryItem
{
[Export ("deferredDate", ArgumentSemantic.Copy)]
NSDate DeferredDate { get; set; }
}
[Watch (8,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Native]
public enum PKShippingContactEditingMode : ulong
{
Enabled = 1,
StorePickup,
}
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[BaseType (typeof(PKPaymentSummaryItem))]
[DisableDefaultCtor]
interface PKRecurringPaymentSummaryItem
{
[NullAllowed, Export ("startDate", ArgumentSemantic.Copy)]
NSDate StartDate { get; set; }
[Export ("intervalUnit", ArgumentSemantic.Assign)]
NSCalendarUnit IntervalUnit { get; set; }
[Export ("intervalCount")]
nint IntervalCount { get; set; }
[NullAllowed, Export ("endDate", ArgumentSemantic.Copy)]
NSDate EndDate { get; set; }
}
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
public enum PKStoredValuePassBalanceType
{
[Field ("PKStoredValuePassBalanceTypeCash")]
Cash,
[Field ("PKStoredValuePassBalanceTypeLoyaltyPoints")]
LoyaltyPoints,
}
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface PKStoredValuePassBalance
{
[Export ("amount", ArgumentSemantic.Strong)]
NSDecimalNumber Amount { get; }
[NullAllowed, Export ("currencyCode")]
string CurrencyCode { get; }
[Export ("balanceType")]
string BalanceType { get; }
[NullAllowed, Export ("expiryDate", ArgumentSemantic.Strong)]
NSDate ExpiryDate { get; }
[Export ("isEqualToBalance:")]
bool IsEqual (PKStoredValuePassBalance balance);
}
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)]
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
interface PKStoredValuePassProperties
{
[Static]
[Export ("passPropertiesForPass:")]
[return: NullAllowed]
PKStoredValuePassProperties GetPassProperties (PKPass pass);
[Export ("blocked")]
bool Blocked { [Bind ("isBlocked")] get; }
[NullAllowed, Export ("expirationDate", ArgumentSemantic.Copy)]
NSDate ExpirationDate { get; }
[Export ("balances", ArgumentSemantic.Copy)]
PKStoredValuePassBalance[] Balances { get; }
}
}

1316
src/phase.cs Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -118,6 +118,10 @@ namespace QuickLookThumbnailing {
[NoiOS]
[Export ("NSImage", ArgumentSemantic.Strong)]
NSImage NSImage { get; }
[Mac (12, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("contentRect")]
CGRect ContentRect { get; }
}
}
@ -141,6 +145,11 @@ namespace QuickLookThumbnailing {
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface QLThumbnailReply {
[Mac (12, 0), iOS (15, 0), MacCatalyst (15, 0)]
[Export ("extensionBadge")]
string ExtensionBadge { get; set; }
[Static]
[Export ("replyWithContextSize:drawingBlock:")]
QLThumbnailReply CreateReply (CGSize contextSize, Func<CGContext, bool> drawingBlock);

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

@ -160,6 +160,13 @@ namespace SceneKit {
[Export ("removeAllAnimations")]
void RemoveAllAnimations ();
#if XAMCORE_4_0
[Abstract]
#endif
[Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("removeAllAnimationsWithBlendOutDuration:")]
void RemoveAllAnimationsWithBlendOutDuration (nfloat duration);
[Abstract]
[Export ("removeAnimationForKey:")]
void RemoveAnimation (NSString key);
@ -3991,6 +3998,11 @@ namespace SceneKit {
[Wrap ("WeakShaderModifiers")]
SCNShaderModifiers ShaderModifiers { get; set; }
[Mac (12,0), iOS (15,0), TV (15,0), Watch (8,0)]
[NullAllowed] // by default this property is null
[Export ("minimumLanguageVersion", ArgumentSemantic.Retain)]
NSNumber MinimumLanguageVersion { get; set; }
[NoWatch]
[NullAllowed] // by default this property is null
[Export ("program", ArgumentSemantic.Retain)]
@ -4865,6 +4877,11 @@ namespace SceneKit {
[Export ("fresnelExponent")]
nfloat FresnelExponent { get; set; }
[Introduced (PlatformName.MacCatalyst, 15, 0)]
[Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0)]
[Export ("writesToDepthBuffer")]
bool WritesToDepthBuffer { get; set; }
[Export ("propertyControllers", ArgumentSemantic.Copy), NullAllowed]
NSDictionary WeakPropertyControllers { get; set; }

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

@ -12,13 +12,7 @@ using AVFoundation;
using CoreML;
using Foundation;
using ObjCRuntime;
// TODO: Remove when CoreMedia is enabled on watchOS
#if WATCH
using CMTimeRange = Foundation.NSObject;
#else
using CoreMedia;
#endif
namespace SoundAnalysis {
@ -33,6 +27,14 @@ namespace SoundAnalysis {
InvalidFile,
}
[Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Native]
public enum SNTimeDurationConstraintType : long
{
Enumerated = 1,
Range = 2,
}
[Watch (6, 0), TV (13, 0), Mac (10, 15), iOS (13, 0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
@ -111,6 +113,11 @@ namespace SoundAnalysis {
[Export ("timeRange")]
CMTimeRange TimeRange { get; }
[Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("classificationForIdentifier:")]
[return: NullAllowed]
SNClassification GetClassification (string identifier);
}
[Watch (6, 0), TV (13, 0), Mac (10, 15), iOS (13, 0)]
@ -123,6 +130,22 @@ namespace SoundAnalysis {
[Export ("initWithMLModel:error:")]
IntPtr Constructor (MLModel mlModel, [NullAllowed] out NSError error);
[Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("initWithClassifierIdentifier:error:")]
IntPtr Constructor (string classifierIdentifier, [NullAllowed] out NSError error);
[Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("knownClassifications", ArgumentSemantic.Copy)]
string[] KnownClassifications { get; }
[Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("windowDuration", ArgumentSemantic.Assign)]
CMTime WindowDuration { get; set; }
[Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("windowDurationConstraint", ArgumentSemantic.Strong)]
SNTimeDurationConstraint WindowDurationConstraint { get; }
}
interface ISNRequest {}
@ -153,4 +176,32 @@ namespace SoundAnalysis {
[Export ("requestDidComplete:")]
void DidComplete (ISNRequest request);
}
[iOS (15,0), Mac (12,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
enum SNClassifierIdentifier {
[Field ("SNClassifierIdentifierVersion1")]
Version1,
}
[Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SNTimeDurationConstraint /* privately conforms to NSCoding, NSCopying, and NSSecureCoding */
{
[Export ("initWithEnumeratedDurations:")]
IntPtr Constructor ([BindAs (typeof (CMTime[]))] NSValue[] enumeratedDurations);
[Export ("initWithDurationRange:")]
IntPtr Constructor (CMTimeRange durationRange);
[Export ("type", ArgumentSemantic.Assign)]
SNTimeDurationConstraintType Type { get; }
[return: BindAs (typeof (CMTime[]))]
[Export ("enumeratedDurations", ArgumentSemantic.Strong)]
NSValue[] EnumeratedDurations { get; }
[Export ("durationRange", ArgumentSemantic.Assign)]
CMTimeRange DurationRange { get; }
}
}

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

@ -15973,6 +15973,7 @@ namespace UIKit {
[Export ("unwindAction")]
Selector UnwindAction { get; }
[NullAllowed]
[Export ("sender")]
NSObject Sender { get; }
}

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

@ -186,7 +186,7 @@ logdev:
$(MTOUCH) --logdev
$(UNIT_SERVER): $(wildcard $(UNIT_SERVER_DIR)/*.cs)
(cd $(UNIT_SERVER_DIR) && $(SYSTEM_MSBUILD))
(cd $(UNIT_SERVER_DIR) && $(SYSTEM_MSBUILD) /bl)
build-test-libraries:
@$(MAKE) -C $(TOP)/tests/test-libraries
@ -209,7 +209,7 @@ $(TOP)/tools/common/SdkVersions.cs: $(TOP)/tools/common/SdkVersions.cs.in
@touch $@
xharness/xharness.exe: $(xharness_dependencies) test.config test-system.config .stamp-src-project-files $(TOP)/tools/common/SdkVersions.cs
$(Q_GEN) $(SYSTEM_MSBUILD) /restore $(MSBUILD_VERBOSITY_QUIET) xharness/xharness.csproj
$(Q_GEN) $(SYSTEM_MSBUILD) "/bl:$@.binlog" /restore $(MSBUILD_VERBOSITY_QUIET) xharness/xharness.csproj
xharness/xharness.csproj.inc: export BUILD_VERBOSITY=$(XBUILD_VERBOSITY)
xharness/xharness.csproj.inc: export ABSOLUTE_PATHS=1
-include xharness/xharness.csproj.inc
@ -223,11 +223,11 @@ NUNIT_MSBUILD_DIR=$(TOP)/packages/NUnit.Runners.2.6.4/tools/lib
test-ios-tasks: test-macdev-tests test-macdev-tasks
test-macdev-tests: verify-system-vsmac-xcode-match
$(SYSTEM_MSBUILD) $(TOP)/tests/msbuild/Xamarin.MacDev.Tests/Xamarin.MacDev.Tests.csproj /p:Configuration=Debug /r
$(SYSTEM_MSBUILD) "/bl:$@.binlog" $(TOP)/tests/msbuild/Xamarin.MacDev.Tests/Xamarin.MacDev.Tests.csproj /p:Configuration=Debug /r
cd $(TOP)/tests/msbuild/Xamarin.MacDev.Tests && $(SYSTEM_XIBUILD) -t -- $(abspath $(TOP)/tools/nunit3-console-3.11.1) $(abspath $(TOP)/tests/msbuild/Xamarin.MacDev.Tests/bin/Debug/net472/Xamarin.MacDev.Tests.dll) "--result=$(abspath $(CURDIR)/TestResults_Xamarin.MacDev.Tests.xml);format=nunit2" -labels=Before $(TEST_FIXTURE)
test-macdev-tasks: verify-system-vsmac-xcode-match
$(SYSTEM_MSBUILD) $(TOP)/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj /p:Configuration=Debug /r
$(SYSTEM_MSBUILD) "/bl:$@.binlog" $(TOP)/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj /p:Configuration=Debug /r
cd $(TOP)/tests/msbuild/Xamarin.MacDev.Tasks.Tests && $(SYSTEM_XIBUILD) -t -- $(abspath $(TOP)/tools/nunit3-console-3.11.1) $(abspath $(TOP)/tests/msbuild/Xamarin.MacDev.Tasks.Tests/bin/Debug/net472/Xamarin.MacDev.Tasks.Tests.dll) "--result=$(abspath $(CURDIR)/TestResults_Xamarin.MacDev.Tasks.Tests.xml)" -labels=Before $(TEST_FIXTURE)
test-install-sources:

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

@ -102,6 +102,11 @@ namespace Xamarin.Tests
return GetBuildMessages (path).Where (v => v.Type == BuildLogEventType.Warning);
}
public static IEnumerable<BuildLogEvent> GetBuildLogErrors (string path)
{
return GetBuildMessages (path).Where (v => v.Type == BuildLogEventType.Error);
}
public static IEnumerable<BuildLogEvent> GetBuildMessages (string path)
{
var reader = new BinLogReader ();

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

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is not processed by xharness, and contains logic shared by all our test suites -->
<Project>
<!-- Logic for iOS -->
<PropertyGroup Condition="$(TargetFramework.EndsWith('-ios'))">
<AssetTargetFallback>xamarinios10;$(AssetTargetFallback)</AssetTargetFallback>
</PropertyGroup>
<ItemGroup Condition="'$(_PlatformName)' == 'iOS'">
<PackageReference Include="MonoTouch.Dialog" Version="2.0.0-pre1" />
</ItemGroup>
<!-- Logic for tvOS -->
<PropertyGroup Condition="$(TargetFramework.EndsWith('-tvos'))">
<DefineConstants>$(DefineConstants);XAMCORE_3_0</DefineConstants>
<AssetTargetFallback>xamarintvos10;$(AssetTargetFallback)</AssetTargetFallback>
</PropertyGroup>
<ItemGroup Condition="$(TargetFramework.EndsWith('-tvos'))">
<PackageReference Include="MonoTouch.Dialog" Version="2.0.0-pre1" />
</ItemGroup>
<!-- Logic for macOS -->
<PropertyGroup Condition="$(TargetFramework.EndsWith('-macos'))">
<DefineConstants>$(DefineConstants);MONOMAC</DefineConstants>
</PropertyGroup>
<!-- Logic for Mac Catalyst -->
<PropertyGroup Condition="$(TargetFramework.EndsWith('-maccatalyst'))">
<AssetTargetFallback>xamarinios10;$(AssetTargetFallback)</AssetTargetFallback>
</PropertyGroup>
<!-- Logic for all test suites -->
</Project>

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

@ -566,6 +566,32 @@ namespace Xamarin.Tests {
Assert.That (createdump, Does.Exist, "createdump existence");
}
[Test]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64")]
public void AbsoluteOutputPath (ApplePlatform platform, string runtimeIdentifiers)
{
var project = "MySimpleApp";
Configuration.IgnoreIfIgnoredPlatform (platform);
var outputPath = Cache.CreateTemporaryDirectory ();
var project_path = GetProjectPath (project, platform: platform);
Clean (project_path);
var properties = new Dictionary<string, string> (verbosity);
var multiRid = runtimeIdentifiers.IndexOf (';') >= 0 ? "RuntimeIdentifiers" : "RuntimeIdentifier";
properties [multiRid] = runtimeIdentifiers;
properties ["OutputPath"] = outputPath + "/";
var rv = DotNet.AssertBuild (project_path, properties);
AssertThatLinkerExecuted (rv);
var appPathRuntimeIdentifier = runtimeIdentifiers.IndexOf (';') >= 0 ? "" : runtimeIdentifiers;
var appPath = Path.Combine (outputPath, project + ".app");
var appExecutable = Path.Combine (appPath, "Contents", "MacOS", Path.GetFileNameWithoutExtension (project_path));
Assert.That (appExecutable, Does.Exist, "There is an executable");
if (!(runtimeIdentifiers == "osx-arm64" && RuntimeInformation.ProcessArchitecture == Architecture.X64))
ExecuteWithMagicWordAndAssert (appExecutable);
}
void ExecuteWithMagicWordAndAssert (string executable)
{
var magicWord = Guid.NewGuid ().ToString ();

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

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using NUnit.Framework;
using Xamarin.Utils;
using Microsoft.Build.Framework;
using Microsoft.Build.Logging.StructuredLogger;
namespace Xamarin.Tests {
public class TemplateProjectTest : TestBaseClass {
const string EmptyAppManifest =
@"<?xml version=""1.0"" encoding=""UTF-8""?>
<!DOCTYPE plist PUBLIC ""-//Apple//DTD PLIST 1.0//EN"" ""http://www.apple.com/DTDs/PropertyList-1.0.dtd"">
<plist version=""1.0"">
<dict>
<key>CFBundleIdentifier</key>
<string>ID</string>
</dict>
</plist>";
const string EmptyMainFile =
@"using System;
using Foundation;
class MainClass {
static void Main ()
{
Console.WriteLine (typeof (NSObject));
}
}
";
[TestCase (ApplePlatform.MacOSX)]
public void CreateAppBundleDependsOnTest (ApplePlatform platform)
{
var magic = Guid.NewGuid ().ToString ();
var csproj = $@"<Project Sdk=""Microsoft.NET.Sdk"">
<PropertyGroup>
<TargetFramework>{platform.ToFramework ()}</TargetFramework>
<OutputType>Exe</OutputType>
<CreateAppBundleDependsOn>FailTheBuild;$(CreateAppBundleDependsOn)</CreateAppBundleDependsOn>
</PropertyGroup>
<Target Name=""FailTheBuild"">
<Error Text=""{magic}"" />
</Target>
</Project>";
var tmpdir = Cache.CreateTemporaryDirectory ();
Configuration.CopyDotNetSupportingFiles (tmpdir);
var project_path = Path.Combine (tmpdir, "TestProject.csproj");
File.WriteAllText (project_path, csproj);
File.WriteAllText (Path.Combine (tmpdir, "Info.plist"), EmptyAppManifest);
File.WriteAllText (Path.Combine (tmpdir, "Main.cs"), EmptyMainFile);
var properties = new Dictionary<string, string> (verbosity);
var result = DotNet.AssertBuildFailure (project_path, properties);
var errors = BinLog.GetBuildLogErrors (result.BinLogPath);
Assert.That (errors, Has.Some.Matches<BuildLogEvent> (v => v.Message.Contains (magic)), "Expected error");
}
}
}

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

@ -393,7 +393,7 @@ namespace Introspection {
}
[Test]
#if IOS || TVOS
#if IOS || TVOS || __MACCATALYST__
[Ignore ("work in progress")]
#endif
public void LegacyAttributes ()

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

@ -271,7 +271,7 @@ namespace Introspection
// it's not complete (there's many more SDK assemblies) but we cannot add all of them into a single project anyway
[Test]
#if __MACCATALYST__
#if __MACCATALYST__ && !NET
[Ignore ("https://github.com/xamarin/xamarin-macios/issues/10883")]
#endif
public void Corlib ()
@ -282,7 +282,7 @@ namespace Introspection
}
[Test]
#if __MACCATALYST__
#if __MACCATALYST__ && !NET
[Ignore ("https://github.com/xamarin/xamarin-macios/issues/10883")]
#endif
public void System ()
@ -293,7 +293,7 @@ namespace Introspection
}
[Test]
#if __MACCATALYST__
#if __MACCATALYST__ && !NET
[Ignore ("https://github.com/xamarin/xamarin-macios/issues/10883")]
#endif
public void SystemCore ()

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

@ -129,6 +129,10 @@ namespace Introspection {
return true;
// Xcode 13
case "HKVerifiableClinicalRecord":
case "PKDeferredPaymentSummaryItem":
case "PKRecurringPaymentSummaryItem":
case "PKStoredValuePassProperties":
case "SNTimeDurationConstraint": // Conformance not in headers
return true;
}
break;
@ -250,6 +254,13 @@ namespace Introspection {
return true;
// Xcode 12.5
case "GCDualSenseGamepad":
// Xcode 13
case "PKDeferredPaymentSummaryItem":
case "PKPaymentRequestCouponCodeUpdate":
case "PKRecurringPaymentSummaryItem":
case "PKStoredValuePassBalance":
case "PKStoredValuePassProperties":
case "SNTimeDurationConstraint": // Conformance not in headers
return true;
}
break;
@ -367,6 +378,13 @@ namespace Introspection {
return true;
// Xcode 12.5
case "GCDualSenseGamepad":
// xcode 13
case "PKDeferredPaymentSummaryItem":
case "PKPaymentRequestCouponCodeUpdate":
case "PKRecurringPaymentSummaryItem":
case "PKStoredValuePassBalance":
case "PKStoredValuePassProperties":
case "SNTimeDurationConstraint": // Conformance not in headers
return true;
}
break;

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

@ -835,6 +835,11 @@ namespace Introspection {
break;
}
break;
case "NSTask":
// category, NSTask won't respond -> @interface NSTask (NSTaskConveniences)
if (selectorName == "waitUntilExit")
return true;
break;
}
// old binding mistake
@ -1063,6 +1068,10 @@ namespace Introspection {
case "initWithDataIgnoringOrientation:":
var mi = m as MethodInfo;
return mi != null && !mi.IsPublic && mi.ReturnType.Name == "IntPtr";
// NSAppleEventDescriptor
case "initListDescriptor":
case "initRecordDescriptor":
return true;
default:
return false;
}

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

@ -155,11 +155,6 @@ namespace Introspection {
// compat.
return true;
#endif
case "waitUntilExit":
// category, NSTask won't respond -> @interface NSTask (NSTaskConveniences)
if (type.Name == "NSTask")
return true;
break;
case "readInBackgroundAndNotifyForModes:":
case "readInBackgroundAndNotify":
case "readToEndOfFileInBackgroundAndNotifyForModes:":
@ -1283,9 +1278,6 @@ namespace Introspection {
// QTMovie
case "movieWithTimeRange:error:":
case "initWithQuickTimeMedia:error:":
// NSAppleEventDescriptor
case "initListDescriptor":
case "initRecordDescriptor":
// NSAnimation
case "initWithDuration:animationCurve:":
return true;

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

@ -19,6 +19,13 @@ namespace Introspection {
protected override bool Skip (Type type)
{
switch (type.Namespace) {
case "Phase": // missing in the sim
if (Runtime.Arch == Arch.SIMULATOR)
return true;
break;
}
// While the following types are categories and contains a class_ptr
// they are not used at all as extensions since they are just used to expose
// static properties.

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