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

5552 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge e44d0fd047
[.NET] Rename several DOTNET6_* variables to to DOTNET_*. (#14463)
Also rename DOTNET_VERSION to SYSTEM_DOTNET_VERSION to make it clear what it's
referring to (and to not clash with DOTNET6_VERSION which has now been renamed
to DOTNET_VERSION).

.NET 7 is right around the corner.
2022-03-23 08:07:34 +01:00
Rolf Bjarne Kvinge d886a6d19b [tests] Update tests to cope with app extensions signed at a different moment during the build.
App extensions are now signed when the main app is signed (and not by themselves),
which means that in tests we can't assert that. So remove those asserts, and instead
add asserts to verify that app extensions are signed when the main app is signed.
2022-03-22 16:14:07 +01:00
Rolf Bjarne Kvinge a2c3d7d225 [tests] We can't call dsymutil/strip on static libraries, so mark them as such. 2022-03-22 16:14:07 +01:00
Rolf Bjarne Kvinge a04e653d24 [tests] Augment .NET tests to verify .dSYM presence at the end of a build 2022-03-22 16:14:26 +01:00
Rolf Bjarne Kvinge e5c81564e2 [msbuild/dotnet] Rework how we handle app bundle post processing. Fixes #14067.
Change dSYM generation and native stripping to occur immediately before code signing,
in a newly minted post processing target.

Challenges:

* Both calling 'strip' and 'codesign' on an executable modifies that executable,
  which means that we must make sure to not call 'dsymutil' on the same binary at
  a later point unless it's been rebuilt.
* Thus we must make sure to update 'dsymutil's stamp file whenever we call 'strip'
  and/or 'codesign' on an executable.
* Just like for code signing, we must store the libraries (either static or dynamic)
  we post process in extension/watch/rid-specific projects, so that these libraries
  can be loaded in containing projects and processed there.
* In universal .NET builds, debug symbols are created for the universal app bundle,
  not for each rid-specific version of the app bundle. So I had to add logic to create
  the native symbol lists (MtouchSymbolsList) for each rid-specific build, but then
  collect them and merge those lists for the universal app bundle.

The existing SymbolStrip call we did right after linking the native executable has
been removed, because we have to do that after creating the dSYM (which the GenerateDebugSymbols
target does).

Also add tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/14067.
2022-03-22 16:14:26 +01:00
Rolf Bjarne Kvinge 6c30c3ab22 [msbuild] Save/restore all the NativeReference metadata.
* Save all the NativeReference metadata in binding resource packages.
* Copy all the NativeReference metadata to new items when resolving native references.

This makes it possible to set custom metadata on NativeReferences, and have that
metadata show up when it's needed, which might not be in the same project (for instance
if the native reference is in a binding project, we might want the custom metadata
when we load the native references from the binding project's resource package -
another case is when app extensions have native references, we might want any custom
metadata in the main executable project to know how to handle certain types of native
references).

