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

12249 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge fb11284785
[src] Remove the Xamarin.iOS.dll reference assembly for Mac Catalyst. (#13455)
* [src] Remove the Xamarin.iOS.dll reference assembly for Mac Catalyst.

Xamarin.iOS.dll won't be compatible with Mac Catalyst in .NET 6 (because there
won't be any backwards compatibility), so we don't need the assembly that has
type forwarders to Xamarin.MacCatalyst.dll.

* Bump MonoTouch.Dialog

New commits in migueldeicaza/MonoTouch.Dialog:

* migueldeicaza/MonoTouch.Dialog@4d0e0a9 Remove usages of UIWebView when compiling for Mac Catalyst.

Diff: 5a05c6912e..4d0e0a9a5f

* [tests] There's no NSFileProviderPage in Mac Catalyst.

* [tests] Fix CBUUID link sdk test to work correctly on Mac Catalyst.
2021-11-29 23:14:25 +01:00
Rolf Bjarne Kvinge 2aa21751a6
[dotnet] Show an error if an app developer tries to publish a simulator architecture. (#13462)
* [dotnet] Show an error if an app developer tries to publish a simulator architecture.

* We can't publish a simulator build, so show an error in that case.
* We can't change the default runtime identifier when publishing (to a
  publishable runtime identifier), because by the time we know we're
  publishing, it's too late to change the runtime identifier. This means that
  it'll be required for app developers to specify a runtime identifier when
  publishing to a mobile platform, since the current default runtime
  identifier is for a simulator build.

Partial fix for https://github.com/xamarin/xamarin-macios/issues/12997.

* Fix typo and improve naming.

* [dotnet] Don't use '_UsingDefaultRuntimeIdentifier', it's already used elsewhere in .NET
2021-11-29 23:13:48 +01:00
Rolf Bjarne Kvinge ac1f871651
[dotnet] Bump to preview 12. (#13466) 2021-11-29 23:13:28 +01:00
Manuel de la Pena d48ee5a585
[CI] Do call the isnertion tempalte on release pipelines. (#13438) 2021-11-29 11:14:00 -05:00
Rolf Bjarne Kvinge 00482325d1
[src] Add missing availability attributes in a few places. (#13422)
* [src] Add missing availability attributes in a few places.

* [src] Don't add availability attributes to error enums.

* [introspection] Change version check for Mac Catalyst to be 'greater than'.

We have a tests that verifies that the availability attributes for an API
doesn't state that the API was deprecated before or when it was introduced.

This sounds reasonable, except that Apple has introduced and deprecated entire
frameworks in the same Mac Catalyst version (probably because Apple decided to
port an already deprecated framework to Mac Catalyst).

Our test for this scenario was a bit too eager; this change will make it so
that (for Mac Catalyst only), we accept APIs that are introduced and
deprecated in the same Mac Catalyst version (not not APIs that were deprecated
before they were introduced).
2021-11-29 07:58:16 +01:00
Rolf Bjarne Kvinge e2cacb8931
[msbuild] Don't use custom logic to handle facades in .NET. (#13461)
It's not needed, and may in some cases do the wrong thing: for instance, this
logic will automatically reference any *.dll files in the project directory,
which breaks the build if those *.dll files aren't actually assemblies.
2021-11-29 07:54:47 +01:00
Rolf Bjarne Kvinge c02cc7e27d
[introspection] Fix the ApiFrameworkTest.Simlauncher test to fail in case of errors. (#13456)
* Assert at the end of the test if there were any errors.
* Don't run this test for .NET, since we don't use a simlauncher in .NET.
2021-11-26 20:14:38 +01:00
Rolf Bjarne Kvinge 32b32a6b32
[SceneKit] Fix SCNBufferBindingHandler signature for .NET. (#13457)
> error BI1106: bgen: The parameter shadable in the method SceneKit.SCNBufferBindingHandler.Invoke exposes a model (SceneKit.SCNShadable). Please expose the corresponding protocol type instead (SceneKit.ISCNShadable)
2021-11-26 20:14:17 +01:00
Rolf Bjarne Kvinge 16d4470211
[Foundation] Fix NSUrlSessionHandler.[Un]schedule overloads to have the correct signature for .NET. (#13458) 2021-11-26 20:03:53 +01:00
Rolf Bjarne Kvinge 3f9666a8f7
[AppKit] Change NSTextViewDelegate.DraggedCell to use the recommended signature for .NET (#13460)
* [AppKit] Change NSTextViewDelegate.DraggedCell to use the recommended signature for .NET

The 'textView:draggedCell:inRect:event:' selector has been deprecated since
macOS 10.6, so just replace this with the recommended alternative.

* [generator] Make sure code compiles for parameter names that match C# keywords.
2021-11-26 20:02:15 +01:00
Rolf Bjarne Kvinge 2bb5fc88c5
[src] Adjust visibility of numerous (IntPtr) and (IntPtr, bool) constructors (#13444)
* There should be no public (IntPtr) constructor, at most there should be a
  protected one for NSObject subclasses. There should be no such constructors
  for classes that just implement INativeObject.
* There should be no public (IntPtr, bool) constructor at all, they should all
  be internal.
* If changing the visibility or removing the ctor is a breaking change, then
  make it happen for .NET only.
2021-11-26 14:24:05 +01:00
Rolf Bjarne Kvinge b9e8d4869d
[xtro] Don't report missing availability attributes for enums representing errors. (#13445)
* We don't want availability attributes for enums that represent errors,
  because the code would end up unnecessarily complex to avoid warnings.
* We even have other tests to verify as much (cecil tests).
2021-11-26 07:22:58 +01:00
Rolf Bjarne Kvinge 85a9791b51
[tests] Some improvements for the bindings-test2 project for .NET. (#13447)
* Remove the watchOS project, we don't support watchOS for .NET at the moment.
* Rename shared.targets to shared.csproj to match all the other test projects.
* Move a bit more code into the shared project file (shared.csproj).
* Add a Makefile for each platform.
2021-11-26 07:22:34 +01:00
Rolf Bjarne Kvinge d51835b5b3
[AVFoundation] Fix availability for a few enums (#13451)
None of these are deprecated, so no reason for them to not exist in .NET.

Also update the availability attributes according to current headers.
2021-11-26 07:21:30 +01:00
Rolf Bjarne Kvinge 9013c72591
[AppKit] Remove the NSLayoutManager.LayoutOptions property and the NSGlyphStorageOptions enum in .NET. (#13453)
The former has been removed from the headers, so it's thoroughly deprecated,
and the latter is no longer needed anymore since it was only used by the
former.
2021-11-26 07:20:36 +01:00
Rolf Bjarne Kvinge 5ab9883af9
[AppKit] Remove NSAlertType from .NET, it's not used anywhere in our API, and it's deprecated in the headers. (#13454) 2021-11-26 07:20:21 +01:00
Rolf Bjarne Kvinge c4e441f6cd
[ObjCRuntime] There's no need to look up our own functions dynamically for Xamarin.Mac in .NET. (#13449)
We'll always be a self-contained app, with our libxamarin code linked
statically into the executable, so we can use plain P/Invokes.
2021-11-26 07:18:31 +01:00
Rolf Bjarne Kvinge ce5dd1e61b
[AppKit] Remove NSKey from .NET, it's not used anywhere in our API, nor can I find it in headers. (#13448)
xtro also agrees that it shouldn't exist.
2021-11-25 23:37:48 +01:00
Rolf Bjarne Kvinge 9f219cc4da
[AppKit] Update NSGraphicsContext. (#13450) 2021-11-25 23:15:57 +01:00
Rolf Bjarne Kvinge cbaead3753
[xtro] Remove unused file. (#13452)
Delete the 'osx.pending' file, it's not used. It looks like it should have
been removed in fffaba2414 (where the *.pending
files for the other platforms were removed).
2021-11-25 23:01:12 +01:00
Rolf Bjarne Kvinge 0c50905fc5
[tests] Fix boolean logic when checking for macOS version between 11.0 and 12.0 (#13446) 2021-11-25 22:35:24 +01:00
Rolf Bjarne Kvinge 98f1dc8350
[src] Remove the legacy build of Xamarin.MacCatalyst.dll (#13175)
We decided some time ago that Mac Catalyst will only be supported in .NET,
so building it for legacy Xamarin is wasteful.

This should speed up the src/ build somewhat.
2021-11-25 19:26:12 +01:00
Rolf Bjarne Kvinge f52f763fa7 [xtro] Remove support for legacy Mac Catalyst. 2021-11-25 11:48:38 +01:00
Rolf Bjarne Kvinge 6ce8ac93c0 Merge remote-tracking branch 'origin/main' into src-remove-legacy-maccatalyst 2021-11-25 08:11:32 +01:00
Rolf Bjarne Kvinge a0311c4734
[CFMessagePort] Simplify construction and fix c&p error in Dispose. (#13440)
* There's no need to initialize the contextHandle field to IntPtr.Zero, since
  that's the default value anyway. This avoid adding useless code to all the
  constructors.
* Fix removing the contextHandle entry from the messagePortContexts
  dictionary, by not trying to remove it from the wrong dictionary.
2021-11-25 07:36:48 +01:00
Rolf Bjarne Kvinge 1532a5cc59
[NWWebSocketOptions] No need to initialize to default value. (#13441)
This ends up as actual code in all the constructors.
2021-11-25 07:36:36 +01:00
Rolf Bjarne Kvinge df4399bbde
[CGImageSource] Change CreateThumbnail to return null if the thumbnail creation fails. (#13443)
Otherwise we'll create a CGImage with a zero Handle, which is usually not the
right thing to do. Still, keep the old behavior for legacy Xamarin for the
sake of backwards compat.
2021-11-25 07:36:24 +01:00
Rolf Bjarne Kvinge aef009b90d
[xtro] Add support for running for .NET assemblies. Fixes #13236. (#13439)
* Add support for running xtro for .NET assemblies.
* This also means adding a separate set of .todo and .ignore files for the
  .NET assemblies.
* Run both mode in xharness.

Fixes https://github.com/xamarin/xamarin-macios/issues/13236.
2021-11-25 07:35:39 +01:00
Rolf Bjarne Kvinge f916702568 [xharness] Don't run both legacy and .NET xtro at the same time. 2021-11-25 00:20:22 +01:00
Rolf Bjarne Kvinge 9cba70d183 [xtro] Update annotations. 2021-11-24 17:05:35 +01:00
Rolf Bjarne Kvinge 25b41c7ac3 [xtro] Fix dependencies for the .NET report. 2021-11-24 16:55:13 +01:00
Rolf Bjarne Kvinge 4afc8f7e3f
[dotnet] Put packages (.ipa/.pkg) in the publish directory by default. (#13436)
Partial fix for #12997.
2021-11-24 16:00:16 +01:00
Rolf Bjarne Kvinge 4445606653 [xtro] Run u2todo on the .NET annotations to update annotations according to current API. 2021-11-24 15:39:04 +01:00
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