Граф коммитов

5084 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 6fdec1259d [tests] Add tests for CompileAppManifest and ReadAppManifest. 2021-08-24 14:41:20 +02:00
Rolf Bjarne Kvinge 197b564c21 Merge remote-tracking branch 'origin/main' into darc-main-971a17ce-2b67-4dbe-bb13-8308d33e5f58 2021-08-24 07:26:26 +02:00
Rolf Bjarne Kvinge 3e728faa77 [tests] Update tests that use HttpClientHandler to get matching behavior with legacy Xamarin. 2021-08-24 07:26:19 +02:00
Rachel Kang a7ed18a19a
Fix VNUtilsTests 2021-08-23 14:48:32 -04:00
Rolf Bjarne Kvinge b3dff34ea5 [msbuild] Rework how the app manifest is created.
How we create the app manifest (Info.plist) has to be modified so that we can add
support for getting all the values from MSBuild properties (i.e. no Info.plist in
the project), as well as having multiple partial app manifests as well, that gets
merged into the final app manifest.

Here's the new process:

1. The user can specify values in multiple ways:

    * An Info.plist in their project file (by using a `None` item with
      filename "Info.plist" or with a `Link` metadata with filename
      "Info.plist"). We figure this out in the DetectAppManifest target.
    * A partial plist in their project (using the `PartialAppManifest` item group)
    * Some MSBuild properties can also add values.

    The precedence is: MSBuild properties can be overridden by the Info.plist,
    which can be overridden by a partial plist.

2. In the `CompileAppManifest` target we get all the inputs from above, and compute
a temporary app manifest, which is written to a temporary output file.

3. In the `ReadAppManifest` target, we read the temporary output file and outputs
numerous MSBuild properties (most of then private)

4. We run other targets that may add more entries to the final app manifest (these
tasks might depend on the values from `ReadAppManifest`). These entries are written
to partial plists, and added to the _PostCompilePartialAppManifest item group.

   The targets in question are:

	* _CompileImageAssets * _CompileCoreMLModels

5. In the new `WriteAppManifest` target, we read the temporary output file from `ReadAppManifest`
+ any `_PartialAppManfiest` items and merge them all together to get the final Info.plist.

This also required moving the computation of CFBundleIdentifier from the DetectSigningIdentity
task to the CompileAppManifest task. This also meant reordering these two tasks,
so that the DetectSigningIdentity task is executed after the CompileAppManifest task
(technically after the ReadAppManifest task), because the DetectSigningIdentity task
needs to know the bundle identifier.

This way we can handle multiple scenarios easily (most of this is not covered by
these changes, and will be implemented separately):