Also sort the metadata we write to binding resource packages, so that the output
is stable. This required updating the corresponding tests.
2022-03-22 16:14:07 +01:00
Rolf Bjarne Kvinge 7d500da2bf
[msbuild] Rework code signing. (#14387)
The main theme here is that code signing will be done in the outermost
executable project, not in any app extension projects or watch projects, nor
during the RID-specific build of a .NET universal app. This makes codesigning
easier to reason about and other affected logic (such as strip/dsymutil)
easier to handle, in particular for .NET universal apps. Another benefit is
that the differences between the iOS and macOS code bases have been
eliminated.

The first step is to collect all the information we need from the targets
files. Every app bundle (be it app extension, watch app or main app) will add
its own output app bundle (.app/.appex) to the _CodesignBundle item group.
Then every app bundle will load this informarion from referenced app bundles,
and finally store this information on disk (in the 'codesign-bundle.items'
file). This means that in the end the main app bundle will have a list of all
contained app bundles in the app (recursively), in the _CodesignBundle item
group.

Separately we keep a list of other items that need signing, in the
_CodesignItems item group, and we do the same store/load logic for every
contained/contained app bundle (in the 'codesign.items' file, so a the end the
main app bundle will have a list of all the _CodesignItems for all contained
app bundles (recursively).

The previous steps occur in the _CollectCodesigningData and
_StoreCodesigningData targets.

The next step is to use the new ComputeCodesignItems task to compute
everything we need to know for code signing. This task takes over the
responsibility for listing all the *.dylib and *.metallib files, and the
*.framework directories in the app bundles, that need signing (which was
previously done in the targets file). This logic is significantly easier to
write, debug and test in C# than MSBuild.

In addition the ComputeCodesignItems also figures out a stamp file path we use
to determine if something needs (re-)signing. Previously .framework
directories did not have a stamp location, so they'd always end up resigned in
a rebuild, while now we'll automatically skip signing *.framework directories
unless something changed in them.

I've also tried to comment everything thorougly, for the next poor soul having
to deal with any bugs.

Behavioral differences:

* We were always signing *.dylib files for macOS. We're now doing the same
  thing for all platforms.
* We're now always signing *.framework directories for all platforms (like we
  do for *.dylib files), since frameworks are pretty much like dylibs anyways.

I've verified that this works both by running the submission tests and running
and launching a sample project on device from Windows.
2022-03-22 12:53:58 +01:00
Rolf Bjarne Kvinge e369f466f7
[dotnet] Rename the DOTNET6 make variable to DOTNET. (#14441)
This is the follow-up to where the DOTNET variable was renamed SYSTEM_DOTNET.
2022-03-21 15:56:57 +01:00
Rolf Bjarne Kvinge 4fadad76af
[tests] Add better diagnostics for failure to parse json document in AssetTest. (#14439)
Ref: https://github.com/xamarin/maccore/issues/2559
2022-03-21 12:15:36 +01:00
Rolf Bjarne Kvinge 0280c3d9f1
[tests] Augment TestRuntime.IgnoreInCI to detect Azure DevOps. Fixes #2557. (#14440)
Fixes https://github.com/xamarin/maccore/issues/2557.
2022-03-21 12:10:50 +01:00
Rolf Bjarne Kvinge bf05f39f37
[xtro] Unify the <platform>-CHIP.ignore files into a common-CHIP.ignore file. (#14401) 2022-03-21 10:16:07 +01:00
Rolf Bjarne Kvinge d3643414e7
[dotnet] Rename the DOTNET make variable to SYSTEM_DOTNET. (#14416)
This makes it line up with our other make variables (SYSTEM_MSBUILD,
SYSTEM_MONO, SYSTEM_CSC, etc.), and also prepares for removing the version
from the DOTNET6 variable (so that it becomes just DOTNET).
2022-03-17 10:26:59 +01:00
Rolf Bjarne Kvinge 2afb9fc40e
[tests] Print labels after each MSBuild test when running from the command line. (#14428)
The advantage of writing the label after each test is that the test result will also
be printed, which means it's possible to see if any tests failed during the test
run, as opposed to having to wait until the entire test run is completed (which can
take a while) to realize that pretty much every test failed with some silly mistake
which could have been quickly fixed before re-running the tests.
2022-03-17 10:12:32 +01:00
Rolf Bjarne Kvinge ee60f025ba
[tests] Improve an assert message slightly. (#14429) 2022-03-17 10:07:32 +01:00
Rolf Bjarne Kvinge 1c261ff741
[tests] Make a few .NET tests a bit less noisy. (#14430) 2022-03-17 10:02:39 +01:00
Rolf Bjarne Kvinge 3d05542677 [msbuild] Rework code signing.
The main theme here is that code signing will be done in the outermost executable
project, not in any app extension projects or watch projects, nor during the RID-specific
build of a .NET universal app. This makes codesigning easier to reason about and
other affected logic (such as strip/dsymutil) easier to handle, in particular for
.NET universal apps. Another benefit is that the differences between the iOS and
macOS code bases have been eliminated.

The first step is to collect all the information we need from the targets files.
Every app bundle (be it app extension, watch app or main app) will add its own output
app bundle (.app/.appex) to the _CodesignBundle item group. Then every app bundle
will load this informarion from referenced app bundles, and finally store this information
on disk (in the 'codesign-bundle.items' file). This means that in the end the main
app bundle will have a list of all contained app bundles in the app (recursively),
in the _CodesignBundle item group.

Separately we keep a list of other items that need signing, in the _CodesignItems
item group, and we do the same store/load logic for every contained/contained app
bundle (in the 'codesign.items' file, so a the end the main app bundle will have
a list of all the _CodesignItems for all contained app bundles (recursively).

The previous steps occur in the _CollectCodesigningData and _StoreCodesigningData
targets.

The next step is to use the new ComputeCodesignItems task to compute everything we
need to know for code signing. This task takes over the responsibility for listing
all the *.dylib and *.metallib files, and the *.framework directories in the app
bundles, that need signing (which was previously done in the targets file). This
logic is significantly easier to write, debug and test in C# than MSBuild.

In addition the ComputeCodesignItems also figures out a stamp file path we use to
determine if something needs (re-)signing. Previously .framework directories did
not have a stamp location, so they'd always end up resigned in a rebuild, while now
we'll automatically skip signing *.framework directories unless something changed
in them.

I've also tried to comment everything thorougly, for the next poor soul having to
deal with any bugs, as well has adding a comprehensive test for the new task.

Behavioral differences:

* We were always signing *.dylib files for macOS. We're now doing the same thing
  for all platforms.
* We're now always signing *.framework directories for all platforms (like we do
  for *.dylib files), since frameworks are pretty much like dylibs anyways.
2022-03-16 21:00:15 +01:00
Rolf Bjarne Kvinge dfa9ce986a
[xharness] Ignore case when comparing node names. (#14397)
MSBuild is case-insensitive, so xharness needs to be the same way.

This fixes an issue where xharness would not process 'CodeSignEntitlements'
properties, because xharness was looking for 'CodesignEntitlements'
properties.
2022-03-16 20:59:59 +01:00
Alex Soto c7dc47ed59 [ScreenCaptureKit] Add new Framework to todo 2022-03-14 22:54:34 -04:00
Alex Soto 60f012c328 [ReplayKit] Update bindings up to Xcode 13.3 Beta 3 2022-03-14 22:54:34 -04:00
Alex Soto edc55e0283 [ProximityReader] Ignoring this framework nothing useful to bind 2022-03-14 22:54:34 -04:00
Alex Soto 31970e83c8 [Network] Add Framework to todo 2022-03-14 22:54:34 -04:00
Alex Soto e24151b438 [MetalPerformanceShadersGraph] Add Framework to todo
We can update it once https://github.com/xamarin/xamarin-macios/pull/14303 lands
2022-03-14 22:54:34 -04:00
Alex Soto 5ca983925d [MediaSetup] Add MacCat framework to the todo list 2022-03-14 22:54:34 -04:00
Alex Soto cf9f4aa446 [HomeKit] Update bindings up to Xcode 13.3 Beta 3 2022-03-14 22:54:34 -04:00
Alex Soto cf0cabbf64 [CoreMotion] Update bindings up to Xcode 13.3 Beta 3 2022-03-14 22:54:34 -04:00
Alex Soto f1257d8095 [CoreMediaIO] Add new macOS framework to todo 2022-03-14 22:54:34 -04:00
Alex Soto 858c60474e [CellularDataDiagnosticsSuite] Wait to bind this new one until GA 2022-03-14 22:54:33 -04:00
Alex Soto 03bdc33103 [CarPlay] Update bindings up to Xcode 13.3 Beta 3 2022-03-14 22:54:33 -04:00
Alex Soto 7efe7bee2d [AppKit] Update xtro annotations of unbound API 2022-03-14 22:54:33 -04:00
Alex Soto d8fac167a7 [Accessibility] Update bindings up to Xcode 13.3 Beta 3 2022-03-14 22:54:33 -04:00
Alex Soto 0b0ad6f904 [tests] Fix introspection tests for Xcode 13.3 2022-03-14 22:54:33 -04:00
Alex Soto 019ec18bc6 [xtro] Fix xtro annotations
Ignoring CHIP framework for now since it is not stable just yet
and we want to avoid breaking changes in the future.
2022-03-14 22:54:33 -04:00
Alex Soto 35e2e45e98 [Xcode 13.3] Initial commit to Xcode 13.3 release 2022-03-14 22:54:33 -04:00
Rolf Bjarne Kvinge 174aca5b04
[tests] Simplify some logic in mmptest and msbuild tests. (#14400)
Use already existing logic in the Configuration class to find files on disk.

Also remove some dead code and use Path.Combine instead of string
concatenation to compute paths.

Fixes https://github.com/xamarin/maccore/issues/2553.
2022-03-14 20:43:49 +01:00
Alex Soto c055c10917
[generator] Avoid NRE when using native enums on delegates (#14396)
Fixes NRE in GetNativeEnumToManagedExpression when a native enum
with MaxValue is used on delegates.
2022-03-14 11:56:34 -04:00
Rolf Bjarne Kvinge aa4f94bb05
[xharness] Don't test documentation, it's broken. (#14373)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-03-11 18:44:37 -05:00
Rolf Bjarne Kvinge 9c4c3213e1
[registrar] Fix comparing full token references. Fixes #11641. (#14313)
The static registrar usually stores a compressed version of metadata tokens in
the generated code. However, when there are many assemblies in the app (>127),
we can't use the compressed version anymore, and fall back to a full version.

In this case, we weren't comparing type metadata tokens correctly when looking
for a type in our table of types, and thus we weren't finding the type we were
looking for.

The result is an exception like this:

> Can’t register the class MyClass when the dynamic registrar has been linked away.

In the generated table of types we're storing the full metadata token, which
includes a few bits indicating which type of token it is (in this particular
case a TypeDef token). When going through the table looking for a type, we
need to compare with those few bits set on the input type token as well to
find what we're looking for.

Also make it possible to use the remove-dynamic-registrar optimization on
macOS (which is useful by itself, but it also makes adding a test case
easier).

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1476585.
Fixes https://github.com/xamarin/xamarin-macios/issues/11641.
2022-03-11 07:30:01 +01:00
Rolf Bjarne Kvinge 84b1a87bd6
[msbuild] Improve the Strip task. (#14342)
* Enable nullability and fix code accordingly.
* Augment it to be able to take multiple files to strip at the same time.
* Strip in parallel.
* Execute using xcrun (ref: #3931)
* Pass the full path to the executable file to strip, to make command lines
  easier to copy-paste.
* Remove test that is now outdated. We have other tests that run strip
  anyways, so this shouldn't be a problem.
2022-03-11 07:28:00 +01:00
Manuel de la Pena e07b7bef79
[CI] Move tests outside of the build machine. (#14105)
Move the execution of tests to a diff bot to be compliant with the latests EO.
2022-03-10 23:36:37 -05:00
Aaron Bockover 23c8620af0
FSEventStream: bind FSEventStreamCreateRelativeToDevice, FSEventStreamGetDeviceBeingWatched (#14357)
Introduce `FSEventStreamCreateOptions` to avoid a slew of .ctor overrides, and make it easier to specify `DeviceToWatch` and `SinceWhenId`. `SinceWhenId` was previously only exposed on the "low level" .ctor, and it's a rather important parameter for supporting events that may have happened while the application was not running.

Make the existing constructors wrap `FSEventStreamCreateOptions` to avoid API break.

This is a followup to #14318. When using device-relative watches, files can be tracked via a tuple of their device ID and inode instead of paths. #14318 exposes inode data on `FSEvent`.
2022-03-10 21:30:57 +01:00
Aaron Bockover 9fe2a5c28c
FSEventStream: fix crash when asking for extended data; support dispatch queues (#12007) (#14318)
Implements support for `FSEventStreamCreateFlags.UseExtendedData`, fixing #12007.

When `.UseExtendedData` is specified, the event data type changes from `CFString` to `CFDictionary`; the dictionary contains the path (`path` key) and inode (`fileID` key) information for the file and may be extended in the future with other fields. Previously this was crashing because we assumed `CFString` always.

Further add a convenience constructor for monitoring a single path, add the missing `UnscheduleFromRunLoop` APIs, and add `SetDispatchQueue` to allow using dispatch queues directly instead of run loops.

Finally, this PR adds a fairly exhaustive file system test which covers the existing (non-extended) and fixed (extended) creation modes, along with using a dispatch queue instead of run loop.

Fixes https://github.com/xamarin/xamarin-macios/issues/12007
2022-03-09 19:05:10 +01:00
Přemek Vysoký 93bad76aae
Bump Microsoft.DotNet.XHarness.iOS.Shared to `1.0.0-prerelease.22157.2` (#14350)
I don't expect anything changed since Nov 19th but there might be miniature API changes this week so want to bump now and then after.
2022-03-09 18:32:44 +01:00
Rolf Bjarne Kvinge 1a21e1ee5c
[msbuild] Make the CollectBundleResourcesDependsOn property public. Fixes #11984. (#14330)
Make the CollectBundleResourcesDependsOn property public, so that custom
targets can inject themselves into the build early enough to add additional
BundleResource or Content items (by adding their custom target's name to the
CollectBundleResourcesDependsOn property).

Fixes https://github.com/xamarin/xamarin-macios/issues/11984.
2022-03-09 18:19:48 +01:00
Rolf Bjarne Kvinge c98a6d01cc
[HealthKit] Add this framework to Mac Catalyst. (#14312) 2022-03-09 18:18:48 +01:00
Manuel de la Pena 488a647b49
[Tests] Ignore certain tests that do not longer work on bots. (#14326)
The new tests do not have a display and that makes certain mac tests
fail. Added a new TestRuntime function to let us know if we are on vsts
and ignore accordingly.

fixes https://github.com/xamarin/maccore/issues/2546


Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-03-09 11:24:53 -05:00
Rolf Bjarne Kvinge bb655a3840
[dotnet] Only validate the RuntimeIdentifier if we need/use it. Fixes #13482. (#14339)
Fixes https://github.com/xamarin/xamarin-macios/issues/13482.
2022-03-09 08:22:52 +01:00
Rolf Bjarne Kvinge f248e9f70b
[tests] Add test to verify that the generator can compile C# 10+ code. Fixes #13837. (#14340)
Fixes https://github.com/xamarin/xamarin-macios/issues/13837.
2022-03-09 08:22:16 +01:00
Rolf Bjarne Kvinge 00e1d72377
[tests] Improve a few asserts to show unexpected values instead of just true/false. (#14338) 2022-03-09 08:21:39 +01:00
Rolf Bjarne Kvinge 5103060d72
[tests] Long live Xamarin! (#14336)
And a few other minor updates to test Info.plists.
2022-03-09 08:19:48 +01:00
Rolf Bjarne Kvinge 3a124d3f10
[tests] Don't use reflection to create HttpClient handlers. (#14333)
Fixes two test failures on tvOS with all optimizations enabled:

    MonoTests.System.Net.Http.MessageHandlerTest.DnsFailure
        [FAIL] DnsFailure(System.Net.Http.SocketsHttpHandler) :   Exception
            Expected: instance of <System.Net.Http.HttpRequestException>
            But was:  <System.MissingMethodException: No parameterless constructor defined for type 'System.Net.Http.SocketsHttpHandler'.
                at System.RuntimeType.CreateInstanceMono(Boolean , Boolean )
                at System.RuntimeType.CreateInstanceDefaultCtor(Boolean , Boolean )
                at System.Activator.CreateInstance(Type , Boolean , Boolean )
                at System.Activator.CreateInstance(Type , Boolean )
                at System.Activator.CreateInstance(Type )
                at MonoTests.System.Net.Http.MessageHandlerTest.GetHandler(Type ) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/System.Net.Http/MessageHandlers.cs:line 50
                at MonoTests.System.Net.Http.MessageHandlerTest.<>c__DisplayClass3_0.<<DnsFailure>b__0>d.MoveNext() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/System.Net.Http/MessageHandlers.cs:line 76>

    MonoTests.System.Net.Http.MessageHandlerTest.RejectSslCertificatesServicePointManager
        [FAIL] RejectSslCertificatesServicePointManager(System.Net.Http.SocketsHttpHandler) : System.MissingMethodException : No parameterless constructor defined for type 'System.Net.Http.SocketsHttpHandler'.
            at System.RuntimeType.CreateInstanceMono(Boolean , Boolean )
            at System.RuntimeType.CreateInstanceDefaultCtor(Boolean , Boolean )
            at System.Activator.CreateInstance(Type , Boolean , Boolean )
            at System.Activator.CreateInstance(Type , Boolean )
            at System.Activator.CreateInstance(Type )
            at MonoTests.System.Net.Http.MessageHandlerTest.GetHandler(Type ) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/System.Net.Http/MessageHandlers.cs:line 50
            at MonoTests.System.Net.Http.MessageHandlerTest.RejectSslCertificatesServicePointManager(Type ) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/System.Net.Http/MessageHandlers.cs:line 405
            at System.Reflection.RuntimeMethodInfo.Invoke(Object , BindingFlags , Binder , Object[] , CultureInfo )
2022-03-09 08:11:06 +01:00
Rolf Bjarne Kvinge 074a90496f
[tests] Don't try to create an instance of PKPaymentAuthorizationViewController. (#14334)
The default constructor doesn't work (it's already obsolete).

Fixes:

    Xamarin.Mac.Tests.DelegateAndDataSourceTest
        [FAIL] DelegateAndDataSourceAllowsNull : 1 failing types
            1 failing types:
            PassKit.PKPaymentAuthorizationViewController: Could not initialize an instance of the type 'PassKit.PKPaymentAuthorizationViewController': the native 'init' method returned nil.
            It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.
                at Xamarin.Mac.Tests.DelegateAndDataSourceTest.DelegateAndDataSourceAllowsNull () [0x0026c] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/ObjCRuntime/DelegateAndDataSourceTest.cs:90
2022-03-09 08:10:21 +01:00
Rolf Bjarne Kvinge 0897150a4f
[VisionKit] Add this framework to Mac Catalyst. (#14316) 2022-03-07 09:30:17 +01:00
Alex Soto 28f905fd75
[CHIP] Remove CHIP framework from dotnet (#14309)
CHIP framework seems to not be stable yet from Apple's side
each xcode update it brings breaking changes and it is also
not documented anywhere so let's disable it for now and
we can re-enable it in the future once it is stable.
2022-03-04 11:59:49 -05:00
Rolf Bjarne Kvinge 2a8e0121d8
[ARKit] Ignore this framework on Mac Catalyst. (#14290)
It exists, but does nothing on Mac Catalyst.

"This framework ignores calls from Mac apps built with Mac Catalyst."

Ref: https://developer.apple.com/documentation/arkit?language=objc

Also augment xtro to not be confused when encountering lines starting with '#'
that has no other text.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-03-03 21:43:33 +01:00
Rolf Bjarne Kvinge 1011419896
[xtro] Remove old and unused annotations. (#14282) 2022-03-02 15:15:11 +01:00
Curtis Wensley 069d34b454
Set NSImageRep DrawInRect hints as nullable (#13834)
* Set NSImageRep DrawInRect hints as nullable

* Add nullable attributes to NSString DrawAtPoint/DrawInRect/StringSize

* Fix xtro test failure

Co-authored-by: Chris Hamons <chris.hamons@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-03-01 20:34:02 +01:00
Rolf Bjarne Kvinge 83c1ee189a
[monotouch-test] Adjust ImageCaptioningTest to work on older versions of macOS for Mac Catalyst. (#14265)
Also improve assert messages a bit to not have multiple asserts with the same message.
2022-03-01 08:36:26 +01:00
Rolf Bjarne Kvinge c51b064ba2
[Message[s|UI]] Add to Mac Catalyst. #13935. (#14268)
Fixes https://github.com/xamarin/xamarin-macios/issues/13935.
2022-02-28 22:37:14 +01:00
Rolf Bjarne Kvinge ddb16120f9
[monotouch-test] Fix UbiquitousKeyValueStoreTest to work on newer versions of macOS. (#14267)
Fixes:

    MonoTouchFixtures.Foundation.NSUbiquitousKeyValueStoreTest
        [FAIL] Indexer :   key 1
            Expected: <value>
            But was:  null
2022-02-28 22:36:05 +01:00
Rolf Bjarne Kvinge 03f8ec502f
[introspection] Fix ApiCMAttachmentTest on macOS / Mac Catalyst. (#14266)
Fixes:

    Introspection.ApiCMAttachmentTest
        [FAIL] CheckFailAttachments : System.InvalidOperationException : Could not create the new instance for type CGEvent.
            at Introspection.ApiCMAttachmentTest.GetINativeInstance(Type t) in xamarin-macios/tests/introspection/ApiCMAttachmentTest.cs:line 498
            at Introspection.ApiCMAttachmentTest.CheckFailAttachments() in xamarin-macios/tests/introspection/ApiCMAttachmentTest.cs:line 572
            at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
2022-02-28 22:35:42 +01:00
Rolf Bjarne Kvinge df491ed4b3
[cecil-tests] Improve the obsolete member test. Fixes #13621. (#14258)
* Check implementation assemblies instead of reference assemblies.
* Try to print the source code location for failing API (this required processing
  the implementation assemblies, because the reference assemblies don't have debug
  information where the source code location is stored).
* Don't report API that has [EditorBrowsable (None)] attributes, presumably we
  decided to keep these for compatibility, while highly discouraging their
  continued use. Also stop doing this for the next time we can do a breaking
  change, maybe we can remove these APIs then.
* Don't report API that has [UnsupportedOSPlatform ("...#.#") attributes (with
  a version number), presumably this is API that is still valid for some OS
  versions.
* Enable the test for all APIs (no ignores anymore). It's green!

Fixes https://github.com/xamarin/xamarin-macios/issues/13621.
2022-02-28 11:26:44 +01:00
Rolf Bjarne Kvinge 8f5c8b1685
Bump ObjectiveSharpie to 3.5.50. (#14256)
This also requires updating the xtro definitions, because sharpie now finds
many more Mac Catalyst frameworks than before (and we haven't bound those
frameworks yet).
2022-02-26 01:59:11 +01:00
Rolf Bjarne Kvinge fec9a29756
[tests] Remove ignore for test that has been fixed in .NET. (#14255) 2022-02-26 01:56:12 +01:00
Rolf Bjarne Kvinge b746b04b2d
[xtro] Generate a proj file that contains variables for the current pch and assembly. (#14249)
Generate a proj file that contains variables for the current pch and assembly,
and include this proj file in the main xtro-sharpie project file. This way we
can use these variables for the pch and assembly arguments in the run
configurations, so we don't have to update the project file every time these
change (in particular the pch file changes name with every Xcode bump).
2022-02-25 17:03:01 +01:00
Rolf Bjarne Kvinge af2c68288c
[xtro] Add a makefile target to generate C# code for Mac Catalyst like we do for the other platforms. (#14250) 2022-02-25 17:02:49 +01:00
Rolf Bjarne Kvinge 681b45bd41
[monotouch-test] Fix the BaseEffectTest and EffectPropertyMaterialTest tests. (#14243)
The [Culture ("en")] attribute means: only run this test if the culture is
"en". This usually meant not running this test (apparently we don't run often
with culture = "en"), leading to outdated tests that happened to fail when
actually run under culture = "en" (such as on older macOS bots).

So change these tests to actually change the culture to "en" (by using the
SetCulture attribute), and also fix them.
2022-02-25 09:19:08 +01:00
Rolf Bjarne Kvinge 2a1f24f2cc
[CoreTelephony] Fix multiple issues. Fixes #13931. (#14242)
* Add to Mac Catalyst. Fixes #13931.
* Manually include CoreTelephony headers in xtro. There's no umbrella header
  in CoreTelephony 😡 😞
* Fix availability attributes
	* Only CTCall and CTCallCenter are deprecated in the CoreTelephony API.
	* None of these APIs are obsolete, just deprecated.
	* Add Mac Catalyst attributes.

One curious fact is that the PCSC framework interferes with compiling CTCarrer.h:

    In file included from /private/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/n0b0byrt.h:163:
    /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h:62:41: error: reference to 'BOOL' is ambiguous
    @property (nonatomic, readonly, assign) BOOL allowsVOIP __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0);
                                            ^
    /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/PCSC.framework/Headers/wintypes.h:59:18: note: candidate found by name lookup is 'BOOL'
            typedef int16_t BOOL;
                            ^
    /Applications/Xcode_13.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/objc/./objc.h:78:18: note: candidate found by name lookup is 'BOOL'
        typedef bool BOOL;
                     ^
    1 error generated.

but since we don't bind the PCSC framework, we can just ask ObjectiveSharpie
to exclude it.

Fixes https://github.com/xamarin/xamarin-macios/issues/13931.
2022-02-24 23:41:52 +01:00
Rolf Bjarne Kvinge 3fb288ff5c
[Foundation] Remove NSUrlSessionHandler.TrustOverride in .NET. (#14214)
It's better to use the TrustOverrideForUrl property instead, which already exists.
2022-02-24 23:08:21 +01:00
Rolf Bjarne Kvinge 2f494665bc
[Network] Remove obsolete API from .NET. (#14211)
All the obsolete API has replacement API that works just fine.
2022-02-24 23:07:53 +01:00
Rolf Bjarne Kvinge b99e75d6ad
[Metal] Name the enum fields consistently, and obsolete/remove the rest. (#14240) 2022-02-24 23:00:26 +01:00
Rolf Bjarne Kvinge d414aa2eb1
[AVFoundation] Remove the AVAssetsDownloadTaskKeys and AVAssetDownloadOptions API in .NET for tvOS. (#14233)
These API were never valid for tvOS, and now we can completely remove them in .NET.
2022-02-24 22:58:01 +01:00
Rolf Bjarne Kvinge 83136c4507
[tests] Fix packaging mac tests by generating valid bash code for test.config. (#14236)
Fixes this failure:

    ++ DOTNET_CSC_COMMAND=/Users/builder/azdo/_work/1/s/xamarin-macios/builds/downloads/dotnet-sdk-6.0.300-preview.22118.1-osx-x64/dotnet
    ++ exec /Users/builder/azdo/_work/1/s/xamarin-macios/builds/downloads/dotnet-sdk-6.0.300-preview.22118.1-osx-x64/sdk/6.0.300-preview.22118.1/Roslyn/bincore/csc.dll
    test.config: line 22: /Users/builder/azdo/_work/1/s/xamarin-macios/builds/downloads/dotnet-sdk-6.0.300-preview.22118.1-osx-x64/sdk/6.0.300-preview.22118.1/Roslyn/bincore/csc.dll: Permission denied
    make[1]: *** [mac-test-package.zip] Error 1
    make: *** [package-tests] Error 2
2022-02-24 22:57:25 +01:00
Rolf Bjarne Kvinge b770d1eae8
[CoreGraphics] Improve matrix types for .NET. Fixes #14125. (#14208)
Hoping that one day we'll have a System.Numerics.Matrix3x3 type we can replace our
RMatrix3 type with:

* Add all API in OpenTK.Matrix3 that also exists in equivalent form in System.Numerics.Matrix4x4.
* Remove all API that doesn't exist in equivalent form in System.Numerics.Matrix4x4.

For NMatrix2 and NMatrix3:

* Change the fields to be M## instead of R#C# (this is how System.Numerics does
  it, and also how we do it in other matrix types).
* Add obsolete and hidden R#C# versions of the fields to ease migrating existing
  code to .NET (but let's try to remove these in xamcore 5).
* Add properties in legacy Xamarin recommending users to use the new naming.
* A few other API additions to add equivalent API to the matrix types in System.Numerics.

For CGAffineMatrix:

* Add obsolete and hidden versions of the legacy field names to .NET to ease
  migrating existing (but let's try to remove these in xamcore 5).

Fixes https://github.com/xamarin/xamarin-macios/issues/14125.
2022-02-24 18:42:19 +01:00
Rolf Bjarne Kvinge bd97933b60
[runtime] Remove ObjCRuntime.nfloat in favor of System.Runtime.InteropServices.NFloat. (#14197)
* Remove ObjCRuntime.nfloat (in favor of   System.Runtime.InteropServices.NFloat).
* Automatically add a reference to the System.Runtime.InteropServices.Internal
  package, so that developers get the new NFloat API (with operators) we've
  added post .NET 6 (but don't do this for .NET 7).
* Automatically add a global using alias for
  System.Runtime.InteropServices.NFloat -> nfloat. This is not behind the
  usual `ImplicitUsings` condition our other implicit usings are, because
  they're off by default for existing projects, and the main target for the
  global using alias for nfloat is upgraded projects.
* Automatically generate a global using alias (like above) in the generator
  for all code the generator compiles.
* Update xtro entries to reference System.Runtime.InteropServices.NFloat
  instead of ObjCRuntime.nfloat.
* Add a workaround for a hopefully temporary issue with .NET/CoreCLR where the
  wrong runtime pack is selected otherwise (without the new NFloat API, so
  nothing works at runtime).

Ref: https://github.com/xamarin/xamarin-macios/issues/13087
2022-02-24 16:51:12 +01:00
Rolf Bjarne Kvinge 3b617adb0f
[CloudKit] Remove API that no longer exists in the headers from .NET. (#14228) 2022-02-24 08:20:26 +01:00
Sebastien Pouliot e82711f73e
[corefoundation] Optimize `CFString` creation (#12736)
* Add fast path if string is empty (`length == 0`)
* Add fast path (less allocations) for short string (`stackalloc`)
* Use `Marshal.AllocHGlobal`
	* we were the only consumer of `Marshal.AllocCoTaskMem` and `FreeCoTaskMem` (inside most apps) so those symbols can now be removed
	* `Marshal.AllocCoTaskMem` simply calls `AllocHGlobal` (with some extra casts) so it does not really have any other impact

* Add a few `CFString.FromHandle`` performance tests

To cover cases for

* `nil` which returns `null`
* `128` characters, which is the limit for `stackalloc`
* `129` characters, which is just over the limit for `stackalloc`

**Expectations**

* `empty` should be faster, since it now returns earlier
* `short_*` and `stackalloc_limit` should be a bit faster as they use `stackalloc`
* `allochglobal` and `long_string` should be (nearly) identical

**Before**

|              Method |             name |         Mean |       Error |     StdDev |
|-------------------- |----------------- |-------------:|------------:|-----------:|
| CFString_FromString |     allochglobal |   547.765 ns | 245.5782 ns | 13.4610 ns |
| CFString_FromString |            empty |   377.983 ns |   6.7926 ns |  0.3723 ns |
| CFString_FromString |      long_string | 5,480.664 ns | 264.9473 ns | 14.5227 ns |
| CFString_FromString |              nil |     4.848 ns |   0.0412 ns |  0.0023 ns |
| CFString_FromString |      short_7bits |   442.096 ns |  30.4907 ns |  1.6713 ns |
| CFString_FromString |     short_accent |   221.221 ns |   2.2069 ns |  0.1210 ns |
| CFString_FromString |      short_emoji |   221.870 ns |   2.4471 ns |  0.1341 ns |
| CFString_FromString |    short_unicode |   217.954 ns |   1.8771 ns |  0.1029 ns |
| CFString_FromString | stackalloc_limit |   484.019 ns |   6.3940 ns |  0.3505 ns |


**After**

|              Method |             name |         Mean |       Error |     StdDev |
|-------------------- |----------------- |-------------:|------------:|-----------:|
| CFString_FromString |     allochglobal |   554.028 ns | 317.1811 ns | 17.3858 ns |
| CFString_FromString |            empty |    95.442 ns |   7.6434 ns |  0.4190 ns |
| CFString_FromString |      long_string | 5,468.565 ns | 251.2252 ns | 13.7705 ns |
| CFString_FromString |              nil |     3.299 ns |   0.0229 ns |  0.0013 ns |
| CFString_FromString |      short_7bits |   352.567 ns |  25.7539 ns |  1.4117 ns |
| CFString_FromString |     short_accent |   221.132 ns |   0.9760 ns |  0.0535 ns |
| CFString_FromString |      short_emoji |   222.557 ns |   4.5978 ns |  0.2520 ns |
| CFString_FromString |    short_unicode |   216.375 ns |   5.1619 ns |  0.2829 ns |
| CFString_FromString | stackalloc_limit |   427.663 ns |  77.9610 ns |  4.2733 ns |
2022-02-23 20:49:10 +01:00
Sebastien Pouliot c918142101
[objcruntime] Fix some `IntPtr` -> `NativeHandle` inside `Class` (#14174)
* Using `NativeHandle` avoids implicit casts [1]
* Do not expose `IntPtr` as the type for the `SuperClass` handle

[1] likely not an issue with JIT/AOT optimization, less sure for the
interpreter. No harm in not having those in the product assembly.
2022-02-23 20:45:43 +01:00
Rolf Bjarne Kvinge 4fd770c3c4
[msbuild/generator] Pass .NET's C# compiler to bgen to use. Fixes #12922. (#14192)
We can't execute mono's C# compiler when using .NET, so we need to tell bgen
where csc is in that case.

Fixes https://github.com/xamarin/xamarin-macios/issues/12922.
2022-02-23 09:36:43 +01:00
Rolf Bjarne Kvinge 66dcb94e1f
[AVFoundation] Simplify code behind + api definition for AVCaptureConnection. (#14199)
* Remove the code behind for AVCaptureConnection.SupportsVideoMinFrameDuration
  and AVCaptureConnection.SupportsVideoMaxFrameDuration. The codebehind looks like
  a workaround for Apple renaming the selector, but from history it looks like that
  happened before the earliest version of iOS we support today, so this can be expressed
  in an api definition now without any code behind.
* Add these fields to macOS, where they're not even deprecated (like they are on
  other platforms).
* Remove conditional code in api definition, and distribute [No*] attributes as
  required.
* Remove the AVCaptureConnection.AudioChannels property from .NET, it doesn't do
  anything useful.
2022-02-21 20:58:47 +01:00
Rolf Bjarne Kvinge f83857638d
[tests/msbuild] Use full path to binlogs and executables. (#14195)
This way it's easier to copy-paste the path to the these files from terminal output
and open/run it (with a relative/partial path you'll need to know the current directory,
which is just an annoying thing to figure out sometimes).
2022-02-21 08:02:23 +01:00
Rolf Bjarne Kvinge 2140d46327
[monotouch-test] The RuntimeTest.ResurrectedObjectsDisposedTest test seems to be passing everywhere in .NET now. (#14175) 2022-02-18 16:34:58 +01:00
Sebastien Pouliot e6e4ddbab2
[appcompare] Remove old/local copy of the tool and update comparison documentation (#14190)
There's a newer version of the tool availble as a (tool)
[nuget](https://www.nuget.org/packages/appcompare/)

The nicest part, for this use case, is that it can map renamed files
between the two app bundles being compared.
[Example](https://gist.github.com/spouliot/68a43a4f514315d52b35446016ba0d2e)
2022-02-18 13:04:28 +01:00
Rolf Bjarne Kvinge e25163f573
[.NET] Rename our product assemblies. Fixes #13748. (#13847)
Rename our product assemblies to:

* Microsoft.iOS.dll
* Microsoft.tvOS.dll
* Microsoft.macOS.dll
* Microsoft.MacCatalyst.dll

This makes it easy to distinguish between legacy Xamarin and .NET whenever the
product assembly is mentioned, and I've also chosen the platform part of the
name to match how the platforms are named elsewhere (this also makes it
possible to simplify our build logic, since we can remove a lot of special
casing).

Fixes https://github.com/xamarin/xamarin-macios/issues/13748.
2022-02-16 21:30:32 +01:00
Rolf Bjarne Kvinge 5b8250486f
[dotnet/msbuild] Run install_name_tool to fix the id for dylibs. Fixes #13999. (#14147)
Fixes https://github.com/xamarin/xamarin-macios/issues/13999.
2022-02-16 21:13:40 +01:00
Rolf Bjarne Kvinge a404081365
[dotnet] Add support for the PublishFolderType metadata on Content and BundleResource items. (#14162)
Add support for the PublishFolderType metadata on Content and BundleResource
items, which makes it possible to change the location in the app bundle for
these items (this was possible to do before with the Link metadata), but most
importantly it also makes it possible to choose to *not* bundle these items in
the app bundle (which was not possible before with the Link metadata, nor any
other means).

At first I thought setting CopyToPublishDirectory /
CopyToOutputDirectory=Never would accomplish that, but it turns out we don't
honor those, and since we already have this behavior of ignoring
CopyToPublishDirectory / CopyToOutputDirectory in legacy Xamarin, I didn't
want to change it in .NET.

So I added support for honoring the PublishFolderType metadata instead, which
is new and we already support for other item groups. This is accomplished by
adding all Content and BundleResource items with PublishFolderType set to the
ResolvedFileToPublish item group (where we already handle any
PublishFolderType values), and then we ignore such Content and BundleResource
items in our CollectBundleResources task.

Also update the documentation and add tests.
2022-02-16 20:54:14 +01:00
Rolf Bjarne Kvinge 8060e2f6d3
[tests] Use the correct OS version for Mac Catalyst. (#14143)
This fixes the CheckManagedFilters tests on Mac Catalyst on older macOS versions:

    [FAIL] CheckManagedFilters :   Managed filters not found for CIAreaMinMax, CIAreaMinMaxRed, CIAttributedTextImageGenerator, CIBarcodeGenerator, CIBicubicScaleTransform, CIBlendWithBlueMask, CIBlendWithRedMask, CIBokehBlur, CICameraCalibrationLensCorrection, CIColorCubesMixedWithMask, CIColorCurves, CICoreMLModelFilter, CIDepthBlurEffect, CIDepthToDisparity, CIDisparityToDepth, CIDither, CIDocumentEnhancer, CIEdgePreserveUpsampleFilter, CIGaborGradients, CIGuidedFilter, CIKeystoneCorrectionCombined, CIKeystoneCorrectionHorizontal, CIKeystoneCorrectionVertical, CIKMeans, CILabDeltaE, CIMeshGenerator, CIMix, CIMorphologyGradient, CIMorphologyMaximum, CIMorphologyMinimum, CIMorphologyRectangleMaximum, CIMorphologyRectangleMinimum, CIPaletteCentroid, CIPalettize, CIPerspectiveRotate, CIRoundedRectangleGenerator, CISaliencyMapFilter, CISampleNearest, CITextImageGenerator
      Expected: 0
      But was:  39
2022-02-16 20:11:57 +01:00
Rolf Bjarne Kvinge 2e62431fb1
[nfloat] Obsolete nfloat.CopyArray in legacy Xamarin and stop using it. (#14164)
There's no corresponding System.Runtime.InteropServices.NFloat.CopyArray method in .NET.

It turned out that the API where we used CopyArray don't need to use CopyArray at all, the same can be accomplished faster and simpler by using unsafe code.
2022-02-16 20:10:13 +01:00
Rolf Bjarne Kvinge 404b6e9af5
[msbuild/dotnet] Set NoBindingEmbedding to 'true' by default in .NET. Fixes #12530. (#12694)
Not embedding third-party libraries in the binding assembly is the future, and
let's try to enable it by default starting with .NET.

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

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-02-16 10:30:41 +01:00
Rolf Bjarne Kvinge a021ecae72
[test] Add help makefile targets to run .NET tests on remote machines. (#14144) 2022-02-16 07:57:09 +01:00
Sebastien Pouliot 37b8a0709c
[objcruntime] Inline the use of the `Class.LookupFullName` method (#14150)
inside it's _only_ caller and remove the API.

Remove old test that was already not useful (since the method could not
be removed anyway for quite a while).
2022-02-16 07:53:21 +01:00
Rolf Bjarne Kvinge 97afd484d2
[ObjCRuntime] Keep accepting IntPtr constructors in .NET as an alternative to NativeHandle constructors. Fixes #14046. (#14145)
As a part of the breaking changes in .NET, we introduced a new type,
`ObjCRuntime.NativeHandle`, to represent native handles.

This meant that constructors taking taking `IntPtr handle`:

```cs
public class MyUIViewController : UIViewController {
    protected MyUIViewController (IntPtr handle)
        : base (handle)
    {
    }
}
```

would have to be ported to take `NativeHandle handle`:

```cs
public class MyUIViewController : UIViewController {
    protected MyUIViewController (NativeHandle handle)
        : base (handle)
    {
    }
}
```

The unfortunate part is that there will be no compiler warnings or errors
flagging this, so users won't know to do it unless they either read the
documentation (🤣) or run into the problem, googles for a while, runs into
someone else who had the same problem, and applies their (probably broken)
fix.

So we change our logic to:

1. Look for and use an `(IntPtr)` (or `(IntPtr, bool)`) constructor in .NET if
   the `NativeHandle` version isn't found.
2. Show a warning.
3. Some time in the future maybe remove this hack/workaround.

Fixes https://github.com/xamarin/xamarin-macios/issues/14046.
2022-02-15 22:48:23 +01:00
Rolf Bjarne Kvinge d58409c018
[AppKit] INSTextInputClient.GetAttributedSubstring can return null. Fixes #14129. (#14131)
Fixes https://github.com/xamarin/xamarin-macios/issues/14129.
2022-02-15 17:44:21 +01:00
Rolf Bjarne Kvinge 31f11e2632
[CoreText] Move numerous CoreText fields to generated code for .NET. (#14132) 2022-02-15 08:24:34 +01:00
Rolf Bjarne Kvinge 3eb50804a3
[src/introspection] Adjust tests and availability attributes to work run on iOS/tvOS 12.4. Fixes #13957. (#14133)
Fixes https://github.com/xamarin/xamarin-macios/issues/13957.
2022-02-15 08:20:16 +01:00
Stephane Delcroix f36606e654
[C] Clear OpenTK namespace (#13767)
fixes #13160

- remove unused types
- use System.Numerics when possible
- move own created types from OpenTK namespace to CoreGraphics
- create missing types in CoreGraphics namespace

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-02-14 18:50:23 +01:00
TJ Lambert 764e797ceb
[NET 6 Attribute Conversion] Security (#14033)
* Removing attributes for mellite

* Remove existing attributes

* Attribute Conversion

* Reverting changes to Security/Enums.cs and Security/SecureTransport.cs since they are API source

* Revert "Removing attributes for mellite"

This reverts commit eea2898870.

* Fixing Verifies, Moving Obsolete, Adding missing conversion

* Adding in removed comments and messages

* Removing unused NET Attributes

* Removing duplicated comments

* Removing not needed availability

* Remove todos

* removing other not needed availability

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-02-14 10:36:33 -06:00
Chris Hamons 39d52ba64f
[tests] Add disabled NET6 availability attribute test (#14106) 2022-02-11 09:11:02 -06:00
Rolf Bjarne Kvinge 5a0c317d06
[tests] Make the Bug2000_NSPersistentStoreCoordinator test use a process-unique test file name. Fixes #xamarin/maccore@2515. (#14119)
Make the Bug2000_NSPersistentStoreCoordinator test use a test file name that
contains the process id, so that multiple test processes at the same time
don't stomp on eachother.

Fixes https://github.com/xamarin/maccore/issues/2515.
2022-02-10 15:25:55 +01:00
Rolf Bjarne Kvinge 808a61a12b
[msbuild] Make sure to set 'ResolveAssemblyConflicts=true' before importing Microsoft.CSharp.targets. Fixes #11691. (#14109)
We must set `ResolveAssemblyConflicts=true` before loading
Microsoft.Common.targets (which is loaded by Microsoft.CSharp.targets),
because otherwise we won'd do any conflict resolution at all, since the
variable isn't 'true' when it needs to be.

Also add test.

Fixes https://github.com/xamarin/xamarin-macios/issues/11691.
2022-02-09 14:07:35 -05:00
Rolf Bjarne Kvinge 382074bbb8
[bgen] Make sure to render nint/nuint in delegates as nint/nuint for .NET. Fixes #14107. (#14112)
This makes us render this:

    public delegate nfloat NSTableViewColumnWidth(NSTableView tableView, nint column);

instead of this:

    public delegate nfloat NSTableViewColumnWidth(NSTableView tableView, IntPtr column);

Fixes https://github.com/xamarin/xamarin-macios/issues/14107.
2022-02-09 13:17:48 -05:00