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

12179 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge dc929a5e7b
[AudioComponent] Remove deprecated API from .NET, and adjust/add a few availability attributes for other API. (#13373)
* [AudioComponent] Remove deprecated API from .NET, and adjust/add a few availability attributes for other API.

* Add back obsolete attributes.
2021-11-22 08:09:47 +01:00
dotnet-maestro[bot] 406c2e2378
Update dependencies from https://github.com/dotnet/installer build 20211117.21 (#13389)
Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.101-servicing.21566.16 -> To Version 6.0.101-servicing.21567.21

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-11-22 08:09:13 +01:00
Rolf Bjarne Kvinge 8c942aac1c
[xtro-report] Report the html file we created. (#13409) 2021-11-22 08:06:01 +01:00
Rolf Bjarne Kvinge 71371d6446
[Foundation] Exclude NSUrlProtocolClient from macOS on .NET. (#13394)
Just like the XAMCORE_4_0 define says.
2021-11-19 17:16:30 +01:00
Rolf Bjarne Kvinge 639db2a2c8
[dotnet] Make sure that the relative publish dir has a trailing slash. (#13395)
Other code elsewhere assumes this is the case.
2021-11-19 17:14:30 +01:00
Rolf Bjarne Kvinge 0cee52fb3f
[GameController] Use existing GameController types instead of OpenTK types for a few property getters for .NET. (#13402)
These all have equivalent SetX functions that already take the corresponding
GameController type, so this is just making the API consistent.

We could also make these getters + the corresponding Set* method a readwrite
property, but this way is exactly how Apple did it (both in Swift and
Objective-C).
2021-11-19 17:10:27 +01:00
Mauro Agnoletti 61e43f8486
Updated Hot Restart pre-built app and launch icons (#13399) 2021-11-19 09:27:03 +01:00
Matthew Leibowitz 5b61ea59a9
Use the MANIFEST_VERSION_BAND for the manifests (#13386)
It appears that the package IDs for the manifests retain the main .NET version band, such as 100 and 200, and the packs use the full version of 101 or 203.

This PR just uses the version band for the manifest packages.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-11-19 09:24:30 +01:00
Rolf Bjarne Kvinge ec045766ca
[AVFoundation] Remove the AVMediaType enum and the AVMediaTypes.TimedMetadata field from .NET. (#13368) 2021-11-19 08:53:51 +01:00
Rolf Bjarne Kvinge 68dd7e0a76
[FileProvider] Exclude some deprecated API from .NET. (#13370) 2021-11-19 08:53:32 +01:00
Rolf Bjarne Kvinge 17e7f65b2c
[msbuild] Don't execute the entire _CreateBindingResourcePackage if 'NoBindingEmbedding!=true'. (#13374)
This fixes an issue where we'd create the stamp file even if 'NoBindingEmbedding' wasn't set.

Also remove SkipBindingResourcePackage property, it doesn't show up anywhere
else in our code base, nor in the history, nor anywhere relevant in Google.
2021-11-19 08:53:01 +01:00
Rolf Bjarne Kvinge eaef8d4da6
[xtro] Fix typo in comment. (#13384) 2021-11-19 08:51:22 +01:00
Rolf Bjarne Kvinge 4412e74a69
Bump Touch.Unit. (#13390)
New commits in spouliot/Touch.Unit:

* spouliot/Touch.Unit@d668e4d [TouchRunner] Exit with a non-zero exit code if the test run failed.

Diff: cbda703583..d668e4d999
2021-11-19 08:20:14 +01:00
Rolf Bjarne Kvinge b99f0a7798
[xtro] Rename 'XMAC*'/'XCAT*/ to 'XMACOS*'/'XMACCATALYST*' to follow the OS naming pattern. (#13391)
This makes it easier to use templated code.
2021-11-19 08:13:43 +01:00
Rolf Bjarne Kvinge d1b5507111
[xtro] Skip numerous validations for deprecated API. (#13383)
There are numerous checks that don't make much sense to report for deprecated
API, so skip those. This also required updating a few .ignore and .todo files.
2021-11-18 16:26:30 +01:00
Rolf Bjarne Kvinge 7d7bc8d25d
[tests] Don't run SCNViewTests on a VM. (#13388)
Hopefully fixes this crash:

    0x7fff6fbad5fd - /usr/lib/system/libsystem_platform.dylib : _sigtramp
    0x354861360 - Unknown
    0x7fff71fb9707 - /System/iOSSupport/System/Library/Frameworks/SceneKit.framework/Versions/A/SceneKit : C3DEngineContextSetRenderContext
    0x7fff720802c0 - /System/iOSSupport/System/Library/Frameworks/SceneKit.framework/Versions/A/SceneKit : -[SCNRenderer _initWithOptions:isPrivateRenderer:privateRendererOwner:clearsOnDraw:context:renderingAPI:]
    0x7fff72126352 - /System/iOSSupport/System/Library/Frameworks/SceneKit.framework/Versions/A/SceneKit : -[SCNView _commonInit:]
    0x7fff72126551 - /System/iOSSupport/System/Library/Frameworks/SceneKit.framework/Versions/A/SceneKit : -[SCNView initWithFrame:options:]
2021-11-18 15:38:46 +01:00
Rolf Bjarne Kvinge 7d5cb3c2b9
[build] Add support for not building for Xamarin.Mac. (#13385)
While generally not useful, because we need Xamarin.Mac to build mlaunch, it
comes in handy sometimes to be able to disable the Mac build (if we do, we'll
automatically use the prebuilt mlaunch binary from macios-binaries).
2021-11-18 15:38:20 +01:00
Manuel de la Pena ee77d2ee11
[CI] Add display names so that we understand the ui better. (#13382) 2021-11-18 09:36:31 -05:00
Rolf Bjarne Kvinge 92a3548d70
[NSObject] Use the null-safe NativeObjectExtensions.GetHandle extension method to get the handle in a few places. (#13358) 2021-11-18 15:31:23 +01:00
Rolf Bjarne Kvinge ff76715caf
[CoreWlan] remove some old API from .NET (#13372) 2021-11-18 15:29:47 +01:00
Rolf Bjarne Kvinge f99b6f56c5
[CoreAnimation] Make CAGradientLayer.CreateColor private in .NET. (#13381)
I see no reason for this method to be public.
2021-11-18 11:24:17 +01:00
Mauro Agnoletti 6e532b401e
Updated Messaging and Hot Restart versions (#13367)
* Updated Xamarin.Messaging version

* Updated Xamarin.iOS.HotRestart.Application version
2021-11-18 09:17:58 +01:00
dotnet-maestro[bot] 884c38d8df
Update dependencies from https://github.com/dotnet/installer build 20211116.16 (#13378)
Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.101-servicing.21565.22 -> To Version 6.0.101-servicing.21566.16

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-11-18 07:51:41 +01:00
Rolf Bjarne Kvinge 76d4b9f798
[mtouch] Remove duplicated source file from project file. (#13361)
Fixes:

> CSC : warning CS2002: Source file '.../xamarin-macios/tools/mtouch/Errors.Designer.cs' specified multiple times [.../xamarin-macios/tools/mtouch/mtouch.csproj]
2021-11-17 18:02:19 +01:00
Manuel de la Pena e29867c2b8
[CI] Move the signature to ESRP (#13376)
Move to use the ESRP service to perform the signing of the frameworks and pkgs.
2021-11-17 10:28:46 -05:00
dotnet-maestro[bot] 3b2bd8a367
Update dependencies from https://github.com/dotnet/installer build 20211115.22 (#13369)
Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.101-servicing.21562.12 -> To Version 6.0.101-servicing.21565.22

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-11-17 10:03:07 +01:00
Rolf Bjarne Kvinge 118bcc148d
[tests] Remove a few unused make variables. (#13375) 2021-11-17 08:05:26 +01:00
Rolf Bjarne Kvinge b647e833ba
[AVFoundation] Adjust availability attribute for AVCaptureStillImageOutput.HighResolutionStillImageOutputEnabled. (#13371) 2021-11-17 08:03:09 +01:00
Rolf Bjarne Kvinge e08cbbb8a9
[tests] Add the compiler response files from src/ to the .NET test builds. (#13351)
This means that the HAS_<FRAMEWORK> defines will now work in .NET test code
(as it already does in legacy test code).
2021-11-17 08:01:31 +01:00
Rolf Bjarne Kvinge bbb7632e24
[tests] Automatically run/exit tests executed from the command line. (#13360)
This is already the default for macOS apps, but this way it behaves the same
for Mac Catalyst as well.
2021-11-16 18:01:41 +01:00
Rolf Bjarne Kvinge 6d321c9f77
[tests] Don't import nunit.frameworks.target more than once. (#13362)
The nunit.framework.targets file is already imported in the
tests/common/shared-dotnet.targets file, which all these files imports as
well.
2021-11-16 16:46:08 +01:00
Rolf Bjarne Kvinge 769482018c
[tests] Create a binlog for the mtouch tests (#13357) 2021-11-16 14:20:31 +01:00
dotnet-maestro[bot] b2d97ffd3f
[main] Update dependencies from dotnet/installer (#13353)
* Update dependencies from https://github.com/dotnet/installer build 20211111.4

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rtm.21552.8 -> To Version 6.0.101-servicing.21561.4

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rtm.21552.8 -> To Version 6.0.101-servicing.21562.12

* [dotnet] Use X.Y.Z00 as the version band for the sdk-manifests path.

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-11-15 22:54:55 +01:00
Rolf Bjarne Kvinge 66e596e9d9
[tests] Change TestRuntime.CheckSystemVersion to take a ApplePlatform value instead of a PlatformName enum. (#13350)
The PlatformName enum will be removed from .NET soon.
2021-11-15 08:06:36 +01:00
Rolf Bjarne Kvinge 7a76bbeb64
[tools] HomeKit was added to Mac Catalyst in 14.0, so mark it as such. (#13333)
* [tools] HomeKit was added to Mac Catalyst in 14.0, so mark it as such.

Fixes this launch crash when executing on macOS 10.15:

    dyld: Library not loaded: /System/iOSSupport/System/Library/Frameworks/HomeKit.framework/Versions/A/HomeKit
      Referenced from: /Users/runner/work/1/s/artifacts/mac-test-package/tests/./linker/ios/dont link/dotnet/MacCatalyst/bin/Debug/net6.0-maccatalyst/maccatalyst-x64/dont link.app/Contents/MacOS/dont link
      Reason: image not found

* [introspection] Skip the default SKView constructor on all platforms, not only macOS.

Fixes a crash on Mac Catalyst.

* Fix SKView skipping logic.
2021-11-15 08:04:56 +01:00
Rolf Bjarne Kvinge a1768573e3
[introspection] Remove a few version checks which are now constant values. (#13348)
* Mac.Is32BitMavericks is always false (we only run on 64-bit macOS), so remove corresponding code.
* Mac.IsElCapitanOrHigher is never used; remove
* Remove a few unused Mac.Version_* fields.
2021-11-15 07:57:39 +01:00
Rolf Bjarne Kvinge ac6f75b55a
[EmbeddedResources] Add helper makefiles for .NET testing. (#13349) 2021-11-12 16:26:42 +01:00
Rolf Bjarne Kvinge ab5bf2faba
[msbuild/dotnet] Build the Xamarin.PreBuilt.iOS app bundle. Fixes #12945. (#13342)
Build the Xamarin.PreBuilt.iOS app bundle instead of using a prebuilt bundle.

This makes sure that we're always using the latest BCL.

Some accurate build massaging was needed, because:

* To build the prebuilt app we need the iOS workload installed (into our build-local
  .NET installation).
* The iOS workload contains the Microsoft.iOS.Windows.Sdk pack.
* The Microsoft.iOS.Windows.Sdk pack contains the prebuilt app.

Thus we had a circular reference. Fortunately, the Microsoft.iOS.Windows.Sdk pack
is only required on Windows, which means we can break this circular reference by:

* Mark Microsoft.iOS.Windows.Sdk pack as only to be installed on Windows (unfortunately
  it seems we have to list the exact runtime identifiers for the platforms where
  to install the pack, so we can't do something like "win-*", but new variations
  of the "win-*" runtime identifier shouldn't show up all that often).
* Build the prebuilt app on macOS.

This way we don't need the Microsoft.iOS.Windows.Sdk pack when installing the iOS
workload locally.

The .NET build order is now:

* Build general sdk, runtime and ref packs for .NET.
* Build the prebuilt app.
* Build the Microsoft.iOS.Windows.Sdk pack.

Fixes https://github.com/xamarin/xamarin-macios/issues/12945.
2021-11-12 07:38:07 +01:00
Rolf Bjarne Kvinge 9154b6eddd
[mtouch] Fix logic to determine whether we're using Mono.framework on watchOS. (#13343)
The previous "8.0" sdk version check is incorrect (that's "iOS 8.0", the first
iOS version to add support for user frameworks). However, it started kicking
in for watchOS 8.0, and now suddenly we're trying to build all watchOS
extensions with Mono.framework, which is not what we want.

Instead modify the code to:

* Split by platform, keep the existing behavior for iOS, tvOS and Mac Catalyst
  (since "8.0" is the correct version check for all those platforms).
* Use the Mono framework in watchOS if either of the following are true:
	* In the main watchOS extension if it has nested extensions.
	* In any other extensions (because they'll be nested extensions).

Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1430408
2021-11-12 07:33:44 +01:00
Rolf Bjarne Kvinge e2fdc5e1e6
[SystemLog] Enable nullability + a few other fixes. (#13344)
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instaed of string constants.
2021-11-12 07:32:59 +01:00
Manuel de la Pena 4f8a0e624a
[CI] Remove a OS check not longer needed after the bots have been updated. (#13345) 2021-11-11 17:59:34 -05:00
Rolf Bjarne Kvinge 2d9b9a1004
[devops] Add a 30/60 minute timeout to the steps to install dependencies + run macOS tests. (#13341) 2021-11-11 20:07:43 +01:00
Rolf Bjarne Kvinge 058afbd78c
[DisposableObject] Fix typo in comment. (#13331) 2021-11-11 20:07:01 +01:00
Rolf Bjarne Kvinge 77bba53adb
[CGBitmapContext] Call the correct base constructor to specify ownership. Fixes #13309. (#13310)
This way we don't leak the CGBitmapContext.s

Fixes https://github.com/xamarin/xamarin-macios/issues/13309.
2021-11-11 16:08:15 +01:00
Rolf Bjarne Kvinge a2e2fef0c2
[introspection] Fix macOS 10.15 version checks. (#13315)
The logic seems to want to verify MPSPredicate on maOS 10.14, but not on macOS
10.15+. But checking for macOS 10.14 is always successful on macOS 10.15+,
which means that we can't check for macOS 10.14 before checking macOS 10.15.
So I moved the macOS 10.14 check to after the macOS 10.15 check, but that made
the macOS 10.14 check redundant, because both branches of the condition did
the same thing, so I removed the whole check.

Fixes this introspectionf failure:

    [FAIL] DefaultCtorAllowed :   1 potential errors found in 1387 default ctor validated:
        Default constructor not allowed for MetalPerformanceShaders.MPSPredicate : Could not initialize an instance of the type 'MetalPerformanceShaders.MPSPredicate': the native 'init' method returned nil.
2021-11-11 16:07:51 +01:00
Rolf Bjarne Kvinge 28b3cf37e5
[GLKit] GLKTextureLoaderGrayscaleAsAlpha was available starting in macOS 10.14 (#13314)
Fixes:

> GLKit/GLTextureLoader.cs(207,39): error CS0117: 'GLKTextureLoader' does not contain a definition for 'GrayscaleAsAlpha'
2021-11-11 16:07:29 +01:00
Rolf Bjarne Kvinge 8f614c618c
[src] Use 'csc -refout' to generate reference assemblies instead of mono-cil-strip. (#13336)
mono-cil-strip is buggy, and may generate invalid assemblies.

Ref: https://github.com/dotnet/runtime/issues/61402#issuecomment-965753455

Fixes https://github.com/xamarin/xamarin-macios/issues/12749.
2021-11-11 15:35:52 +01:00
Rolf Bjarne Kvinge 7b2699c5ad
[compare-commits] Ignore *.binlog files when creating a diff of the generated files. (#13338)
Removes this from the generator diff, which happens on every build:

    diff --git a/build/common/bgen.exe.binlog b/build-new/common/bgen.exe.binlog
    index fc4ecd1fe..3b0503171 100644
    Binary files a/build/common/bgen.exe.binlog and b/build-new/common/bgen.exe.binlog differ
2021-11-11 15:33:43 +01:00
Rolf Bjarne Kvinge eb2562b448
[NSData] Enable nullability + a few other code updates (#13339)
* Remove the internal (IntPtr, bool) constructor, it has non-standard semantics and it's confusing.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
2021-11-11 15:33:28 +01:00
Rolf Bjarne Kvinge d20b0401db
[ARKit/SoundAnalysis] Fix BindAs attribute for .NET (#13335)
The [return: ...] syntax doesn't work for properties. The intention was clear
though, so fix the attribute syntax to do the right thing for .NET.
2021-11-11 14:40:08 +01:00