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

11958 Коммитов

Автор SHA1 Сообщение Дата
TJ Lambert 9dc9aa0f3b
[GameKit] Add Support for DotNet Attributes (#12704)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2021-09-13 19:05:57 -04:00
TJ Lambert cbabae0cd1
[CoreWlan] Add Support for DotNet Attributes (#12700)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2021-09-13 19:04:27 -04:00
TJ Lambert 199b9ba79e
[CoreMotion] Add Support for DotNet Attributes
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-09-13 19:01:23 -04:00
github-actions[bot] c52de82a49
[Localization] Pulling New Localization Translations 1206740382 (#12637)
Co-authored-by: csigs <csigs@users.noreply.github.com>
Co-authored-by: CSIGS <csigs@outlook.com>
2021-09-13 19:00:25 -04:00
VS MobileTools Engineering Service 2 1bacc4e029
Localized file check-in by OneLocBuild Task (#12707) 2021-09-13 17:01:23 -04:00
Rachel Kang f1e8f010a1
Fix xtro failures by removing catalyst todo and ignore files 2021-09-13 14:42:23 -04:00
Rachel Kang 040db106c0
Merge branch 'main' into xcode13.0-coreimage-b1-b3 2021-09-13 12:29:04 -04:00
Rolf Bjarne Kvinge 71d2edbc80
[tests] Add debug spew to try to track down random test failure in NSMutableDictionary2Test.AddEntries. (#12711)
Ref: https://github.com/xamarin/maccore/issues/1605
2021-09-13 17:13:40 +02:00
Manuel de la Pena f1611df154
[CoreVideo] Add support for Xcode 13 beta3. (#12257)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2021-09-13 11:09:26 -04:00
Rolf Bjarne Kvinge f75a7b5074
[tests] Add perf test for calling Marshal.AllocHGlobal/FreeHGlobal. (#12696)
Also add a 'SupportedOSPlatformVersion' value to the .NET perftest project
file, to cope with recent changes in our .NET support.

Ref: https://github.com/dotnet/runtime/issues/58939.
2021-09-13 16:14:37 +02:00
Rolf Bjarne Kvinge 9a7000fa18
[tests] Adjust BaseOptimizeGeneratedCodeTest.SetupBlockPerfTest to cope for a slower .NET on tvOS. (#12697) 2021-09-13 16:14:17 +02:00
Rolf Bjarne Kvinge 28102a55b7
[xharness] Set the EnableSGenConc value for all project configurations. (#12698)
* Update to use EnableSGenConc instead of MtouchEnableSGenConc (either works,
  the former is the new future).
* Set EnableSGenConc as a top-level property, so we make sure it's set no
  matter how the project is executed.

This makes it so that this setting work for .NET projects, where we're not using project configurations.
2021-09-13 16:13:59 +02:00
Rolf Bjarne Kvinge 7f1d62ca13
[xharness] Skip some device variations for .NET. (#12699)
Skip:

* Any Thumb variation (Thumb code isn't supported anymore in .NET).
* Any AssemblyBuildTarget variation (compiling assemblies to dylibs [fastdev]
  or frameworks - neither is supported/implemented for .NET).

This trims down the test list a bit.
2021-09-13 16:13:36 +02:00
Rolf Bjarne Kvinge bfb27da6b6
[msbuild/dotnet] Make 'LinkSdk' the default linker mode for Mac Catalyst when building for Release, and 'None' the default when building for Debug. Fixes #12264. (#12701)
Fixes https://github.com/xamarin/xamarin-macios/issues/12264.
2021-09-13 16:12:58 +02:00
Rolf Bjarne Kvinge 42471c1d22
[msbuild] Implement ITaskCallback in [Read|Write]AppManifest to tell the remote task execution that any files on Windows shouldn't be copied back to the mac. (#12646)
Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1394206.
2021-09-13 16:06:06 +02:00
TJ Lambert fc8b7c9b29
[Metal] Add Support for DotNet Attributes (#12604) 2021-09-10 17:21:47 -05:00
Rachel Kang fba8fe61dc
Merge branch 'main' into xcode13.0-coreimage-b1-b3 2021-09-10 18:00:51 -04:00
Rachel Kang 66a28266a4
Add missing changes 2021-09-10 17:57:35 -04:00
Rolf Bjarne Kvinge aadd53249f
[msbuild] Improve E7082 error message. (#12689) 2021-09-10 22:02:30 +02:00
Rolf Bjarne Kvinge f559399f19
[tests] Improve makefiles for .NET's dont link test. (#12690)
This makes it identical to the 'link sdk' and 'link all' makefiles.
2021-09-10 21:19:11 +02:00
Rolf Bjarne Kvinge 033ebd7f84
[tests] Import nunit.framework.targets in more .NET test projects. (#12691)
This is to set the -dlsym:-nunit.framework.dll option, because nunit.framework.dll
contains a P/Invoke to a function that doesn't exist.

For some reason this is more of a problem in tvOS projects than iOS projects
(although it happens for iOS projects as well).
2021-09-10 21:07:09 +02:00
Rachel Kang e75c4e36a3
Fix CIRawFilter intro issues
from Sebastien: "most filters are key-based natively (not-NSObject subclasses)) and we expose them as C# _user-type_ CIFilter-subclasses in recent years _most_ filters have also been exposed natively as protocols (not classes), we expose them as `*Protocol` interface types `CIRAWFilter` is a special case, it's a native `CIFilter` subclass so we're not using [CoreImageFilter] and [CoreImageFilterProperty] attributes to define it which also means we cannot use the "extra" tests to validate the filter properties. So we skip it here. Do not fear it's still tested, like any _normal_, NSObject subclass we have bound :-)"
2021-09-10 14:31:02 -04:00
Rachel Kang 08cc749359
[CoreImage] Update bindings for Xcode 13.0 beta 1 and 3 2021-09-10 14:09:43 -04:00
Manuel de la Pena 42dd6cea65
[XKit] Update for xcode13 beta 5. (#12610)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-09-10 12:16:55 -04:00
Manuel de la Pena 2ff6f9f675
[CI] In order to support APIScan we need to add the governance checks AFTER the build. (#12678) 2021-09-10 12:15:10 -04:00
Rolf Bjarne Kvinge 855de9623a
Bump maccore. (#12675)
New commits in xamarin/maccore:

* xamarin/maccore@efad4f0bae [Xamarin.Hosting] Fix a few compiler warnings.
* xamarin/maccore@55087e093a [Xamarin.Hosting] Fix detecting app exit on device.
* xamarin/maccore@ffefee386c [Xamarin.Hosting] Add support for launching with debugserver on iOS/tvOS 14+.
* xamarin/maccore@e203814d08 [tests] Fix .ipa path for iOSCoolApp now that it's a fat app.
* xamarin/maccore@c2531ff702 Update the provisionator script.
* xamarin/maccore@2bfa5fa12b [submission] Add a fat Mac Catalyst test app.

Diff: 3e591cbcb1..efad4f0bae
2021-09-10 14:31:04 +02:00
Rolf Bjarne Kvinge ce7b876dcf
[tests] Fix building fsharplibrary using the makefile. (#12676)
F# projects aren't named *.csproj.
2021-09-10 13:59:45 +02:00
Peter Collins 5977af4c06
[vs-insertion] Push packs to "shipping" feed (#12682)
Context: https://github.com/xamarin/yaml-templates/pull/134

The .NET 6 packs will now also be pushed to a public xamarin
`net6-maui-shipping` feed during the `VS Insertion` stage.
2021-09-10 08:22:25 +02:00
dotnet-maestro[bot] 819c92251b
[main] Update dependencies from dotnet/installer (#12662)
* Update dependencies from https://github.com/dotnet/installer build 20210907.23

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.2.21456.8 -> To Version 6.0.100-rc.2.21457.23

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.2.21456.8 -> To Version 6.0.100-rc.2.21458.9

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-09-10 08:15:31 +02:00
TJ Lambert 0e0bb1f931
[CloudKit] Add Support for DotNet Attributes (#12672) 2021-09-09 23:00:49 -05:00
TJ Lambert 3d67a66925
[WebKit] Add Support for DotNet Attributes (#12653) 2021-09-09 22:59:32 -05:00
TJ Lambert 3aa7dd810f
[CoreFoundation] Add Support for DotNet Attributes (#12652) 2021-09-09 22:58:11 -05:00
TJ Lambert 4e0151657f
[CoreVideo] Add Support for DotNet Attributes (#12627) 2021-09-09 22:51:12 -05:00
Manuel de la Pena 55e8c60e0d
[CI] Fix 32b stage. (#12680) 2021-09-09 15:24:03 -04:00
Manuel de la Pena 897170f72a
[CI] Only execute iOS 32b on weekends. (#12615) 2021-09-09 12:44:29 -04:00
TJ Lambert a3042e57de
[ARKit] Add Support for DotNet Attributes
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2021-09-09 12:21:56 -04:00
TJ Lambert 4386fc1ed9
[Photos] Add Support for DotNet Attributes
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2021-09-09 12:19:41 -04:00
TJ Lambert 29b0bbc0d2
[CoreBluetooth] Add Support for DotNet Attributes
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2021-09-09 12:17:41 -04:00
Sebastien Pouliot 209486aa5a
[generator] Small source simplification (#12670) 2021-09-09 09:41:44 -04:00
Rolf Bjarne Kvinge 07f83a8815
[CoreFoundation] The native 'dispatch_queue_create_with_target' function is actually called 'dispatch_queue_create_with_target$V2'. (#12666)
Apple does this in their headers:

    #define DISPATCH_ALIAS_V2(sym)	 __asm__("_" #sym "$V2")

    dispatch_queue_t
    dispatch_queue_create_with_target(const char *_Nullable label,
    		dispatch_queue_attr_t _Nullable attr, dispatch_queue_t _Nullable target)
    		DISPATCH_ALIAS_V2(dispatch_queue_create_with_target);

Which means that the native compiler will call
'dispatch_queue_create_with_target$V2' when the source code says to call
'dispatch_queue_create_with_target'.

The only place I've run into this problem, is when building for tvOS (device),
and targetting exactly tvOS 10.0 (neither earlier or later), in which case the
linker fails:

    Undefined symbols for architecture arm64:
      "_dispatch_queue_create_with_target", referenced from:
          wrapper_managed_to_native_CoreFoundation_DispatchQueue_dispatch_queue_create_with_target_string_intptr_intptr in Xamarin.TVOS.dll.o

I filed this as a feedback with Apple some time ago [1], and Apple resolved it
as by design, saying "These symbols are renamed, please use the SDK."

Now I ran into it again with .NET, and it's become a bit more important, since
tvOS 10.0 is the earliest tvOS version we support, which means it'll be more
likely that customers use _exactly_ 10.0 as their target tvOS version. So I
looked into it again, and as far as I can tell, we can just call the '$V2'
variant instead of the original name everywhere.

Apple does the same thing for two other functions, but we haven't bound any of
those, so this only affects 'dispatch_queue_create_with_target' for us.

[1]: Bug ID 48076044: Can't reference 'dispatch_queue_create_with_target' when min tvOS version is exactly 10.0
2021-09-09 15:05:29 +02:00
Filip Navara 219fb1a753
Remove IsXcode8 (#12671)
* Remove IsXcode8

* Remove other _ForgeMetal references
2021-09-09 09:23:32 +02:00
Rolf Bjarne Kvinge cb998a3589
[msbuild/dotnet] Don't use the built-in publishing logic in .NET to copy frameworks to the app bundle. Fixes #12369. (#12656)
.NET/MSBuild don't handle symlinks properly [1], which means that we can't ask
.NET to copy frameworks to the app bundle, since frameworks may contain
symlinks.

In our case, the symptom was that instead of copying symlinks, the file the
symlink pointed to was copied instead, and then codesign complained about
invalid bundle format when we tried to sign the framework.

We fix this by having our own target (_CopyFrameworksToBundle) to copy
frameworks to the app bundle (instead of adding all the files in the
frameworks to the ResolvedFileToPublish item group), and then using 'ditto' to
copy the frameworks.

In order to create a test case for this, I also made the macOS and Mac
Catalyst versions of the XTest framework use symlinks:

* Create a proper XTest framework bundle hierarchy for macOS and Mac Catalyst
  by using the typical symlink structure (actual files in the Versions/A
  subdirectory, and then symlinks pointing into that directory).
* Create a separate Info.plist for each platform for XTest.framework, since
  using an otherwise correct framework makes tooling (such as codesign)
  complain if the Info.plist isn't correct too.

This made our existing tests show the bug.

Finally I had to fix signing frameworks where the executable is a symlink.

We were first resolving symlinks for the input - say we had an
Example.framework/Example symlink to Example.framework/Versions/A/Example -
and then checking the parent directory if it's a framework. The parent
directory of 'Example.framework/Versions/A/Example' is 'A', which did not meet
our framewrok condition (if it ends with '.framework').

The fix is to adjust the logic to resolve symlinks after checking if the input
is a framework or not.

[1]: https://github.com/dotnet/msbuild/issues/6821

Fixes https://github.com/xamarin/xamarin-macios/issues/12369.
2021-09-09 09:11:25 +02:00
Rolf Bjarne Kvinge d0b2b98615
[dotnet-linker] Improve output when we report an error we raised ourselves. (#12664)
Instead of something like this:

    ILLINK : error MT2362: The linker step 'Registrar' failed during processing: One or more errors occurred. (The registrar cannot build a signature for type `Bindings.Test.Sf' in method `Sf()`.
        ) (The registrar cannot build a signature for type `Bindings.Test.Sf' in method `Sf_invoke()`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sdldl' in method `get_PSdldl()`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sdldl' in method `Bindings.Test.ObjCRegistrarTest.set_PSdldl`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sf' in method `get_PSf()`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sf' in method `Bindings.Test.ObjCRegistrarTest.set_PSf`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sff' in method `get_PSff()`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sff' in method `Bindings.Test.ObjCRegistrarTest.set_PSff`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sfff' in method `get_PSfff()`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sfff' in method `Bindings.Test.ObjCRegistrarTest.set_PSfff`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sffff' in method `get_PSffff()`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sffff' in method `Bindings.Test.ObjCRegistrarTest.set_PSffff`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sfffff' in method `get_PSfffff()`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sfffff' in method `Bindings.Test.ObjCRegistrarTest.set_PSfffff`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sfi' in method `get_PSfi()`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sfi' in method `Bindings.Test.ObjCRegistrarTest.set_PSfi`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sfifi' in method `get_PSfifi()`. (TaskId:208)
        ) (The registrar cannot build a signature for type `Bindings.Test.Sfifi' in method `Bindings.Test.ObjCRegistrarTest.set_PSfifi`. (TaskId:208)

we now get this:

    /Users/rolf/work/maccore/dotnet-devicetests/xamarin-macios/tests/bindings-test/dotnet/iOS/obj/Debug/net6.0-ios/iOS/Bindings.Test/ObjCRegistrarTest.g.cs(3072): error MT4111: The registrar cannot build a signature for type `Bindings.Test.Sf' in method `Sf()`.
    /Users/rolf/work/maccore/dotnet-devicetests/xamarin-macios/tests/bindings-test/dotnet/iOS/obj/Debug/net6.0-ios/iOS/Bindings.Test/ObjCRegistrarTest.g.cs(3100): error MT4111: The registrar cannot build a signature for type `Bindings.Test.Sf' in method `Sf_invoke()`.
    /Users/rolf/work/maccore/dotnet-devicetests/xamarin-macios/tests/bindings-test/dotnet/iOS/obj/Debug/net6.0-ios/iOS/Bindings.Test/ObjCRegistrarTest.g.cs(6112): error MT4111: The registrar cannot build a signature for type `Bindings.Test.Sdldl' in method `get_PSdldl()`.
    /Users/rolf/work/maccore/dotnet-devicetests/xamarin-macios/tests/bindings-test/dotnet/iOS/obj/Debug/net6.0-ios/iOS/Bindings.Test/ObjCRegistrarTest.g.cs(6138): error MT4111: The registrar cannot build a signature for type `Bindings.Test.Sdldl' in method `Bindings.Test.ObjCRegistrarTest.set_PSdldl`.
    /Users/rolf/work/maccore/dotnet-devicetests/xamarin-macios/tests/bindings-test/dotnet/iOS/obj/Debug/net6.0-ios/iOS/Bindings.Test/ObjCRegistrarTest.g.cs(6149): error MT4111: The registrar cannot build a signature for type `Bindings.Test.Sf' in method `get_PSf()`.
    ILLINK : error MT2362: The linker step 'Registrar' failed during processing: One or more errors occurred.

and in addition we'll get stack traces for each inner exception as well
whenever we have verbose mtouch logging enabled.
2021-09-09 09:09:58 +02:00
Rolf Bjarne Kvinge 444e7dfcd9
[msbuild] Don't require an Info.plist for .NET builds. (#12661)
We either have defaults or MSBuild properties for the most important values that
were previously required to be in the Info.plist, so now it doesn't make sense anymore
to require an Info.plist, when for simple cases it will just be an empty file.

This allows us to simplify some of our test projects and remove a few empty Info.plist files.
2021-09-09 09:08:04 +02:00
Rolf Bjarne Kvinge b3c2b548de
[link sdk] Ignore XmlSerializationTest.Bug1820_GenericList on device due to a linker bug. (#12667) 2021-09-09 09:04:51 +02:00
Rolf Bjarne Kvinge 770b9c5d27
[tests] Adjust a few introspection checks to work on iOS 11.4.1 (#12668)
I ran into these failures when running on an iOS 11.4.1 device (iPhone 7 / A1778).
2021-09-09 09:00:20 +02:00
Chris Hamons 97e2e00b59
[xtro] Improve detection of Catalyst missing API by fixing xtro (#12626)
- macCatalyst was being missed as it is not all lower case
- Extend tv and watch 'act like iOS if not listed' to catalyst
2021-09-08 16:31:44 -05:00
Rolf Bjarne Kvinge c2fda6ebf9
[dotnet] Enable LLVM by default for release builds. Fixes #12147. (#12660)
Fixes https://github.com/xamarin/xamarin-macios/issues/12147.
2021-09-08 18:04:39 +02:00
Filip Navara 3010172bb5
Update CryptoTest for .NET 6 (#12658)
* Update CryptoTest for .NET 6

* Update tests/linker/ios/link sdk/CryptoTest.cs

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-09-08 18:03:52 +02:00
Filip Navara f28db5491e
Relax the tvOS special folder checks to make them pass both on dotnet and legacy. Fixes #12640. (#12659)
Fixes https://github.com/xamarin/xamarin-macios/issues/12640.
2021-09-08 17:59:40 +02:00