* No Info.plist at all, all non-default values come from MSBuild properties.
* A single Info.plist, where everything is specified.
* An Info.plist with multiple partial app manifests as well.
2021-08-23 17:46:33 +02:00
Rolf Bjarne Kvinge 4f5e2c507e
[tests] Move deletion of existing temporary directory to the background. (#12511)
Improve Cache.CreateTemporaryDirectory to move the deletion of the previous
root temporary directory to a background thread. In some cases this directory
can have a lot of files and directories, and deleting it synchronously can
cause a significant startup delay when running tests locally.
2021-08-23 16:45:06 +02:00
Rolf Bjarne Kvinge 1175a13a54
[xharness] Move loading old test results into the background. (#12512)
At startup, we load old test results that may exist on disk. However, this may
take a while, especially since the disk is usually quite busy already with
everything else we do at startup, so don't wait for this to finish before
displaying the UI.
2021-08-23 15:47:02 +02:00
Rolf Bjarne Kvinge 8321879461
[xharness] Remove debug lock. (#12510)
This accidentally snuck in.
2021-08-23 15:45:02 +02:00
Rolf Bjarne Kvinge e2eed27a1f
[monotouch-test] Ignore several HttpMessageTest test cases in CI in case of network failures. (#12509)
Fixes https://github.com/xamarin/maccore/issues/2160.
Fixes https://github.com/xamarin/maccore/issues/2491.
Fixes https://github.com/xamarin/maccore/issues/2493.
Fixes https://github.com/xamarin/maccore/issues/2304.
2021-08-23 15:37:02 +02:00
Rolf Bjarne Kvinge e3cac56a70
[tools] Pass the right arguments to the AOT compiler for Mac Catalyst. Fixes #12484. (#12498)
* [xharness] Add LLVM test case for Mac Catalyst.

* [tests] Add make target to build monotouch-test using LLVM on Mac Catalyst.

* [tools] Pass the right arguments to the AOT compiler for Mac Catalyst. Fixes #12484.

Mac Catalyst is just special.

Fixes https://github.com/xamarin/xamarin-macios/issues/12484.
2021-08-23 09:47:27 +02:00
Rolf Bjarne Kvinge fbbaa96cba
[msbuild] Both the CompileProductDefinition and the CreateInstaller tasks must take the final app manifest as input. (#12483)
Both the CompileProductDefinition and the CreateInstaller tasks must take the
final app manifest as input, because there may now be multiple input manifests
(or one day none at all), and the final app manifest is the only version that
is guaranteed to exist and contain everything.
2021-08-23 09:19:25 +02:00
Rachel Kang 34a4d0d49c
[AudioToolbox] Update bindings for Xcode 13.0 beta 1,3,4,5 (#12491) 2021-08-20 16:17:28 -04:00
Rolf Bjarne Kvinge 2d4b68bdaa
[src] Augment the Native attribute to support custom conversion functions. Fixes #12111. (#12488)
Augment the Native attribute for enums to support custom conversion functions between
native values and managed values for enums. This makes it possible to have different
values in managed code for an enum compared to native code.

This is necessary to support different native enum values based on the architecture,
because in a few cases Apple has different enum values between x86_64 and ARM64.
Enum values are constants in managed code, and without this support it would be impossible
to translate these correctly to native code.

The updated Native attribute supports two new fields: ConvertToNative and ConvertToManaged,
which are managed functions of a specific signature that the generator will emit
calls to whenever needed to do the appropriate conversion.

Fixes https://github.com/xamarin/xamarin-macios/issues/12111.
2021-08-20 15:38:08 +02:00
Rolf Bjarne Kvinge 6f9a8ebbbd
[msbuild] Rename the GetMinimumOSVersion task to ReadAppManifest and make it read more properties from the app manifest. (#12485)
* Read CFBundleDisplayName and CFBundleVersion and use them in the
  _CompileITunesMetadata task.

* Read numerous other app manifest values and pass them to the ACTool and
  IBTool tasks.

This makes it possible to not parse the Info.plist in these tasks, which will
become more complicated in the future, when we might either not have an
Info.plist, or have many partial ones.

Also enable nullability.
2021-08-20 09:54:59 +02:00
Rolf Bjarne Kvinge d3c9f4b1b6
[dotnet] Make CoreCLR the only option for macOS. Fixes #12477. (#12480)
* [dotnet] Make CoreCLR the default for macOS.

* [dotnet] Show an error if trying to use MonoVM on macOS.

Fixes https://github.com/xamarin/xamarin-macios/issues/12477.

* [xharness] Remove CoreCLR variations for macOS tests.

The default is using CoreCLR for macOS, so having a specific variation for it
doesn't make sense.

* [tests] Adjust linker tests to work on CoreCLR as well.
2021-08-20 09:53:40 +02:00
Rachel Kang cd3178c112
Update based on feedback 2021-08-19 12:13:25 -04:00
Manuel de la Pena 509b099da0
[VideoToolbox] Add support for Xcode13 beta5. (#12466)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-19 11:40:44 -04:00
Rolf Bjarne Kvinge 048bee7080
[generator] Simplify native enums logic. (#12473)
Instead of generating one native P/Invoke signature with an int parameter and
another with a long parameter for methods that take [Native] enums, generate a
single nint parameter (and the same for the unsigned version).

This simplifies both the generator code and the generated code. The generator
diff contains *a lot* of changes like this:

    -	if (IntPtr.Size == 8) {
    -		ret = (ARAppClipCodeUrlDecodingState) global::ObjCRuntime.Messaging.Int64_objc_msgSend (this.Handle, Selector.GetHandle ("urlDecodingState"));
    -	} else {
    -		ret = (ARAppClipCodeUrlDecodingState) global::ObjCRuntime.Messaging.int_objc_msgSend (this.Handle, Selector.GetHandle ("urlDecodingState"));
    -	}
    +	ret = (ARKit.ARAppClipCodeUrlDecodingState) (long) global::ObjCRuntime.Messaging.nint_objc_msgSend (this.Handle, Selector.GetHandle ("urlDecodingState"));

An unlinked Xamarin.iOS.dll is ~300kb smaller (once linked the difference
should be minimal though).

I also made the min/max detection logic (check for int32.MinValue/MaxValue and
convert to int64.MinValue/MaxValue) specific to ARCH_32, since we don't need
it in 64-bit code.
2021-08-19 16:59:07 +02:00
Jonathan Peppers 8d0c1c9031
[dotnet] use **FromWorkload** for targeting/runtime pack versions (#12449)
Context: https://github.com/dotnet/sdk/pull/19596
Context: https://github.com/xamarin/xamarin-android/pull/6184

If we use the version number string of `**FromWorkload**`, then our
runtime packages don't need to be resolved from a NuGet feed. They can
be resolved from the `dotnet/packs` directory.

This completely eliminates the need for a `NuGet.config` file when
building a .NET 6 app with a local build of xamarin-macios.

You will no longer need a feed such as:

    <add key="local-dotnet-feed" value="~/src/xamarin-macios/_build/nuget-feed" />

To further clean things up, I removed the need for:

* Any NuGet feed named `local-dotnet-feed`
* `$(DOTNET_FEED_DIR)`
* Generation of `dotnet/Workloads/NuGet.config`
2021-08-19 09:03:11 +02:00
Rolf Bjarne Kvinge 335d7575fc
[tests] Fix the build for link sdk tests on .NET/macOS. (#12475)
Fixes these errors:

    xamarin-macios/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs(1140,41): error CS0246: The type or namespace name 'NSApplication' could not be found (are you missing a using directive or an assembly reference?)
    xamarin-macios/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs(1156,4): error CS0103: The name 'NSApplication' does not exist in the current context
    xamarin-macios/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs(1157,4): error CS0103: The name 'NSApplication' does not exist in the current context
2021-08-19 07:49:40 +02:00
Rolf Bjarne Kvinge ab88892fd1
[dotnet] Update logic for default global namespaces and fix the templates. Fixes #12457. (#12471)
* Add 'ImplicitUsings=true' to all the templates.
* Make the implicit global namespaces C#-only.
* Add the implicit global namespaces to the 'Using' itemgroup instead of the
  'Import' itemgroup.
* Make sure the global namespaces are set from AutoImport.props, so that the
  user may remove any global namespace they don't want in their project file
  (by doing something like: `<Using Remove="Foundation" />`)

Ref: https://github.com/dotnet/sdk/issues/19521
Ref: https://github.com/dotnet/sdk/issues/19793

Fixes https://github.com/xamarin/xamarin-macios/issues/12457.
2021-08-19 07:47:03 +02:00
Rolf Bjarne Kvinge 243cc4019f
[xharness] Bump timeout for .NET tests again. (#12470)
We keep adding more and more test cases...
2021-08-18 19:27:43 +02:00
Manuel de la Pena e3bbec476e
[Xcode13] Add the todo for ThreadNetwork. (#12464) 2021-08-18 11:21:54 -04:00
Rolf Bjarne Kvinge ef61ab51f6
[tests] Add .NET version of link sdk for macOS. (#12462)
* [tests] Add .NET version of link sdk for macOS.

* [src] Add linker substitution files for macOS and Mac Catalyst.
2021-08-18 10:01:26 +02:00
dotnet-maestro[bot] 042968d4d4
[main] Update dependencies from dotnet/installer (#12357)
* Update dependencies from https://github.com/dotnet/installer build 20210805.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21405.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21404.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210806.3

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21406.3

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21405.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210807.3

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21407.3

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21405.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210807.8

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21407.8

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21405.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210808.2

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21408.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21405.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210809.11

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21409.11

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21409.3 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210811.2

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21411.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21410.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210811.31

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21411.31

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21411.3 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210812.16

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21412.16

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21412.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210814.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21414.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21413.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210814.5

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21414.5

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21413.1 (parent: Microsoft.Dotnet.Sdk.Internal

* [dotnet-linker] Bump to net6.0.

It doesn't build with net5.0 anymore:

    [...]xamarin-macios/tools/dotnet-linker/dotnet-linker.csproj : error NU1202: Package Microsoft.NET.ILLink 6.0.100-preview.6.21413.1 is not compatible with net5.0 (.NETCoreApp,Version=v5.0). Package Microsoft.NET.ILLink 6.0.100-preview.6.21413.1 supports: net6.0 (.NETCoreApp,Version=v6.0)
    make[2]: *** [Makefile:23: bin/Debug/net5.0/dotnet-linker.dll] Error 1
    make[2]: Leaving directory '[...]xamarin-macios/tools/dotnet-linker'
    make[1]: *** [../mk/subdirs.mk:18: all-recurse] Error 1
    make[1]: Leaving directory '[...]xamarin-macios/tools'

* Update dependencies from https://github.com/dotnet/installer build 20210815.2

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21415.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21413.1 (parent: Microsoft.Dotnet.Sdk.Internal

* [dotnet] Disable the template tests.

There were breaking changes upstream, but the path forward hasn't been defined
yet, so disable these tests.

Ref: https://github.com/xamarin/xamarin-macios/issues/12457

* Update dependencies from https://github.com/dotnet/installer build 20210816.45

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21416.45

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21413.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Update dependencies from https://github.com/dotnet/installer build 20210817.3

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21403.66 -> To Version 6.0.100-rc.1.21417.3

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21416.1 (parent: Microsoft.Dotnet.Sdk.Internal

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-18 09:36:03 +02:00
Manuel de la Pena 0b01c405f3
[Carplay] Add support for Xcode 13 beta 5 and fix catalyst attrs. (#12454) 2021-08-17 16:07:54 -04:00
TJ Lambert 264eabac12
[ShazamKit] Updates Xcode13 beta1 (#12189) 2021-08-17 11:02:55 -05:00
TJ Lambert 4469f6bf8a
[MailKit] Introducing in Xcode13 Beta 5 (#12405) 2021-08-17 11:01:03 -05:00
Rolf Bjarne Kvinge cd60fc7123
[tests] Add .NET version of link all for macOS. (#12436)
This also required changing some linker code to not have platform-specific conditional compilation,
because dotnet-linker is built only once for .NET (same binary for all platforms).
2021-08-17 16:39:43 +02:00
Rachel Kang cb1bfd64f3
[Vision] Update bindings for Xcode 13.0 beta 1 2021-08-17 10:04:29 -04:00
Manuel de la Pena 8f77e3350c
[PassKit] Add support for xcode13 beta 5. (#12456) 2021-08-17 09:59:33 -04:00
Manuel de la Pena 08eaaf9a31
[HealthKit] Add Xcode13 beta5 support. (#12453) 2021-08-17 09:57:29 -04:00
Rolf Bjarne Kvinge 716a5a7bd1
[msbuild] Add a property that specifies the final path to the Info.plist in the app bundle (#12433)
* Add an '_AppBundleManifest' property that specifies the final path to the
  Info.plist in the app bundle.
* Remove the '_AppBundleManifestPath' property, it's not used anywhere.
* Adjust the CompileAppManifest task to take the final path to the Info.plist,
  instead of computing it and returning it. This way the CompileAppManifest
  task does not output anything back into MSBuild (which is important, because
  the CompileAppManifest task won't execute if the output file is up-to-date,
  and if it's not executed, any output properties won't be set either).
2021-08-17 15:29:42 +02:00
Manuel de la Pena 32bd5ae97a
[CoreMotion] Add Xcode13 beta5 support. (#12448) 2021-08-16 20:52:02 -04:00
Manuel de la Pena c499a62ef5
[GameController] Add support for xcode 13 beta5. (#12445)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-16 17:48:37 -04:00
Manuel de la Pena 897a2baa75
Merge branch 'main' into xcode13.0-quicklookui-b1 2021-08-16 12:35:48 -04:00
Rolf Bjarne Kvinge e3969482a8
[msbuild] Unify the iOS and macOS versions of the IBTool task. (#12424)
* Have a single implementation of AutoActivateCustomFonts.
* Share the GetTargetDevices implementations between ACTool and IBTool, after removing
  a condition for Xcode 6.0 (which we don't support anymore, so that check could
  be removed) the implementations were identical.
2021-08-16 10:54:28 +02:00
Rolf Bjarne Kvinge 77a838ac70
[tests] Rework the bindings-test and fsharplibrary test projects to follow the pattern of the other .NET test projects. (#12431)
* [tests] Make fsharplibrary follow the pattern of the rest.

* [tests] Make bindings-test follow the pattern of the rest.
2021-08-14 08:09:10 +02:00
Rolf Bjarne Kvinge 874a6f93b6
[tests] Add .NET version of dont link for macOS. (#12432) 2021-08-13 22:49:03 +02:00
Rolf Bjarne Kvinge e0e7f0f4eb
[tests] Add/improve interdependent-binding-projects on .NET (#12429)
* [tests] Share project logic in the .NET version of interdependent-binding-projects.

* [tests] Make interdependent-binding-projects work on macOS.
2021-08-13 20:15:06 +02:00
Rachel Kang d8a9f40e79
Merge branch 'main' into xcode13.0-quicklookui-b1 2021-08-13 14:06:43 -04:00
Manuel de la Pena bd7e5c20c1
[Xcode13] Bump to beta 5. (#12413) 2021-08-13 13:07:19 -04:00
Rolf Bjarne Kvinge 706f18085d
[xharness] Show better error message (#12430) 2021-08-13 15:46:04 +02:00
Rolf Bjarne Kvinge 53f171eb4e
[Runtime] Ignore assemblies that aren't found at startup for macOS in .NET. Fixes #12341. (#12419)
We already ignore FileNotFoundExceptions for other platforms when looking for assemblies
to register at startup, so make macOS behave the same way.

Fixes https://github.com/xamarin/xamarin-macios/issues/12341.
2021-08-13 09:34:19 +02:00
Rolf Bjarne Kvinge 617b88e270
[introspection] Share the logic for .NET between all platforms. (#12409)
* Share the logic for .NET between all platforms.
* This means adding a macOS variation of introspection for .NET.
* A few fixes to make sure the macOS variation passes:
    * Make NSTabViewController.SegmentedControl fully unavailable (it's never
      been in any stable version of Xcode).
    * Treat API with an Obsolete attribute as API with an Obsoleted attribute
      with regards to availability.
    * Ignore OSPlatform attributes we don't understand.
    * Ignore the ApiAvailabilityTest.LegacyAttributes test on macOS as well.
2021-08-13 09:32:56 +02:00
Rolf Bjarne Kvinge 1b5cb35623
[tests] Add .NET versions of xcframeworks-test and bindings-xcframework-test. (#12420) 2021-08-13 09:30:45 +02:00
Sebastien Pouliot 2b1a5c12f4
[generator] Use new CFArray.ArrayFromHandle instead of the existing NSArray API (#12415)
Similar to https://github.com/xamarin/xamarin-macios/pull/12368

p/invoke are faster than selectors, so we use them inside generated
bindings and suggest (thru `[Obsolete]`) the use of `CFArray` in manual
bindings and 3rd-party code.

|                        Method |          name |               value |            Mean |            Error |          StdDev |
|------------------------------ |-------------- |-------------------- |----------------:|-----------------:|----------------:|
|       CFArray_ArrayFromHandle |         empty |                  () |        120.1 ns |         31.37 ns |         1.72 ns |
|       NSArray_ArrayFromHandle |         empty |                  () |      1,433.4 ns |        168.78 ns |         9.25 ns |
|       CFArray_ArrayFromHandle |           few |   (  (...).") [108] |      4,113.2 ns |        290.55 ns |        15.93 ns |
|       NSArray_ArrayFromHandle |           few |   (  (...).") [108] |      8,617.3 ns |      1,958.88 ns |       107.37 ns |
|       CFArray_ArrayFromHandle | large_mutable |   ((...)) [8419330] |  4,045,002.6 ns |    438,639.47 ns |    24,043.31 ns |
|       NSArray_ArrayFromHandle | large_mutable |   ((...)) [8419330] |  7,138,524.0 ns |  1,147,635.42 ns |    62,905.77 ns |
|       CFArray_ArrayFromHandle |       mutable |  (   (...)9e") [54] |      1,974.9 ns |        576.90 ns |        31.62 ns |
|       NSArray_ArrayFromHandle |       mutable |  (   (...)9e") [54] |      4,882.9 ns |        269.60 ns |        14.78 ns |

Note: the use of `CFArrayGetValues` as suggested before (see https://github.com/xamarin/xamarin-macios/issues/12375)
would also apply here - but that needs a bit more fine-tuning (to offset
the extra allocation) so it will be handled by a future PR.

# Side Effect Trivia

Along with previous work this means that a _minimal_ app can now trim both `NSArray` and `NSNull` (managed code) and their need to be registered at startup.

```diff
--- a.cs	2021-08-12 08:18:15.000000000 -0400
+++ b.cs	2021-08-12 08:19:35.000000000 -0400
@@ -2111,6 +2111,11 @@
 		{
 			public static readonly IntPtr Handle = Dlfcn._dlopen("/usr/lib/libSystem.dylib", 0);
 		}
+
+		public static class CoreFoundation
+		{
+			public static readonly IntPtr Handle = Dlfcn._dlopen("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", 0);
+		}
 	}
 	public static class Dlfcn
 	{
@@ -2119,6 +2124,16 @@
 
 		[DllImport("/usr/lib/libSystem.dylib")]
 		public static extern IntPtr dlsym(IntPtr P_0, string P_1);
+
+		public static IntPtr GetIntPtr(IntPtr P_0, string P_1)
+		{
+			IntPtr intPtr = dlsym(P_0, P_1);
+			if (intPtr == IntPtr.Zero)
+			{
+				return IntPtr.Zero;
+			}
+			return Marshal.ReadIntPtr(intPtr);
+		}
 	}
 	internal static class ErrorHelper
 	{
@@ -3114,9 +3129,6 @@
 		public static extern void void_objc_msgSend(IntPtr P_0, IntPtr P_1);
 
 		[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")]
-		public static extern IntPtr IntPtr_objc_msgSend_nuint(IntPtr P_0, IntPtr P_1, nuint P_2);
-
-		[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")]
 		public static extern CGRect CGRect_objc_msgSend(IntPtr P_0, IntPtr P_1);
 
 		[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSendSuper")]
@@ -3590,54 +3602,6 @@
 			return stringBuilder.ToString();
 		}
 	}
-	[Register("NSArray", true)]
-	public sealed class NSArray : NSObject, INativeObject, IDisposable
-	{
-		private static readonly IntPtr class_ptr = Class.GetHandle("NSArray");
-
-		public sealed override IntPtr ClassHandle => class_ptr;
-
-		internal static nuint GetCount(IntPtr P_0)
-		{
-			return Messaging.nuint_objc_msgSend(P_0, Selector.GetHandle("count"));
-		}
-
-		internal static IntPtr GetAtIndex(IntPtr P_0, nuint P_1)
-		{
-			return Messaging.IntPtr_objc_msgSend_nuint(P_0, Selector.GetHandle("objectAtIndex:"), P_1);
-		}
-
-		public static T[] ArrayFromHandle<T>(IntPtr P_0) where T : class, INativeObject
-		{
-			if (P_0 == IntPtr.Zero)
-			{
-				return null;
-			}
-			nuint count = GetCount(P_0);
-			T[] array = new T[(ulong)count];
-			for (uint num = 0u; num < count; num++)
-			{
-				array[num] = UnsafeGetItem<T>(P_0, num);
-			}
-			return array;
-		}
-
-		private static T UnsafeGetItem<T>(IntPtr P_0, nuint P_1) where T : class, INativeObject
-		{
-			IntPtr atIndex = GetAtIndex(P_0, P_1);
-			if (atIndex == NSNull.Null.Handle)
-			{
-				return null;
-			}
-			return Runtime.GetINativeObject<T>(atIndex, false);
-		}
-
-		[EditorBrowsable(EditorBrowsableState.Advanced)]
-		protected internal NSArray(IntPtr P_0)
-			: base(P_0)
-		{
-		}
-	}
 	[DefaultMember("Item")]
 	[Register("NSDictionary", true)]
 	public sealed class NSDictionary : NSObject, IDictionary, ICollection<KeyValuePair<NSObject, NSObject>>, IEnumerable<KeyValuePair<NSObject, NSObject>>, INativeObject, IDisposable
@@ -3665,7 +3629,7 @@
 			{
 				using (new NSAutoreleasePool())
 				{
-					return NSArray.ArrayFromHandle<NSObject>(Messaging.IntPtr_objc_msgSend(base.Handle, Selector.GetHandle("allKeys")));
+					return CFArray.ArrayFromHandle<NSObject>(Messaging.IntPtr_objc_msgSend(base.Handle, Selector.GetHandle("allKeys")));
 				}
 			}
 		}
@@ -3717,43 +3681,6 @@
 			return Runtime.GetNSObject(Messaging.IntPtr_objc_msgSend_IntPtr(base.Handle, Selector.GetHandle("objectForKey:"), nonNullHandle));
 		}
 	}
-	[Register("NSNull", true)]
-	public sealed class NSNull : NSObject, INativeObject, IDisposable
-	{
-		private static NSNull _null;
-
-		private static readonly IntPtr class_ptr = Class.GetHandle("NSNull");
-
-		public static NSNull Null
-		{
-			get
-			{
-				if (_null == null)
-				{
-					_null = _Null;
-				}
-				return _null;
-			}
-		}
-
-		public sealed override IntPtr ClassHandle => class_ptr;
-
-		internal static NSNull _Null
-		{
-			[System.Runtime.CompilerServices.NullableContext(1)]
-			[Export("null")]
-			get
-			{
-				return Runtime.GetNSObject<NSNull>(Messaging.IntPtr_objc_msgSend(class_ptr, Selector.GetHandle("null")));
-			}
-		}
-
-		[EditorBrowsable(EditorBrowsableState.Advanced)]
-		protected internal NSNull(IntPtr P_0)
-			: base(P_0)
-		{
-		}
-	}
 	[Register("NSRunLoop", true)]
 	public sealed class NSRunLoop : NSObject
 	{
@@ -4702,26 +4629,11 @@
 			return (int)P_0.v;
 		}
 
-		public static implicit operator nuint(uint P_0)
-		{
-			return new nuint(P_0);
-		}
-
 		public static explicit operator nuint(ulong P_0)
 		{
 			return new nuint(P_0);
 		}
 
-		public static implicit operator ulong(nuint P_0)
-		{
-			return P_0.v;
-		}
-
-		public static bool operator <(nuint P_0, nuint P_1)
-		{
-			return P_0.v < P_1.v;
-		}
-
 		public int CompareTo(nuint P_0)
 		{
 			return v.CompareTo(P_0.v);
@@ -4867,6 +4779,8 @@
 {
 	public sealed class CFArray : NativeObject
 	{
+		internal static IntPtr CFNullHandle => Dlfcn.GetIntPtr(Libraries.CoreFoundation.Handle, "kCFNull");
+
 		internal CFArray(IntPtr P_0)
 			: base(P_0, false)
 		{
@@ -4897,6 +4811,31 @@
 			}
 			return array;
 		}
+
+		private static T? UnsafeGetItem<T>(IntPtr P_0, nint P_1) where T : class, INativeObject
+		{
+			IntPtr intPtr = CFArrayGetValueAtIndex(P_0, P_1);
+			if (intPtr == CFNullHandle)
+			{
+				return null;
+			}
+			return Runtime.GetINativeObject<T>(intPtr, false);
+		}
+
+		public static T?[]? ArrayFromHandle<T>(IntPtr P_0) where T : class, INativeObject
+		{
+			if (P_0 == IntPtr.Zero)
+			{
+				return null;
+			}
+			nint nint = CFArrayGetCount(P_0);
+			T[] array = new T[(long)nint];
+			for (nint nint2 = 0; nint2 < nint; ++nint2)
+			{
+				array[(long)nint2] = UnsafeGetItem<T>(P_0, nint2);
+			}
+			return array;
+		}
 	}
 	public struct CFRange
 	{
```
2021-08-12 14:19:25 -04:00
Rolf Bjarne Kvinge aee4cc0f0c
[msbuild] Promote '_PartialAppManifest' to a public item group ('PartialAppManifest'). Fixes #10646. (#12417)
* A couple of other changes to make sure we never overwrite the
  PartialAppManifest item group (as opposed to adding to it).
* Add tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/10646.
2021-08-12 15:03:11 +02:00
Sebastien Pouliot 1c937ac39b
[tests][monotouch-test] Re-enable registrar test for conformsToProtocol for dotnet (#12411)
This works fine now. I'm fairly sure this was fixed when the the last
custom steps of the linker were ported for dotnet illink

Fix https://github.com/xamarin/xamarin-macios/issues/11540
2021-08-11 20:16:01 -04:00
Sebastien Pouliot 0a88e5964c
[tests][intro] Fix introspection when running on MacCatalyst 15 (macOS12) (#12403) 2021-08-11 20:05:13 -04:00
Sebastien Pouliot cc3b88c2ed
[tests][linker] Re-enable the metadata reducer test case for dotnet (#12404)
It's been enabled (on dotnet side) for a while, even in debug.

Fix https://github.com/xamarin/xamarin-macios/issues/9612
2021-08-11 14:52:35 -04:00
Rachel Kang ebec4f33dc
Merge branch 'main' into xcode13.0-quicklookui-b1 2021-08-11 11:21:09 -04:00
Rolf Bjarne Kvinge 2972e1b715
Fix some whitespace issues in various files. (#12399)
* Remove BOM
* Add EOL at end of file.
2021-08-11 10:06:46 +02:00
Rolf Bjarne Kvinge 46afe81149
[dotnet] Add support for 'dotnet publish'. Fixes #11807. (#12397)
* Add support for 'dotnet publish'.
* Add support for a 'PkgPackagePath' for macOS and Mac Catalyst, an MSBuild
  property to specify the resulting .pkg path, to reflect the existing
  'IpaPackagePath' (for iOS and tvOS).
* Fix MSBuild logic that uses 'IpaPackagePath'. Looks like nobody has ever
  used this...
* Add tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/11807.
2021-08-11 10:01:16 +02:00
Rolf Bjarne Kvinge 104ab12bdd
[dotnet/msbuild] Fix publishing user frameworks and dynamic libraries from binding projects. (#12396)
We extract frameworks from third-party libraries when running the linker, and
we need to store this information on disk and the reload it after the linker
has executed, and add it to the existing MSBuild variables that keep track of
the user frameworks and dynamic libraries that have to be copied to the app
bundle.

Fixes the framework-test tests.
2021-08-11 09:58:00 +02:00
Rolf Bjarne Kvinge 5b23ea83b1
[monotouch-test] Use unique file names to avoid issues when multiple proceseses of monotouch-test are running simultaneously. Fixes #xamarin/maccore@2461. (#12395)
Fixes https://github.com/xamarin/maccore/issues/2461.
2021-08-11 09:52:02 +02:00
Manuel de la Pena 0d5d94da41
[OSLog] Add support for xcode13 beta4. (#12392) 2021-08-10 23:12:16 -04:00
Sebastien Pouliot a20d417bf7
[dotnet][linker] Enable the sealer optimization (#12009)
when (by default)
* the interpreter is not enabled (since new code might subclass or override the members analyzed at build time)
* building for release

Reverts c56b893b68
Fix https://github.com/xamarin/xamarin-macios/issues/9573

Notes

* Even if possible (in metadata) there is no point in setting `final` on
a method if we remove `virtual`. This match ILLink version of the sealer
and makes the same test pass on both.

* Don't apply optimization on non-AOT builds, e.g. simulators, since some
features (like XML serialization) checks for
`RuntimeFeature.IsDynamicCodeSupported` and that requires some types
to be subclassed thru SRE
2021-08-10 16:01:30 -04:00
Rachel Kang 194d7c4c89
Merge branch 'main' into xcode13.0-quicklookui-b1 2021-08-10 13:25:53 -04:00
Manuel de la Pena 687b3b9d08
[SystemConfiguration] Add support for xcode13 beta4. (#12393) 2021-08-10 10:16:05 -04:00
Manuel de la Pena c5573db360
[OpenGL] Add support for xcode 13 beta4. (#12394) 2021-08-10 10:15:34 -04:00
Rolf Bjarne Kvinge 9273704267
[xtro] Ignore Obsoleted enums in EnumCheck. (#12390)
Treat [Obsoleted] enums as [Obsolete] enums: ignore them. This makes it
possible to remove a few ignored entries.
2021-08-10 13:40:25 +02:00
Rolf Bjarne Kvinge 7b286adb47
[tests] Add a .NET version of framework-test to our test list. (#12373) 2021-08-10 07:40:00 +02:00
Rolf Bjarne Kvinge 15ace257ab
[msbuild] Delete any Mono crash dump files in the root app bundle before codesigning. Fixes #12320. (#12332)
This is what happens:

1. Mono will write crash dumps in the current directory:
   57bfe47451/src/mono/mono/utils/mono-state.c (L302-L322)
2. The current directory is by default the root of the app bundle.
3. If there are any files in the root of the app bundle for macOS or Mac
   Catalyst, 'codesign' will fail ("unsealed contents present in the bundle
   root").

This leads to the following sequence of events:

1. App developer builds & runs a Mac Catalyst app.
2. The app crashes for some reason.
3. Mono creates a crash dump (in the root directory of the app bundle).
4. The app developer changes something in the project and tries again.
5. The build fails, because 'codesign' fails.

Avoid this by deleting any crash dump files from the root of the app bundle
before signing the app.
2021-08-10 07:39:00 +02:00
Manuel de la Pena ae77aed7e8
[Security] Add Xcode 13 beta 4 support. (#12365) 2021-08-09 21:30:14 -04:00
Rachel Kang 80de25c252
Add missing using and remove todo 2021-08-09 12:44:54 -04:00
Sebastien Pouliot cffd57d681
[cecil] Update all package references to the latest 0.11.4 (#12379) 2021-08-09 10:18:16 -04:00
Rolf Bjarne Kvinge 6232edc9ed
[monotouch-test] Ignore ReadingListTest.DefaultReadingList. (#12383)
This test adds entries to the global reading list in Safari, and there's no
API for the test to clean up after itself, so the reading list becomes an
endless list of entries after a whlie.

Beside the fact that this is somewhat annoying for people who actually use
their reading lists, it can also can end up consuming a significant amount of
space on the hard drive, because Safari will download each site to be
available offline.
2021-08-09 14:51:44 +02:00
Rolf Bjarne Kvinge baaa08eb00
[tests] Fix typo in error message. (#12370) 2021-08-09 09:49:51 +02:00
Rolf Bjarne Kvinge 4371133cf7
[dotnet] Remove workaround for private symbols for AOT. (#12334)
* [dotnet] Remove workaround for private symbols for AOT.

* [tools] Make Application.AotArguments a list of string.

This is just a simple refactoring to make Application.AotArguments a list of
strings instead of a comma-separated list of values.

* [tools] Only use direct-icalls when linking mono statically.

Ref: https://github.com/dotnet/runtime/issues/55000

* [mtouch] Fix aot arguments comparison.

* [tests] Adjust mtouch test according to mtouch changes.

* [tests] Add minimum OS version to the Mac Catalyst variation of the MySimpleApp test case.
2021-08-09 09:45:58 +02:00
Sebastien Pouliot ecad9d9667
[tests][intro] Fix Phase tests on macOS 12 and iOS devices (#12376)
It's a `Phase` vs `PHASE` lookup that make the tests checking for
fields fail.

```
FieldExists: 3 errors found in 6603 fields validated: PHASESpatialCategoryDirectPathTransmission, PHASESpatialCategoryEarlyReflections, PHASESpatialCategoryLateReverb
```
2021-08-06 16:28:04 -04:00
Rachel Kang e45969fb08
Merge pull request #12337 from rachelkang/xcode13.0-quicklook-b1-b2-b3-b4
[QuickLook] Update bindings for Xcode 13.0 beta 1,2,3,4
2021-08-06 12:27:08 -04:00
Sebastien Pouliot 22ccf2e81b
[generator] Use new `CFArray.StringArrayFromHandle` instead of the existing `NSArray` API (#12368)
This is another example that p/invokes are much faster than calling
selectors.

Beside the generator the manual bindings were updated to use the newer
API and the old one was decorated as `[Obsolete]`.

|                        Method |          name |                value |            Mean |           Error |        StdDev |
|------------------------------ |-------------- |--------------------- |----------------:|----------------:|--------------:|
| CFArray_StringArrayFromHandle |         empty |                   () |        123.9 ns |        68.92 ns |       3.78 ns |
| NSArray_StringArrayFromHandle |         empty |                   () |      1,422.6 ns |        25.83 ns |       1.42 ns |
| CFArray_StringArrayFromHandle |           few |    (  (...).") [108] |      1,885.2 ns |        46.37 ns |       2.54 ns |
| NSArray_StringArrayFromHandle |           few |    (  (...).") [108] |      8,530.0 ns |       594.40 ns |      32.58 ns |
| CFArray_StringArrayFromHandle | large_mutable |    ((...)) [8419330] | 15,821,101.0 ns | 4,803,631.19 ns | 263,303.23 ns |
| NSArray_StringArrayFromHandle | large_mutable |    ((...)) [8419330] | 22,823,871.9 ns | 6,589,380.43 ns | 361,186.18 ns |
| CFArray_StringArrayFromHandle |       mutable |   (   (...)9e") [54] |        867.4 ns |        59.23 ns |       3.25 ns |
| NSArray_StringArrayFromHandle |       mutable |   (   (...)9e") [54] |      4,939.6 ns |       203.28 ns |      11.14 ns |

note: `NSArray.StringArrayFromHandle` was already using (p/invoke-based)
`CFString.FromHandle` instead of (selector-based) `NSString.FromHandle`
to create the managed `string` instances inside the `string[]`.
2021-08-06 09:17:48 -04:00
Rolf Bjarne Kvinge 6d078c2ac8
[tests] Add debug spew to track down #xamarin/maccore@2414. (#12354) 2021-08-06 09:45:55 +02:00
Rolf Bjarne Kvinge b06baea3c8
[tests] Merge the Main function into the AppDelegate class in numerous tests. (#12356)
Also use a non-obsolete overload of UIApplication.Main.

This shrinks our code and file count a bit.
2021-08-06 09:44:58 +02:00
Rolf Bjarne Kvinge 013054a48c
[tests] Add .NET version of the fsharp test. (#12359)
Partial fix for https://github.com/xamarin/xamarin-macios/issues/10217.
2021-08-06 09:29:30 +02:00
Sebastien Pouliot 77defde89e
[corefoundation] Fix minimum version on MacCatalyst (#12361)
There's no need in having availability attributes for versions earlier
than the current minimum.

Re-enable the `Introduced` test for _legacy_ Catalyst as it's fine since
it use the older attributes. It's still not possible to enable it for
`NET` until all manual bindings are updated.
2021-08-05 19:19:26 -04:00
Manuel de la Pena 244232d52d
[NearbyInterction] Add support for xcode 13 beta 4. (#12351) 2021-08-05 15:29:00 -04:00
Rachel Kang 5b72769db2
Merge branch 'main' into xcode13.0-quicklook-b1-b2-b3-b4 2021-08-05 10:03:43 -04:00
Manuel de la Pena 0ffed970d6
[NetworkExtension] Add Xcode 13 beta 4 support. (#12352) 2021-08-05 09:41:43 -04:00
Rolf Bjarne Kvinge 576dbb9b35
[msbuild/dotnet] Don't overwrite the 'CreateAppBundleDependsOn' property, only add to it. Fixes #12325. (#12346)
Fixes https://github.com/xamarin/xamarin-macios/issues/12325.
2021-08-05 08:17:44 +02:00
Manuel de la Pena 818198b789
[MLCompute] Add support for Xcode 13 beta 4. (#12348) 2021-08-05 01:02:27 -04:00
Manuel de la Pena 41253c3636
[ModelIO] Add Xcode 13 beta4 support. (#12349) 2021-08-04 22:40:05 -04:00
Manuel de la Pena 9aef167b19
[PHASE] Add suppport for Xcode13 beta 2. (#12098) 2021-08-04 22:38:03 -04:00
Sebastien Pouliot fa5f323c88
[tests][intro] Fix protocol results for macOS 12 beta (#12347)
IOW move some custom checks from iOS to the base class that also
covers macOS.
2021-08-04 16:40:14 -04:00
Rolf Bjarne Kvinge a91e34f01b
[xharness] Automatically inline Imports to a "shared.csproj" when cloning projects. Fixes #12316 and #12277. (#12322)
This way we process the shared.csproj that we use in our .NET test projects.
The main effect is that we'll clone any project references included in the
shared.csproj, which will fix #12316. On another hand, it means that we'll
add/remove defines in referenced projects, which fixes #12277.

It also allows us to put more code in the "shared.csproj" files.

Fixes https://github.com/xamarin/xamarin-macios/issues/12316.
Fixes https://github.com/xamarin/xamarin-macios/issues/12277.
2021-08-04 18:13:02 +02:00
Rachel Kang 142e71780a
[QuickLookThumbnailing] Update bindings for Xcode 13.0 beta 1 (#12338) 2021-08-04 10:12:56 -04:00
Manuel de la Pena 62eec286db
[MetricKit] Add support for Xcode 13 beta4. (#12326)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-04 10:12:29 -04:00
TJ Lambert 68a5091cfa
[AuthenticationServices] Updates for Xcode13 Beta3 (#12203)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-08-04 10:11:26 -04:00
TJ Lambert 9a6c0753ac
[SoundAnalysis] Updates for Xcode13 Beta1 (#12181)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-08-04 10:09:46 -04:00
Rolf Bjarne Kvinge 82af982bd0
[dotnet] Handle an absolute PublishDir. Fixes #12041 and #12224. (#12333)
Properly compute the path where to put the app bundle and its files, relative
to the publish directory. The _AppBundlePath variable contains the path to the
app bundle relative to the project directory, but we need it relative to the
publish directory for .NET.

Fixes https://github.com/xamarin/xamarin-macios/issues/12041.
Fixes https://github.com/xamarin/xamarin-macios/issues/12224.
2021-08-04 15:12:24 +02:00
Sebastien Pouliot b39f3ac92d
[xcode13] Fix catalyst intro tests on macOS 12 (#12339)
Move a few macOS special cases into base class so they will apply to
Catalyst too.
2021-08-04 08:48:47 -04:00
Sebastien Pouliot dac58e4115
[objcruntime] Enable nullable on `Selector` class (#12340)
This requires a small change to the generator since `Selector.FromHandle`
can return `null` but it does not means the invoked API can (and we are
interested in the later).

Fixed up existing API returning potentially `null` `Selector`, IOW adding
the missing `[NullAllowed]` on them and updating xtro.
2021-08-04 08:47:53 -04:00
Rolf Bjarne Kvinge ad7d08a63d
Always create binlogs during the build. (#12331)
On CI we'll collect all the binlogs in the repository and make them available
for post-build analysis if need be, so this will make it easier to diagnose
build problems.
2021-08-04 09:30:16 +02:00
Rachel Kang 75b150ef5f
[QuickLook] Update bindings for Xcode 13.0 beta 1,2,3,4 2021-08-03 16:37:56 -04:00
Rachel Kang fda13f2e05
[SceneKit] Update bindings for Xcode13.0 beta 1 & beta 2 (#12121)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-08-03 13:19:10 -04:00
Rachel Kang 3d0ac38b2f
[PassKit] Update bindings for Xcode 13.0 beta 1, 2 (#12299) 2021-08-03 13:17:27 -04:00
TJ Lambert 6ae2ca062b
[HomeKit] Updates for Xcode13 Beta 1-2 (#12092)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-08-03 12:47:43 -04:00
Rolf Bjarne Kvinge b9c12e5fb0
[introspection] Make green on .NET/Mac Catalyst. Fixes #10215. (#12329)
* [introspection] Ignore the ApiAvailabilityTest.LegacyAttribute test on Mac Catalyst as well.

* [introspection] #10883 only applies to Mac Catalyst for legacy Xamarin.

* [xharness] introspection is now green on .NET/Mac Catalyst
2021-08-03 17:58:10 +02:00
Rolf Bjarne Kvinge 18a9a90450
[xharness] Gracefully handle any exceptions that may occur when parsing build logs. (#12318)
* [xharness] Gracefully handle any exceptions that may occur when parsing build logs.

Fixes a harness exception:

    Harness exception for 'monotouch-test': System.ArgumentException: '', hexadecimal value 0x1D, is an invalid character.
    at System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar (System.Int32 ch, System.Char* pDst, System.Boolean entitize) [0x00026] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:1420
    at System.Xml.XmlEncodedRawTextWriter.WriteCDataSection (System.String text) [0x00251] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:1370
    at System.Xml.XmlEncodedRawTextWriter.WriteCData (System.String text) [0x0012a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:470
    at System.Xml.XmlEncodedRawTextWriterIndent.WriteCData (System.String text) [0x00007] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:1750
    at System.Xml.XmlWellFormedWriter.WriteCData (System.String text) [0x00029] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlWellFormedWriter.cs:771
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.TestReportGenerator.WriteFailure (System.Xml.XmlWriter writer, System.String message, System.IO.TextReader stderr) [0x00031] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/TestReportGenerator.cs:41
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.NUnitV3TestReportGenerator.GenerateFailure (System.Xml.XmlWriter writer, System.String title, System.String message, System.IO.TextReader stderr) [0x0030e] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/NUnitV3TestReportGenerator.cs:122
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.XmlResultParser.GenerateFailureXml (System.String destination, System.String title, System.String message, System.IO.TextReader stderrReader, Microsoft.DotNet.XHarness.Common.XmlResultJargon jargon) [0x00033] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/XmlResultParser.cs:226
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.XmlResultParser.GenerateFailure (Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILogs logs, System.String source, System.String appName, System.String variation, System.String title, System.String message, System.IO.TextReader stderrReader, Microsoft.DotNet.XHarness.Common.XmlResultJargon jargon) [0x000a4] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/XmlResultParser.cs:248
    at Xharness.Jenkins.TestTasks.RunTest.BuildAsync () [0x00274] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunTest.cs:74
    at Xharness.Jenkins.TestTasks.RunTest.ExecuteAsync () [0x000d8] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunTest.cs:99
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x00226] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:283

* Fix missing parenthesis in message.
2021-08-03 12:00:35 +02:00
Rolf Bjarne Kvinge 12cf14662f
[monotouch-test] Resolve symlinks in paths before comparing them. (#12321)
Fixes this test failure on device:

    [FAIL] CurrentDirectory :   Current directory at launch
      Expected string length 97 but was 89. Strings differ at index 1.
      Expected: "/private/var/containers/Bundle/Application/4824129A-8668-4CD9..."
      But was:  "/var/containers/Bundle/Application/4824129A-8668-4CD9-9280-7F..."
2021-08-03 07:36:26 +02:00
TJ Lambert f3758812ec
[Localization] Removing Test with Ignore File (#12258)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-08-02 20:43:30 -04:00
Manuel de la Pena 0ca2038d7f
[LocalAuthentication] Add support for Xcode 13 beta 4. (#12301) 2021-08-02 16:59:52 -04:00
Manuel de la Pena 0f15240c9f
[FileProvider] Add support for Xcode13 beta 4. (#12300)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-02 12:12:51 -04:00
Rolf Bjarne Kvinge d506a13466
[monotouch-test] Teach HealthKit tests about new HKQuantityTypeIdentifiers/HKCategoryTypeIdentifiers. (#12317)
Fixes these test failures:

    MonoTouchFixtures.HealthKit.CategoryTypeIdentifier
    	[FAIL] EnumValues_22351 : AppleWalkingSteadinessEvent could not be created: System.ArgumentNullException: Value cannot be null.
    Parameter name: hkCategoryTypeIdentifier
      at ObjCRuntime.NativeObjectExtensions.GetNonNullHandle (ObjCRuntime.INativeObject self, System.String argumentName) [0x00003] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/INativeObject.cs:27
      at HealthKit.HKObjectType.GetCategoryType (Foundation.NSString hkCategoryTypeIdentifier) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/ios/native/HealthKit/HKObjectType.g.cs:111
      at HealthKit.HKCategoryType.Create (HealthKit.HKCategoryTypeIdentifier kind) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/HealthKit/HKObjectType.cs:26
      at MonoTouchFixtures.HealthKit.CategoryTypeIdentifier.EnumValues_22351 () [0x001fd] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs:115
      at MonoTouchFixtures.HealthKit.CategoryTypeIdentifier.EnumValues_22351 () [0x0024f] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs:120

    MonoTouchFixtures.HealthKit.QuantityTypeIdentifier
    	[FAIL] EnumValues_22351 : AppleWalkingSteadiness could not be created: System.ArgumentNullException: Value cannot be null.
    Parameter name: hkTypeIdentifier
      at ObjCRuntime.NativeObjectExtensions.GetNonNullHandle (ObjCRuntime.INativeObject self, System.String argumentName) [0x00003] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/INativeObject.cs:27
      at HealthKit.HKObjectType.GetQuantityType (Foundation.NSString hkTypeIdentifier) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/ios/native/HealthKit/HKObjectType.g.cs:162
      at HealthKit.HKQuantityType.Create (HealthKit.HKQuantityTypeIdentifier kind) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/HealthKit/HKObjectType.cs:19
      at MonoTouchFixtures.HealthKit.QuantityTypeIdentifier.EnumValues_22351 () [0x0017a] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs:87
      at MonoTouchFixtures.HealthKit.QuantityTypeIdentifier.EnumValues_22351 () [0x001cc] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs:92

Also make these tests show all failing enum values at once, instead of having
to run the test after adding each new case.
2021-08-02 17:41:51 +02:00
Manuel de la Pena e20c7b2179
[Tests] Fix the tests.sln (#12310) 2021-07-30 13:42:54 -04:00
Rachel Kang af2fea2f82
[Photos] Update bindings for Xcode 13.0 beta 1 and beta 2 (#12163)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-07-30 12:33:59 -04:00
Rolf Bjarne Kvinge 3766cf8fa2
[monotouch-test] Use the same timezone for the calendar as we do for the time (UTC) in CalendarTest.DateComponentsTest. Fixes #xamarin/maccore@2481. (#12304)
Fixes https://github.com/xamarin/maccore/issues/2481.
2021-07-30 16:02:36 +02:00
Rolf Bjarne Kvinge 9274e5a4f0
[tests] Share more helper make logic in MySimpleApp. (#12296) 2021-07-30 10:21:16 +02:00
Rolf Bjarne Kvinge 6253a88198
[monotouch-test] Give up in CaptiveNetworkTest.TryCopyCurrentNetworkInfo. Fixes #12278. (#12291)
Don't presume to be able to figure out whether we should get back network info
or not, so just remove the corresponding assert.

Fixes https://github.com/xamarin/xamarin-macios/issues/12278.
2021-07-30 09:52:32 +02:00
Manuel de la Pena 6dfdcf8401
[CoreLocation] Add support for Xcode 13 beta 4. (#12298) 2021-07-29 19:59:38 -04:00
Manuel de la Pena dab0f2ed9a
[HealthKit] Add support for xcode13 beta4. (#12184) 2021-07-29 11:11:39 -04:00
Rolf Bjarne Kvinge a6c7c12474
[src] Add AppKit to Mac Catalyst. (#12268)
* A lot of availability attribute updates.
* Some conditional "#if !__MACCATALYST__" in manual binding files.
* xtro updates.
* Misc other minor tweaks.
2021-07-29 16:17:51 +02:00
Rolf Bjarne Kvinge 63f28c0c5c
[dotnet/msbuild] Fix packaging and archiving support in .NET. Partial fix for #10413. (#12244)
* Rearrange some MSBuild logic so that the packaging/archiving code for macOS
  can also be used for Mac Catalyst.
* Make the .NET build logic package/archive when requested to do so.
* Add tests.

Partial fix for https://github.com/xamarin/xamarin-macios/issues/10413.
2021-07-29 15:33:08 +02:00
Rolf Bjarne Kvinge 3d822de007
[runtime] List all assemblies in TRUSTED_PLATFORM_ASSEMBLIES as pass it to MonoVM/CoreCLR. Fixes #12265. (#12272)
List all the assemblies in the app bundle and pass them to MonoVM/CoreCLR's in
the TRUSTED_PLATFORM_ASSEMBLIES initialization property.

This way CoreCLR knows where to find System.Private.CoreLib.dll for fat apps
(it's in the runtimeidentifier-specific subdirectory, and by default CoreCLR
will only look next to libcoreclr.dylib).

Fixes https://github.com/xamarin/xamarin-macios/issues/12265.
2021-07-29 07:45:24 +02:00
Manuel de la Pena 38140f2cce
[Xcode13] Bump for Xcode 13 beta4. (#12273) 2021-07-28 16:58:00 -04:00
Manuel de la Pena f7c6e8ab6b
[xtro] Append the lines and then sort them to get everything grouped better. (#12274) 2021-07-28 16:18:00 -04:00
Manuel de la Pena 3336910dd8
[Xtro] If the sanitizer removed all selectors, remove the file. (#12256)
A new check was added to ensure that empty .todo files are not added,
yet when the sanitizer removes all lines we get an error per empty file.

Since we are auto-sanitizing, we want to remove those empty files.
2021-07-28 11:21:56 -04:00
Rolf Bjarne Kvinge 9dcc4d07b4
[runtime] Fix the arguments to the managed main function when using CoreCLR. Fixes #12219. (#12239)
Also add tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/12219.
2021-07-28 17:12:29 +02:00
VS MobileTools Engineering Service 2 c5e60a1462
[Localization] Localized file check-in by OneLocBuild Task: Build definition ID 14411: Build ID 5018259 (#12220) 2021-07-28 09:57:35 -05:00
Rolf Bjarne Kvinge d24b2203af
[monotouch-test] No need to ignore NSTimeZoneTest.All_28300 anymore. (#12241) 2021-07-28 15:01:28 +02:00
dotnet-maestro[bot] 68476989f4
[main] Update dependencies from dotnet/installer (#12245)
* Update dependencies from https://github.com/dotnet/installer build 20210727.4

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21376.3 -> To Version 6.0.100-rc.1.21377.4

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21370.1 -> To Version 6.0.100-preview.6.21376.2 (parent: Microsoft.Dotnet.Sdk.Internal

* Bump Mono.Cecil from 0.11.3 to 0.11.4.

* [dotnet-linker] Reference Mono.Cecil 0.11.4 directly.

Works around https://github.com/mono/linker/issues/2173.

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-07-28 09:46:36 +02:00
Rolf Bjarne Kvinge 2ca8970122
[tests] Add a .NET version of introspection for Mac Catalyst. (#12039)
* [tests] Add a .NET version of introspection for Mac Catalyst.

It shows a lot of failures (so it's disabled by default), but this way we can
at least start to fix the failures.

* [xharness] Always ignore the new test.

* [xharness] Ignored projects should be ignored.
2021-07-28 09:39:29 +02:00
Rolf Bjarne Kvinge c202ba4a93
[generator] Skip protocols that aren't available on the current platform. (#12208)
That way we can do this in api definitions:

    [BaseType (typeof (NSObject))]
    interface MyType : MyProtocol { }

    [Protocol]
    [NoMacCatalyst]
    interface MyProtocol {}

instead of this:

    [BaseType (typeof (NSObject))]
    interface MyType
    #if __MACOS__
        : MyProtocol
    #endif
    {
    }

    [Protocol]
    [NoMacCatalyst]
    interface MyProtocol {}

for a type that implements a protocol on macOS, but not on Mac Catalyst.
2021-07-28 09:35:41 +02:00
Rolf Bjarne Kvinge 6a40d45337
[AppKit/Foundation] Numerous API adjustments. (#12243)
* Merged a MonoMac-only version of NSMutableCharacterSet + a non-MonoMac version
  of NSMutableCharacterSet into a single definition.
* Add a few [NullAllowed] where new API triggered xtro warnings (I either had to
  add more ignores to xtro, or fix the issues - I decided to fix the issues).
* Remove numerous "#if MONOMAC" blocks and switched to availability attributes.
* Merged a MonoMac-only list of NSWindow fields and a non-MonoMac list of NSWindow
  fields into a single definition (which was quite useless because NSWindow is only
  present on macOS, so the non-MonoMac list was just dead code). 
* Misc other availability attribute additions/fixes.
2021-07-28 09:18:48 +02:00
Rolf Bjarne Kvinge 25f19ae78a Merge remote-tracking branch 'origin/main' into dotnet-archive 2021-07-28 09:18:19 +02:00
Rolf Bjarne Kvinge 7986b2f2af
[dotnet] Globalization works for Mac Catalyst now. Fixes #11392. (#12247)
Fixes https://github.com/xamarin/xamarin-macios/issues/11392.
2021-07-28 09:12:22 +02:00
Rolf Bjarne Kvinge 600ce3290b
[monotouch-test] Adjust CalendarTest.DateComponentsTest to use a specific time zone. (#12249)
Hopefully avoids random test failures like https://github.com/xamarin/maccore/issues/2471#issuecomment-887517838.
2021-07-28 09:08:52 +02:00
Rolf Bjarne Kvinge 7260f267d9
[tests] Remove workaround for #dotnet/runtime@47120, it's been fixed. (#12253) 2021-07-28 09:08:13 +02:00
Rolf Bjarne Kvinge 08dba89c98
[tests] Add dummy variable to put System.Runtime.CompilerServices.Unsafe.dll next to the test assembly. (#12251)
Otherwise this happens when running tests from within the IDE:

error BI0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
  at System.ReadOnlySpan`1[T].op_Implicit (T[] array) [0x00000] in <16786cfd571c4686983021cfcee42fb4>:0
  at System.Reflection.TypeLoading.CoreTypes..ctor (System.Reflection.MetadataLoadContext loader, System.String coreAssemblyName) [0x0003d] in <49552709e6e14610b2a2f34b9d5f4c52>:0
  at System.Reflection.MetadataLoadContext..ctor (System.Reflection.MetadataAssemblyResolver resolver, System.String coreAssemblyName) [0x00046] in <49552709e6e14610b2a2f34b9d5f4c52>:0
  at BindingTouch.Main3 (System.String[] args) [0x00e91] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:454
  at BindingTouch.Main2 (System.String[] args) [0x00007] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:199
  at BindingTouch.Main (System.String[] args) [0x00002] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:91
  at System.Environment.get_StackTrace () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System/Environment.cs:316
  at ErrorHelper.ShowInternal (System.Exception e) [0x0010f] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/error.cs:175
  at ErrorHelper.Show (System.Exception e, System.Boolean rethrow_errors) [0x00089] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/error.cs:125
  at BindingTouch.Main (System.String[] args) [0x0000d] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:93
  at Xamarin.Tests.BGenTool.Execute () [0x000a1] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTool.cs:228
  at Xamarin.Tests.BGenTool.AssertExecute (System.String message) [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTool.cs:207
  at GeneratorTests.BGenTests.BuildFile (Xamarin.Tests.Profile profile, System.Boolean nowarnings, System.Boolean processEnums, System.Collections.Generic.IEnumerable`1[T] references, System.String[] filenames) [0x000ab] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:764
  at GeneratorTests.BGenTests.BuildFile (Xamarin.Tests.Profile profile, System.Boolean nowarnings, System.Boolean processEnums, System.String[] filenames) [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:750
  at GeneratorTests.BGenTests.BuildFile (Xamarin.Tests.Profile profile, System.String[] filenames) [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:740
  at GeneratorTests.BGenTests.IgnoreUnavailableProtocol () [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:636
  at System.Reflection.RuntimeMethodInfo.InternalInvoke (System.Reflection.RuntimeMethodInfo , System.Object , System.Object[] , System.Exception& ) [0x00000] in <08f46039e5064c628bf7795f9b970b7b>:0
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Reflection/MethodBase.cs:53
  at NUnit.Framework.Internal.Reflect.InvokeMethod (System.Reflection.MethodInfo method, System.Object fixture, System.Object[] args) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.MethodWrapper.Invoke (System.Object fixture, System.Object[] args) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Commands.TestMethodCommand.InvokeTestMethod (NUnit.Framework.Internal.TestExecutionContext context) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod (NUnit.Framework.Internal.TestExecutionContext context) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute (NUnit.Framework.Internal.TestExecutionContext context) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Execution.WorkItem.RunOnCurrentThread () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Execution.WorkItem.Execute () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at NUnit.Framework.Internal.Execution.TestWorker.TestWorkerThreadProc () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/thread.cs:74
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:968
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:910
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:899
  at System.Threading.ThreadHelper.ThreadStart () [0x00008] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/thread.cs:111
2021-07-28 09:00:29 +02:00
Rolf Bjarne Kvinge 2900ccb173
[xharness] Bump timeout for the .NET unit tests. (#12240)
Adding more and more tests make the tests take longer and longer...
2021-07-27 15:46:03 +02:00
Sebastien Pouliot 1fa43189b5
[generator] Do not generate `BindingImplOptions.Optimizable` when code snippets are provided (#12165)
unless the snippet-based attribute also set the `Optimizable` property.

IOW this is now required to _opt-in_ (to optimize) instead of default,
with no ~easy~ way to turn it off.

Re-enabled each of the `[Dispose]` cases after protecting the required
extra calls they make.

Fix https://github.com/xamarin/xamarin-macios/issues/12150

* Add test for [Dispose] and SnippetAttribute subclasses

* Opt-in all [*Snippet] to be optimizable

This is exactly what we have been shipping for years (no changes).

Unlike [Dispose] there is no change in the generated code or the
optimizations.

Future snippets should come with tests - which is _normal_ for any
manual code (which they are) added to the SDK
2021-07-27 09:36:22 -04:00
Rolf Bjarne Kvinge d22cf7da8c [dotnet] Add unit tests for archiving, package creation and ipa creation. 2021-07-27 13:52:46 +02:00
Rolf Bjarne Kvinge 1f8c7130f4
[xtro] Improve the auto-sanitizer. (#12226)
Now with support for auto-sanitizing todo files.
2021-07-27 07:46:04 +02:00
Rolf Bjarne Kvinge 0549af9736
[dotnet] Add support for the interpreter + AOT when needed. Fixes #11421 and #11724. (#12211)
* Add support for the interpreter everywhere.
* Add support for the AOT compiler everywhere we didn't support it before,
  because the interpreter needs it (at least System.Private.CoreLib.dll must
  be AOT-compiled when using the interpreter).
* Do FullAOT compilation on Mac Catalyst/ARM64 if we're not using the
  interpreter, since we can't use the JIT.
* Fix monotouch-test to be green on Mac Catalyst/ARM64.

Fixes https://github.com/xamarin/xamarin-macios/issues/11724.
Fixes https://github.com/xamarin/xamarin-macios/issues/11421.
2021-07-27 07:39:43 +02:00
Rolf Bjarne Kvinge 52ad560f3b
[monotouch-test] Make CalendarTest.TestOrdinality location-agnostic. Fixes #xamarin/maccore@2471. (#12192)
Modifying the test to use UTC datetimes instead of local datetimes + specify
the timezone for the NSCalendar to make the results predictable everywhere and
at all times.

Fixes https://github.com/xamarin/maccore/issues/2471.
2021-07-27 07:37:15 +02:00
Sebastien Pouliot 2032f4a09a
[tests] Fix introspection results on iOS 15 beta 3 devices (#12232) 2021-07-26 20:31:13 -04:00
Sebastien Pouliot 13b1b3c45a
[tests][macos] Fix protocol failures for introspection on beta 3 (#12233) 2021-07-26 20:29:05 -04:00
Sebastien Pouliot b02f7c8e66
[tests] Fix introspection on macOS 12 (#12234)
This was fixed for iOS 15 but also happens on macOS 12 so the case
was moved into the common, shared test sources.
2021-07-26 20:23:12 -04:00
TJ Lambert 149434de3e
[SafariServices] Update to Xcode13 beta1 (#12102) 2021-07-26 17:29:17 -05:00
Rolf Bjarne Kvinge c0651c92b1
[dotnet] Put the 'createdump' executable in the app bundle when using CoreCLR. Fixes #11432. (#12210)
So that CoreCLR can create crash dumps.

Fixes https://github.com/xamarin/xamarin-macios/issues/11432.
2021-07-26 16:16:10 +02:00
Rolf Bjarne Kvinge 478b58897f
[AppKit/Foundation] Sprinkle some null allowed. (#12201) 2021-07-26 09:19:48 +02:00
Rolf Bjarne Kvinge 561ffb7663
[AppKit/UIKit/Foundation] Use NSWritingDirection from Foundation. Partial fix for #6573. (#12199)
Make the NSWritingDirection enum from Foundation the main version, and
deprecate the others (AppKit.NSWritingDirection,
UIKit.UITextWritingDirection).

This makes things a bit easier with Mac Catalyst, which ships both AppKit and UIKit.

Ref: https://github.com/xamarin/xamarin-macios/issues/6573
2021-07-26 09:10:41 +02:00
Sebastien Pouliot 0ba858a5c1
[corespotlight] Fix API not available on Catalyst (#12186)
Headers were only decorated with `ios(15.0)`
Testing on macOS 12 b3, as a Catalyst app, shows they are not available.
2021-07-23 22:07:44 -04:00
Sebastien Pouliot a9d5a71cb3
[coremotion] Remove API not available on Catalyst 15 (#12207) 2021-07-23 22:03:00 -04:00
Sebastien Pouliot 5c93260ca4
[gamekit] Remove `isPresentingFriendRequestViewController` from Catalyst (#12206)
* [gamekit] Remove `isPresentingFriendRequestViewController` from Catalyst

The selector is not annotated by itself (wrt Catalyst) but it maps to
`presentFriendRequestCreatorFromViewController` which is not available
on Catalyst. That part is clear in the headers

```diff
+#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
+/**
+ *  presentFriendRequestCreatorFromViewController:
...
+#elif TARGET_OS_OSX
+/**
+ *  presentFriendRequestCreatorFromWindow:
```
2021-07-23 21:58:19 -04:00
TJ Lambert 62a9fd98c4
[SensorKit] Updates for Xcode13 Beta1
No updates for Beta 2 or 3
2021-07-23 14:16:28 -05:00
TJ Lambert a27a58aa29
[UserNotifications] Updates for Xcode13 beta 3 (#12130) 2021-07-23 14:13:32 -05:00
Rachel Kang 24acd2da84
Merge pull request #12152 from rachelkang/xcode13.0-storekit-b1
[StoreKit] Update bindings for Xcode 13.0 beta 1
2021-07-23 12:10:46 -04:00
Manuel de la Pena de862502ae
[CoreData] Add support for Xcode 13 beta 3. (#12183) 2021-07-23 11:24:19 -04:00
Rachel Kang cc48a3c45c
Merge branch 'main' into xcode13.0-storekit-b1 2021-07-23 11:08:00 -04:00
Rolf Bjarne Kvinge a010778b30
[dotnet] Add support for implicit namespace imports. Fixes #12084. (#12173)
* [dotnet] Add support for implicit namespace imports. Fixes #12084.

Also update our templates to remove any using statements for implicitly imported
namespaces.

Fixes https://github.com/xamarin/xamarin-macios/issues/12084.

* [monotouch-test] Fix compilation error due to implicit namespace causing type conflict.

Fixes these errors:

    xamarin-macios/tests/monotouch-test/ImageIO/MutableImageMetadataTest.cs(54,54): error CS0104: 'CGImageProperties' is an ambiguous reference between 'CoreGraphics.CGImageProperties' and 'ImageIO.CGImageProperties'
    xamarin-macios/tests/monotouch-test/ImageIO/MutableImageMetadataTest.cs(54,88): error CS0104: 'CGImageProperties' is an ambiguous reference between 'CoreGraphics.CGImageProperties' and 'ImageIO.CGImageProperties'
    xamarin-macios/tests/monotouch-test/ImageIO/ImageMetadataTest.cs(40,54): error CS0104: 'CGImageProperties' is an ambiguous reference between 'CoreGraphics.CGImageProperties' and 'ImageIO.CGImageProperties'
    xamarin-macios/tests/monotouch-test/ImageIO/ImageMetadataTest.cs(40,88): error CS0104: 'CGImageProperties' is an ambiguous reference between 'CoreGraphics.CGImageProperties' and 'ImageIO.CGImageProperties'
2021-07-23 15:07:03 +02:00
Rolf Bjarne Kvinge 0f62f57ac9
[link sdk] Fix incorrect test logic in HttpClientHandlerTest for Mac Catalyst. Fixes #xamarin/maccore@2472. (#12179)
Fixes https://github.com/xamarin/maccore/issues/2472.
2021-07-23 09:10:11 +02:00
Rolf Bjarne Kvinge 60fa8c90fe
[monotouch-test] Check a few more permissions that sometimes make the app crash due to a TCC violation on Mac Catalyst. (#12134)
* [monotouch-test] Check a few more permissions that sometimes make the app crash due to a TCC violation on Mac Catalyst.

* [monotouch-test] Adjust CaptureDeviceTest to only verify camera permission for Audio+Video, any other value is not supported by the OS.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-07-23 09:08:25 +02:00
Sebastien Pouliot 0344624f75
[corelocation] Update annotations to to fix intro on macOS 12 beta 3 (#12167)
Headers only mention iOS 15.

It does not make sense on tvOS (does not move much) and it's not on
Mac (or Catalyst) as validated with macOS 12 beta 3.
2021-07-22 15:41:19 -04:00
Rolf Bjarne Kvinge 1b357204ee
[dotnet/msbuild] Add support for using LLVM to build .NET apps. Fixes #11379. (#12136)
Fixes https://github.com/xamarin/xamarin-macios/issues/11379.
2021-07-22 15:49:22 +02:00
Rolf Bjarne Kvinge c898f19f18 [monotouch-test] Improve the MTLDeviceTest to work on Mac Catalyst. 2021-07-22 10:37:28 +02:00
Rolf Bjarne Kvinge 676a8bb90d [monotouch-test] Fix some formatting and add assert messages 2021-07-22 10:36:21 +02:00
Rolf Bjarne Kvinge bdbf642b6f [tests] Add a MyInterpretedApp test solution 2021-07-22 10:36:21 +02:00
Rolf Bjarne Kvinge 76c8461764
[main] Update dependencies from dotnet/installer (#12064)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer

- **Subscription**: df3e6147-3e41-4928-6775-08d8f479343c
- **Build**: 20210720.12
- **Date Produced**: 7/21/2021 6:57 AM
- **Commit**: d7279fc09fcfb108c5fb97fa290dbbb11c4c441b
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 6.0.100-preview.7.21330.1 to 6.0.100-rc.1.21370.12][1]
  - **Microsoft.NET.ILLink.Tasks**: [from 6.0.100-preview.6.21329.2 to 6.0.100-preview.6.21370.1][2]

[1]: 823ff33...d7279fc
[2]: f549b4e...6eae019

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 6.0.100-preview.6.21329.2 to 6.0.100-preview.6.21370.1 (parent: Microsoft.Dotnet.Sdk.Internal)
2021-07-22 10:32:32 +02:00
VS MobileTools Engineering Service 2 042cd714fe
Localized file check-in by OneLocBuild Task: Build definition ID 14411: Build ID 4945304 (#12079)
First group of translated resx files coming from OneLocBuild!
2021-07-21 17:34:51 -05:00
Manuel de la Pena adc002be4c
[CHIP] Add support fox Xcode 13 beta 3. (#12143) 2021-07-21 13:04:49 -04:00
Manuel de la Pena cd050316cc
[CoreBluetooth] Add Xcode 13 beta 3 support. (#12153) 2021-07-21 13:03:05 -04:00
Rolf Bjarne Kvinge de7f08d642
[tests/dotnet] Add .NET/Mac Catalyst test projects for dont link, link sdk and link all. (#12154)
* Add proper .NET project files for dont link, link sdk and link all. This
  includes a Mac Catalyst variant, and adding helpful Makefile targets for
  simple execution.

* Adjust various tests to work with Mac Catalyst.

* Add the new Mac Catalyst variants to xharness.

This is a partial fix for #10833.
2021-07-21 17:16:03 +02:00
Rolf Bjarne Kvinge f521537e0a
[AppKit/UIKit] Share the implementation of some classes between AppKit and UIKit. (#12161)
* [AppKit/UIKit] Merge the definitions of NSTextLayoutOrientationProvider.

It looks like this might be a breaking change for macOS, but the macOS
definition had only a [Model] attribute, which won't make the generator
generate any public API.

* [AppKit/UIKit] Merge the definitions of NSTextContainer.

* [AppKit/UIKit] Merge the definitions of NSExtendedStringDrawing.
2021-07-21 14:52:19 +02:00
Rolf Bjarne Kvinge 5c30c015c3 Merge remote-tracking branch 'origin/main' into darc-main-2c3dc6cd-c245-4d20-9461-75a98d067b3b 2021-07-21 10:12:01 +02:00
Rolf Bjarne Kvinge b082e6b8aa
[AppKit/UIKit] Share the implementation of some classes between AppKit and UIKit. (#12146)
* [src] Share the NSTextStorage[Delegate] implementations between AppKit and UIKit.

* [AppKit/UIKit] Merge the definitions of NSCollectionLayoutAnchor.

* [AppKit/UIKit] Merge the definitions of the NSCollectionLayout* classes.

* [AppKit/UIKit] Merge the definitions of NSDataAsset.

* [AppKit/UIKit] Merge the definitions of NSShadow.

* [AppKit/UIKit] Merge the definitions of NSTextTab.

* Update xtro.
2021-07-21 10:08:17 +02:00
Rolf Bjarne Kvinge b4dd54bbce [dont link] Ignore the Calendar tests on Mac Catalyst. 2021-07-21 09:32:12 +02:00
Manuel de la Pena eec8246603
Merge branch 'main' into xcode13.0-storekit-b1 2021-07-20 13:18:27 -07:00
Manuel de la Pena 1bdf96d422
Merge branch 'main' into dotnet-linker-tests 2021-07-20 13:17:47 -07:00
Manuel de la Pena c138cce7ba
[ImageIO] Add support for Xcode 13 beta 3. (#12145) 2021-07-20 15:42:56 -04:00
Manuel de la Pena 4d329df138
[GameController] Add support for xcode 13 beta3. (#12144)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-07-20 15:39:39 -04:00
Rachel Kang bd4c627746
[StoreKit] Update bindings for Xcode 13.0 beta 1 2021-07-20 11:36:36 -04:00
Rolf Bjarne Kvinge 28989758ba [link sdk] The SpecialFolder.ProgramFiles path may or may not exist. 2021-07-20 15:54:48 +02:00
Rolf Bjarne Kvinge c7fe2fefd5 [link sdk] Adjust the Bug2000_NSPersistentStoreCoordinator test to create file in a temporary directory.
It would create a file in the current directory, which is the root directory of the app bundle.

This would work in the simulator (because the directory is read-write), fail
on device (because the directory is read-only), and cause rebuilds to fail
with Mac Catalyst (because the directory is read-write the test would succeed,
but it would write files in the root directory of the app bundle, which is not
allowed for macOS apps, and thus codesign would fail when rebuilding the app).

So change the test to create any files in a temporary directory, and adjust it
to always expect the file to be created.

And just in case also delete the file at the end of the test.
2021-07-20 15:54:48 +02:00
Rolf Bjarne Kvinge b890b2b248 [xharness] Add .NET/Mac Catalyst versions of dont link, link sdk and link all. 2021-07-20 15:54:48 +02:00
Rolf Bjarne Kvinge 82b1331210 [xharness] Rewrite the 'RootTestsDirectory' property when cloning a project. 2021-07-20 15:54:48 +02:00
Rolf Bjarne Kvinge 56baf35c79 [tests] Adjust 'link all' to work on Mac Catalyst. 2021-07-20 15:54:48 +02:00
Rolf Bjarne Kvinge ad50c76a88 [tests] Add proper .NET project files for dont link, link sdk and link all tests.
This includes adding a Mac Catalyst variation as well, and adding helpful Makefile
targets for simple execution.

This is a partial fix for #10833.
2021-07-20 15:54:48 +02:00
Rolf Bjarne Kvinge 813b47c5f6 [tests] Make the copy-dotnet-config rule work with paths with spaces, and copy to the linker test directories as well. 2021-07-20 15:54:47 +02:00
Rolf Bjarne Kvinge 7e37fe622e [monotouch-test] Adjust HttpClientHandler tests.
Adjust HttpClientHandler tests to cope with
https://github.com/dotnet/runtime/issues/50859 and
https://github.com/xamarin/xamarin-macios/issues/11392.
2021-07-20 14:54:02 +02:00
Rolf Bjarne Kvinge f90a2f5c75 [monotouch-test] Adjust HttpClientHandler tests to cope with https://github.com/dotnet/runtime/issues/55986. 2021-07-20 14:54:02 +02:00
Rolf Bjarne Kvinge 793b7bb706 [monotouch-test] Make HttpClientTest.EnsureModifiabilityPostSend accept a InvalidOperationException inside a TargetInvocationException for .NET. 2021-07-20 14:54:02 +02:00
Rolf Bjarne Kvinge ab10456117 [monotouch-test] Ignore NSTimeZoneTest.All_28300 on Mac Catalyst.
Due to https://github.com/dotnet/runtime/issues/55941.
2021-07-20 14:54:02 +02:00
Rolf Bjarne Kvinge a3f9519ed1 Merge remote-tracking branch 'origin/main' into HEAD 2021-07-20 14:53:57 +02:00
Rolf Bjarne Kvinge 3c38f8ccd6
[dotnet] Enable autorelease pools for threadpools. Fixes #11750. (#12060)
Fixes https://github.com/xamarin/xamarin-macios/issues/11750.
2021-07-20 14:34:37 +02:00
Rolf Bjarne Kvinge e9c8b50e53
[xharness] Handle exceptions that occur while listing device candidates gracefully. (#12133)
This fixes a problem where the html report wouldn't be re-generated if there
was a problem loading a device (which for instance could happen if xharness
was unable to create a required simulator).
2021-07-20 12:19:31 +02:00
Rolf Bjarne Kvinge 80d2bfa252
[src] Share the NSTextAttachment[Container] implementations between AppKit and UIKit. (#12135)
* [src] Share the NSTextAttachment[Container] implementations between AppKit and UIKit.

* Use shared definition of UIImage/NSImage.
2021-07-20 08:00:35 +02:00
Sebastien Pouliot 2e57729fc2
[corefoundation] Update `CFArray` and make it public (#12003)
* Make `CFArray` public so it can be used for bindings, including 3rd party bindings
* Subclass `NativeObject` to remove some boilerplate code
* Most members are `internal` until needed
* Add nullability annotations

The next step is to make the same kind of optimization done on `NSString`
vs `CFString` by preferring faster p/invokes over calling selectors while
keeping generated code identical.

Also
* Make more methods internal so we can potentially rename them (when the NSArray variants becomes obsolete)
* Add CFArray to the attachment tests
2021-07-19 18:10:44 -04:00
Rolf Bjarne Kvinge c0a7bf5a0d Merge remote-tracking branch 'origin/main' into dotnet-llvm 2021-07-19 17:07:57 +02:00
Rolf Bjarne Kvinge e968a93282
[monotouch-test] Create a shared.csproj for all the .NET monotouch-test project files. (#12128)
* [monotouch-test] Create a shared.csproj for all the .NET monotouch-test project files.

Also complete the logic to build metal files, so that it works on Mac Catalyst as well.

* [monotouch-test] Add helper makefiles.

* [monotouch-test] Fix the RootTestsDirectory in the csproj.

* [monotouch-test] Add empty ItemGroup for xharness to put stuff in.

* [monotouch-test] Set DYNAMIC_REGISTRAR in each csproj, because xharness needs to be able to unset it.

* [monotouch-test] Exclude tests that don't work with AOT from Mac Catalyst/ARM64.

* [monotouch-test] Use 'ComputedPlatform' instead of 'Platform' to determine whether we're building for a device or not.

'Platform' can be anything, while we know the value of 'ComputedPlatform'. And
since 'ComputedPlatform' is computed after the csproj is read, we need to
delay the computation until later (thus in a separate target).
2021-07-19 16:43:22 +02:00
Manuel de la Pena 7ea2524ce6
[Xcode13] Bump xcode 13 to beta 3. (#12137) 2021-07-19 09:03:20 -04:00
Manuel de la Pena a96421fde0
[CoreWLan] Add XCode13 beta 1 support. (#12103)
Added support for MacCatalyst and cleaned the backlog.


Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-07-19 09:02:47 -04:00
Rolf Bjarne Kvinge dba3bf30b1
[AppKit/UIKit] Share the implementation of some classes between AppKit and UIKit. (#12131)
* [src] Share [I]NSCollectionLayoutVisibleItem implementation between AppKit and UIKit.

* [src] Share several NSLayout* implementations between AppKit and UIKit.
2021-07-16 18:24:50 +02:00
Rolf Bjarne Kvinge f292635e48 [tests] Add helper makefiles for building monotouch-test and MySimpleApp in .NET from the command line. 2021-07-16 17:11:14 +02:00
Rolf Bjarne Kvinge ca607b3e86
[tests] Fix warning about unused variable. (#12117) 2021-07-16 16:27:26 +02:00
Rolf Bjarne Kvinge ef0a179610
[Foundation] Sprinkle [NullAllowed]. (#12119) 2021-07-16 16:16:00 +02:00
Rolf Bjarne Kvinge 8b3d572ff3
[xtro] Rebuild xtro-sharpie when any of the sources change (#12120) 2021-07-16 16:15:45 +02:00
Rolf Bjarne Kvinge 7c30f55359 [xharness] Add test case for running monotouch-test with LLVM on .NET on device. 2021-07-16 14:50:55 +02:00
Rolf Bjarne Kvinge 7ac3417ee9
[dotnet/templates/tests] Update template code. (#12109)
* Move the templates to a common subdirectory.
* Add .NET unit test to verify that all the templates build and that they have
  no warnings.
* Modify the template code to:
   * Use the UIApplication.Main overload that takes a Type.
   * Use top-level statements for the Main method to simplify code.
   * Remove a few unnecessary usings.

Partial fix for #12085.
2021-07-14 17:58:31 +02:00