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

12416 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 0cb2591e1a [xtro] Run autosanitize on the .NET annotations to update annotations according to current API. 2021-11-24 15:39:04 +01:00
Rolf Bjarne Kvinge 70333367a0 [xtro] Adjust the .NET annotations for nfloat and NSWritingDirection move. 2021-11-24 15:39:04 +01:00
Rolf Bjarne Kvinge aac316efbb [xtro] Add .NET annotations. 2021-11-24 15:39:03 +01:00
Rolf Bjarne Kvinge 14c7909317 [xtro] Have a different map between native and managed enums for .NET and legacy Xamarin.
We've fixed a few managed enum names to match the native counterpart in .NET, which
means we need a different map too.
2021-11-24 15:39:03 +01:00
Rolf Bjarne Kvinge fc39a0df5b [xtro-sharpie] Detect UnsupportedOSPlatform attributes as a deprecation attribute. 2021-11-24 15:39:03 +01:00
Rolf Bjarne Kvinge fa55aab0b2 [xtro] Point to the actual .ignore file location when reporting ?unknown-entry?
This makes the output clearer when we have ignore files in multiple directories.
2021-11-24 15:39:03 +01:00
Rolf Bjarne Kvinge 7e255ddcb5 [xharness] Add support for running xtro in .NET mode. 2021-11-24 15:39:03 +01:00
Rolf Bjarne Kvinge 234f593511 [xtro] Run on .NET assemblies. 2021-11-24 15:39:03 +01:00
Rolf Bjarne Kvinge 87c4fb0669 [xtro-report] Honor the input directory in a few places. 2021-11-24 15:39:03 +01:00
Rolf Bjarne Kvinge 4baa67a07d
[xtro] Improve makefile. (#13424)
* Use proper dependency tracking, so that we'll only rebuild what needs to be rebuilt
  when rebuilding. This required using a few stamp files. It also improves parallel
  builds.
* Remove *.raw files before running xtro-sharpie, and only for the current platform.
  This makes sure rebuilds of just some of the platforms work correctly (because
  the *.raw files for other platforms are still around when needed).
* Build the u2todo project file instead of manually calling csc.
2021-11-24 15:38:10 +01:00
Rolf Bjarne Kvinge 03b352036a
[LocalAuthentication] Adjust code for .NET and fix availability of LAContext.MaxBiometryFailures (#13425)
* LAContext.MaxBiometryFailures is available in macOS, just deprecated, so mark
  it as such.
* Remove deprecated code from .NET.
* Update xtro definitions.
2021-11-24 15:37:56 +01:00
Rolf Bjarne Kvinge 98d7c95020
[MediaPlayer] Remove deprecated/removed API in .NET (#13427)
* [MediaPlayer] Remove deprecated/removed API in .NET

* [tests] Fix monotouch-test according to API changes.
2021-11-24 15:37:23 +01:00
Rolf Bjarne Kvinge 84c147a1db
[tests] Give up on LinkSdkRegressionTest.SpecialFolder on macOS and Mac Catalyst for the Favorites and Fonts folders (#13429)
* [tests] Try to fix LinkSdkRegressionTest.SpecialFolder on macOS 10.15.

* I give up.
2021-11-24 15:37:02 +01:00
Rolf Bjarne Kvinge 5dd5d260fa
[Security] Add kSecUseNoAuthenticationUI for macOS. (#13431)
The kSecUseNoAuthenticationUI field is available on macOS, just deprecated,
and I don't see how having the field bound would be a breaking change like the
comment says (git history seems to indicate it's referring to the
Classic/Unified switchover - i.e. quite outdated), so add the field to macOS.
2021-11-24 15:35:46 +01:00
Rolf Bjarne Kvinge 2901f7aba6
[tests] Adjust FontTest to cope with broken GameKit/UIKit/fontWithSize on certain macOS versions. (#13428)
Fixes:

    MonoTouchFixtures.UIKit.FontTest
        CoreText note: Client requested name ".SFNS-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
        CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
            [FAIL] NullFonts :   WithSize
            Expected: not null
            But was:  null
                at MonoTouchFixtures.UIKit.FontTest.NullFonts() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/UIKit/FontTest.cs:line 165
2021-11-24 08:07:30 +01:00
Rolf Bjarne Kvinge 7cba4adf0d
[src] Don't use deprecated API. (#13435)
Use the non-deprecated version, which will work in both legacy Xamarin and .NET.
2021-11-24 07:40:56 +01:00
Rolf Bjarne Kvinge f5b5a1cd99
[StoreKit] Remove XAMCORE_4_0 that seems incorrect. (#13434)
From what I can see for current Apple API these XAMCORE_4_0 exclusions are
incorrect.

Fixes (when building with XAMCORE_4_0):

> storekit.cs(834,79): error CS0246: The type or namespace name 'SKProductStorePromotionVisibility' could not be found (are you missing a using directive or an assembly reference?)
> storekit.cs(838,16): error CS0246: The type or namespace name 'SKProductStorePromotionVisibility' could not be found (are you missing a using directive or an assembly reference?)
2021-11-24 07:40:12 +01:00
Rolf Bjarne Kvinge fd126c8261
[msbuild] Use the correct logic to determine the PlugIns directory for all platforms. Fixes #13415. (#13418)
The '_AppExtensionRoot' contains the correct parent directory of the 'PlugIns'
directory for all platforms, so use that instead of appending 'PlugIns' to
'_AppBundlePath' - which is incorrect on macOS and Mac Catalyst, because the
'PlugIns' parent directory is '$(_AppBundlePath)/Contents' on those platforms.

Fixes https://github.com/xamarin/xamarin-macios/issues/13415.
2021-11-23 18:34:11 +01:00
Rolf Bjarne Kvinge 2b7b0bd2d9
[AppKit] Remove wrong XAMCORE_4_0 code for a few enums that are correctly marked as native enums. (#13430)
* [AppKit] NSTextMovement is defined to be an NSInteger, so keep this as a native enum in .NET.

* [AppKit] NSWindowStyle is defined to be an NSUInteger, so keep this as a native enum in .NET.

* [AppKit] NSWindowNumberListOptions is defined to be an NSUInteger, so keep this as a native enum in .NET.
2021-11-23 16:26:14 +01:00
Rolf Bjarne Kvinge dbdebb4522
[dotnet] Import the aliased pack name, not the actual pack name. (#13426)
This fixes an issue where dotnet restore would fail trying to find the pack.

Also make the aliased name look more like the other names.
2021-11-23 15:53:08 +01:00
Rolf Bjarne Kvinge 5663dc79c1
[AppKit] Add a missing NullAllowed. (#13421) 2021-11-22 23:44:49 +01:00
Rolf Bjarne Kvinge ff345ba4eb
[xtro-sanity] Pass the included platforms as command line arguments. (#13420)
This avoids the need to compute them, and makes it possible to have multiple sets
of platforms.
2021-11-22 23:24:25 +01:00
Manuel de la Pena 2022a93cce
[CI] Allow to manually skip governance tests when triggering a build by hand. (#13379) 2021-11-22 15:23:22 -05:00
Rolf Bjarne Kvinge 5329b19f62
[introspection] Migrate .NET code to use the new .NET-style availability attributes. (#13363)
* [tools] Extract the logic to parse OSPlatformAttribute platform names to a separate file/class.

* [introspection] Migrate .NET code to use the new .NET-style availability attributes.

This also means using the 'ApplePlatform' enum instead of the 'PlatformName'
enum, because the latter will be removed in .NET.

* [FileProvider] Exclude some deprecated API from .NET.

* [AVFoundation] Adjust availability attribute for AVCaptureStillImageOutput.HighResolutionStillImageOutputEnabled.

* Update tests.
2021-11-22 20:54:07 +01:00
Rolf Bjarne Kvinge b55ee6d521
[xtro] Improve enum check. (#13396)
* Unify the signed and unsigned implementations. We lose some type-safety (because
  we have to use 'object' as the unifying type between long and ulong), but we minimize
  code duplication, so the code becomes easier to maintain.
* Add an additional check for managed enum values that show up in the native header,
  but aren't available on the current platform.
2021-11-22 18:51:12 +01:00
Rolf Bjarne Kvinge 6302878ad5
[runtime] Implement storing the original working directory for later retrieval for .NET. Fixes #13392. (#13403)
This also adds the Runtime.OriginalWorkingDirectory to all platforms.

Fixes https://github.com/xamarin/xamarin-macios/issues/13392.
2021-11-22 18:50:28 +01:00
Rolf Bjarne Kvinge 3c5dfab710
[xtro-sharpie] Add support for specifying the output directory. (#13408)
This makes it possible to have a different output directory for .NET assemblies.
2021-11-22 18:50:17 +01:00
Rolf Bjarne Kvinge 47792e1461
[AddressbookUI] Don't use new-style availability attributes in api definitions. (#13410) 2021-11-22 18:49:51 +01:00
Rolf Bjarne Kvinge 88eb5e1ac8
Rename any *OSX_SDK_VERSION variables to *MACOS_SDK_VERSION. (#13411)
This makes it easier to iterate over all the *_SDK_VERSION variables in
template code, because they're all named using the standard platform names we
use elsewhere.
2021-11-22 18:48:05 +01:00
Rolf Bjarne Kvinge f8305e213f
Bump xharness. (#13406)
To get this fix: 769755cc98
2021-11-22 11:25:51 -05:00
Manuel de la Pena e192be9465
[CI] Renable the steps to run the device tests (#13407) 2021-11-22 10:05:26 -05:00
Rolf Bjarne Kvinge 7fb12bc441
[tests] Disable signing in the Xamarin.MTouch.BindingLibraryDSymCreated test. Fixes #13404. (#13405)
The test builds an app that wants to be signed - but that requires signing
certificates. Instead just change the test to not require signing.

Fixes https://github.com/xamarin/xamarin-macios/issues/13404.
2021-11-22 14:18:00 +01:00
Rolf Bjarne Kvinge faa966ba20
[AudioUnit] Only create the GCHandle to self when we need it. (#13397) 2021-11-22 08:14:51 +01:00
Rolf Bjarne Kvinge 72c369ad7e
[devops] Install our provisioning profiles before the actual build as well. (#13412)
Install our test provisioning profiles + certificates before the build,
because we might need them during the build for the hotrestart prebuilt app.

Ref: https://github.com/xamarin/xamarin-macios/issues/13355.
2021-11-22 08:13:55 +01:00
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