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

9971 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot 30f8156d23
[imageio] Update for Xcode 12.3 beta 1 (#10224) 2020-12-07 16:42:06 -05:00
Sebastien Pouliot bcc953bf50
[coregraphics] Expose CGColor.CreateByMatchingToColorSpace (#10223)
and add unit test

Fix https://github.com/xamarin/xamarin-macios/issues/10212
2020-12-07 16:40:29 -05:00
Rolf Bjarne Kvinge 394c6f5955
[src] Fix generation and usage of the <platform>-defines.rsp files for .NET assemblies. (#10209) 2020-12-07 16:09:43 -05:00
Rolf Bjarne Kvinge daa7e123e2
Add very early support for Mac Catalyst. (#10199)
* Install the Mac Catalyst versions of the mono libraries and BCL.
   * The BCL is the same as the one for Xamarin.iOS, which means it has to be post-processed a bit to work with a Xamarin.MacCatalyst.dll
* Build our runtime for Mac Catalyst.
* Build a Xamarin.MacCatalyst.dll with the Mac Catalyst API (it compiles, but I haven't looked at the API surface at all). This PR assumes we're going to have a new TargetFrameworkIdentifier for Mac Catalyst, but a final decision has not been made (see https://github.com/dotnet/runtime/issues/44882), so this may change.
* Build a Xamarin.iOS.dll that contains type forwarders to Mac Catalyst for all the types that exist in both Mac Catalyst and Xamarin.iOS.
* Add support to xharness for running introspection on Mac Catalyst (there are a lot of failures because the API surface is wrong)
* Add support to our msbuild tasks and mtouch for building Mac Catalyst apps. This basically comes down to adding a new case in numerous places to either do things the iOS way or the macOS way, depending on each case.
* Add a __MACCATALYST__ define (which is in addition to the __IOS__ define).
2020-12-04 18:27:37 +01:00
Sebastien Pouliot cf5a229cae
[msbuild] Only execute DetectDebugNetworkConfigurationTask for debug builds (#10194)
Not that it was very slow but it did make to the top 10 of the
archive build I was debugging.

Also reduce allocations in the task itself, for when it's needed.
2020-12-04 11:01:37 -05:00
Rolf Bjarne Kvinge 9e20285ebb
[tests] Merge the msbuild-mac tests into the Xamarin.MacDev.Tests project. (#10129) 2020-12-04 13:05:51 +01:00
monojenkins e7855bcca1
[VSTS] If we fail dumping the env, continue. (#10202)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-12-04 06:03:40 -05:00
monojenkins 1bc6fa3fd4
[VSTS] Ensure that we have a reasonable timeout. Will unblock device tests. (#10206)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-12-04 06:03:05 -05:00
Rolf Bjarne Kvinge 4f75b9e8da
[tests] Update test to cope with change in Xamarin.WatchOS.dll's location. (#10198)
Fixes this test failure:

* Xamarin.Linker.SdkTest.NoLLVMFailuresInWatchOS("../../32bits/Xamarin.WatchOS.dll"):
    AOT compilation
    Expected: 0
    But was: 1

This regresed in 87d04ac331.
2020-12-04 11:38:08 +01:00
Rolf Bjarne Kvinge 2784675612 [Metal] Remove extraneous Mac Catalyst advice. 2020-12-04 10:54:27 +01:00
Manuel de la Pena fdfed3f74f
[VSTS] Ensure that we have a reasonable timeout. Will unblock device tests. (#10204) 2020-12-03 18:16:27 -05:00
Chris Hamons 5e105f6f30
[docs] Clarify optional protocol support with class vs interface (#10021)
- From https://github.com/xamarin/ios-samples/pull/410

Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2020-12-03 13:38:46 -05:00
Rolf Bjarne Kvinge 28f307adbc Fix whitespace. 2020-12-03 17:39:55 +01:00
Rolf Bjarne Kvinge b36b02c80e
[tests] Remove the MM0143 test, it doesn't look like VSMac is going to fix the bug. Fixes #8939. (#10183)
* [tests] Skip the MM0143 test, it doesn't look like VSMac is going to fix the bug. Fixes #8939.

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

* Remove more code.
2020-12-03 16:59:14 +01:00
Rolf Bjarne Kvinge 5f453afe28
[msbuild] Treat 'ResolvedCompileFileDefinitions' as a list of reference assemblies as well. (#10197)
The build logic will put reference assemblies in
'ResolvedCompileFileDefinitions' instead of '_ReferencesFromNuGetPackages'
when using the new-style packageref format, so we need to handle
'ResolvedCompileFileDefinitions' the same way we handle
'_ReferencesFromNuGetPackages'.

I was unfortunately not able to create a unit test for this scenario, because
xibuild sets MSBUILD_EXE_PATH to make msbuild look in our local build files,
and then the restore fails with:

> Issue9266.csproj : error MSB4236: The SDK 'Msbuild.Sdk.Extras/2.1.2' specified could not be found.

If I don't use "Msbuild.Sdk.Extras" in the test, then it doesn't hit the
broken path this PR is fixing. If I change xibuild to not set
MSBUILD_EXE_PATH, we're not testing our local bits anymore, but the system
Xamarin.Mac.

Fixes https://github.com/xamarin/xamarin-macios/issues/9266.
2020-12-03 15:35:55 +01:00
Sebastien Pouliot 1d6cf0c46e
[scenekit] Add nullability to (generated and manual) bindings (#10195)
See [HOWTO](https://github.com/xamarin/xamarin-macios/wiki/Nullability)
2020-12-03 09:14:54 -05:00
Filip Navara 17722deab4
[dotnet] Prevent linking out code referenced by P/Invoke (#10182)
* [dotnet] Generate references.mm to prevent linking out code referenced by P/Invoke

* Address PR feedback: Namespaces.Foundation -> "Foundation."

* Address PR feedback: Simplify hasSymbols

* Reuse ListExportedSymbols step, respect App.SymbolMode

* Address PR feedback

* Workaround for tvOS
2020-12-03 14:04:11 +01:00
Rolf Bjarne Kvinge cba2d269b9 [src] API tweaks for Mac Catalyst 2020-12-03 10:43:20 +01:00
Rolf Bjarne Kvinge aaf2818af5 [src] Fix availability for MPNowPlayingPlaybackState 2020-12-03 10:43:20 +01:00
Rolf Bjarne Kvinge f5fac88618 [src] Use framework-specific defines in a few places to exclude Mac Catalyst whenever needed 2020-12-03 10:43:20 +01:00
Rolf Bjarne Kvinge 93c0458298 [src] Sprinkle [NoMacCatalyst] around 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge e95020a729 [src] Exclude some obsolete/deprecated API from Mac Catalyst 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 1cfca082b4 [src] Generate generated-framework.g.cs for Mac Catalyst 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 9bb531b9c8 [src] Generate Xamarin.iOS.dll for Mac Catalyst from Xamarin.MacCatalyst.dll and Xamarin.iOS.dll for iOS. 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 90676df846 [src] Build Xamarin.MacCatalyst.dll 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge c6a048f128 [bgen] If we don't have availability attributes for Mac Catalyst, use the ones for iOS 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge fdd9fd9bc0 [src] Build Xamarin.MacCatalyst.BindingAttributes.dll 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 199396e983 [mtouch] The product assembly for Mac Catalyst is Xamarin.MacCatalyst.dll. 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge ee735ea034 [mtouch] Mac Catalyst apps do not require PInvoke wrappers.
Just like simulator builds.
2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge a0ad38abe1 [mtouch] Add mapping between PlatformName and ApplePlatform enums 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 2a48373e05 [mtouch] Allow referencing Xamarin.iOS.dll when building for Mac Catalyst 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 7c3a53fcaf [mtouch] Use macOS' logic to determine whether Mac Catalyst has dynamic obj_msgSend 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 15a2ebc2b7 [builds] Add a tool that fixes Mac Catalyst BCL assemblies.
The BCL assemblies we're using for Mac Catalyst for now are the ones built for Xamarin.iOS.
So we need to fix: InternalsVisibleToAttribute (to point to Xamarin.MacCatalyst.dll)
and references to Xamarin.iOS.dll
2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 7ef5a6c9a4 [src] Simplify defines a little bit 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge eafa843ec2 [xharness] Add support for Mac Catalyst test suites. 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 7fc95b84d4 Bump Touch.Unit.
New commits in spouliot/Touch.Unit:

* spouliot/Touch.Unit@bfb04f4 Fix eol.
* spouliot/Touch.Unit@8258da0 [Touch.Client] Add a MacCatalyst version.

Diff: f8768d99ef..bfb04f4f69
2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 24599c5945 [msbuild] Define __MACCATALYST__ for Mac Catalyst apps.
Mac Catalyst is a different target environment for iOS, which means that
__IOS__ will also be defined.
2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 42687be5d5 [tools] OS Versions are messy in Mac Catalyst 😡
In some places we have to provide the macOS version, and in other places the
iOS version. Add a map and the corresponding code to convert between the two,
and use them when needed.
2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 3780b40580 [msbuild] Adjust family validation for catalyst apps.
There must be an 'iPad' family, and there may be an 'iPhone' family. Only an 'iPhone'
family is invalid.
2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge e7223d87ea [msbuild] There's no need to create the Settings.bundle for catalyst apps.
Debug settings are much simpler, since both debugger and debuggee are on the same
machine.
2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 0d12c42c8a [msbuild] The app resources directory is the Contents/Resources subdirectory in the app for catalyst apps 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 699d842c5c [msbuild] Put the PkgInfo file in the Contents directory for catalyst apps 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 65e59b29da [msbuild] Don't generate archived-expanded-entitlements.xcent for catalyst apps 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge 0d2e480b0c [msbuild] Extract the code to write out archived-expanded-entitlements.xcent to a separate function. 2020-12-03 10:43:19 +01:00
Rolf Bjarne Kvinge a2af2a1925 [msbuild] Put Info.plist in the Contents/ subdirectory in the app for catalyst apps. 2020-12-03 10:43:18 +01:00
Rolf Bjarne Kvinge afb3971f23 Add a maccatalyst capability. 2020-12-03 10:42:27 +01:00
Rolf Bjarne Kvinge cdf97ba554 [tools] Put assemblies and other app bundle content in the correct app bundle location depending on the platform we're targetting.
This makes it so that assemblies end up in the Contents/MonoBundle/ subdirectory
as opposed to in the root app directory for catalyst.
2020-12-03 10:42:27 +01:00
Rolf Bjarne Kvinge 88b74704b0 [tools] We must manually copy/lipo the executable into the app, it's not done automatically as it is for simulator builds. 2020-12-03 10:42:27 +01:00
Rolf Bjarne Kvinge 668fbd663e [tools] Xcode's SDK uses 'MacOSX' for the catalyst platform name. 2020-12-03 10:42:27 +01:00
Rolf Bjarne Kvinge 183f40c407 [tools] Use the same constants for catalyst as for iOS for now 2020-12-03 10:42:27 +01:00