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

7366 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge d3782b49af
[tests] Ignore a few tests that fail on tvOS Simulator/arm64. (#21451)
Ref: https://github.com/xamarin/xamarin-macios/issues/19781
2024-10-16 22:00:16 +02:00
Rolf Bjarne Kvinge 0674debc74
[devops] Clean up before and after running the Windows tests remotely. (#21454)
Also collect any crash reports from the remote machine.
2024-10-16 21:59:59 +02:00
Manuel de la Pena 8e0cec382c [RGen] Teach been to ignore rgen types. (#21449)
Teach our bgen to ignore those types that have been marked as a rgen
BindingType. The code adds a new smart enum in the sources that should
not be processed by bgen and therefore should not have the smart enum
extension method. You can verify that this is try by looking at the API
diff:

<img width="560" alt="Screenshot 2024-10-15 at 14 58 00"
src="https://github.com/user-attachments/assets/83790ae6-d94a-424f-8f70-e33bde7c4f22">
2024-10-16 13:11:21 -04:00
Rolf Bjarne Kvinge 23dffef8c4
[xharness] Remove a lot of legacy code. (#21419) 2024-10-16 19:07:09 +02:00
Rolf Bjarne Kvinge a123e460f5
[watchOS] Remove the build logic for watchOS. (#21440) 2024-10-16 12:30:13 +02:00
Rolf Bjarne Kvinge 1fddf207e4
[msbuild] Port Metal and MetalLib to subclass XamarinTask. Fixes #21437. (#21439)
This has a few advantages:

* We simplify and unify more of our code.
* We have more control over the error reporting / logging behavior.

Additionally:

* Use 'xcrun' to invoke 'metal' and 'metallib' (partial fix for #3931).
* Allow for overriding the path to the command-line tool in question.
* Add support for cancellation.
* Fix nullability.

Fixes https://github.com/xamarin/xamarin-macios/issues/21437.
2024-10-16 11:36:52 +02:00
Rolf Bjarne Kvinge 34d1fca7f6
[StoreKit] Bind AppStore.requestReview. Fixes #21410. (#21441)
The existing Objective-C class to request an App Store review (SKStoreReviewController) is deprecated in Xcode 16+, and it doesn't even work on the corresponding OS versions.

The replacement API is Swift-only, but luckily it's a very simple API (just a static method), so it's possible to bind it manually.

This required a few other changes/improvements:

* Add support for Swift code in our runtime.

* Just to keep the changes to a minimum, bump the min OS version for legacy code to match the .NET min OS versions. This is because our build logic uses the legacy min versions when compiling native code (a more involved fix would be to update all the build logic to build native code to use the .NET min OS versions, but that's not the point of this PR, so I took the easy route). Fixes #10659.

I've tested the method locally, and it seems to work fine, but I've still marked
it as experimental for now. There are no unit tests because calling the method will
put up a dialog, which won't work correctly in unit tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/21410.
Fixes https://github.com/xamarin/xamarin-macios/issues/10659.
2024-10-16 11:06:47 +02:00
Manuel de la Pena 0f35909d56
[RGen] First inclusion of a roslyn generator for the bindings. (#21389)
We are doing the following:

1. Adding the rgen directory with the following solutions:
* Analyzer: Analyzer that will catch errors in the bindings. At the
moment it provides a single error when the BindingTypeAttribute is used
in a nont partial type.
   * Analyzer Tests: Allows tests for the analyzer.
   * Analyzer Sample: Sample project to test the analyzer.
* Code Generator: A code generator that adds the BindingTypeAttribute to
the compilcation.
   * Code Generator Tests: Allows tests for the generator.
   * Code Sample: Sample project for the code generator.
2. Make rule to build the roslyn code generator.
3. Makefile changes to add the code generator as part as the second
compilation of the bindings.

This changes add the starting gounds to move to roslyn.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Alex Soto <alex@soto.dev>
2024-10-15 14:56:09 -04:00
Rolf Bjarne Kvinge 59b6a6119d
[tests] Ignore output that looks like errors when installing .NET on Windows. (#21430)
Just trust the exit code instead.

This way the installation doesn't fail due to random output.
2024-10-15 09:25:21 +02:00
Rolf Bjarne Kvinge a10899ef62
[tests] Improve failure message when a process times out. (#21429) 2024-10-15 09:25:03 +02:00
Rolf Bjarne Kvinge e63de079a6
[tests] Remove dead code. (#21422)
This logic was intented to zip up the .NET unit tests to run them on Windows,
but in the end we went with a different approach that doesn't require zipping.
2024-10-15 09:24:47 +02:00
Alex Soto 660ac50c9d Merge remote-tracking branch 'origin/main' into xcode16.1 2024-10-11 15:28:26 -04:00
Rolf Bjarne Kvinge 2f7c126ac9
[dotnet] Fix building universal apps using NativeAOT when the default RuntimeIdentifiers value is set. Fixes #19391. (#21412)
We need to set "UseCurrentRuntimeIdentifier=false", we must only set it for
the outer build for universal builds - when `RuntimeIdentifiers` is set - but
that means we can only do it *after* we set any default value for
`RuntimeIdentifiers`.

Fixes https://github.com/xamarin/xamarin-macios/issues/19391#issuecomment-2405499973.
2024-10-11 12:13:29 +02:00
Rolf Bjarne Kvinge 46ed02ba8c
[tests] Ignore a few tests that fail on iOS Simulator/arm64. (#21403)
Ref: https://github.com/xamarin/xamarin-macios/issues/19781
2024-10-11 08:36:29 +02:00
Rolf Bjarne Kvinge 43cd02dc23
[msbuild] Improve the error message when the SupportedOSPlatformVersion is lower than the minimum. Fixes #21368. (#21369)
This isn't very user friendly:

    ILLink : unknown error IL7000: An error occurred while executing the custom linker steps. Please review the build log for more information.
    ILLINK : error MT0073: Microsoft.iOS 18.0.8337 does not support a deployment target of 10.0 for iOS (the minimum is 11.0). Please select a newer deployment target in your project's Info.plist or change the SupportedOSPlatformVersion property in your project file.
    ILLINK : error MT2301: The linker step 'Setup' failed during processing: Microsoft.iOS 18.0.8337 does not support a deployment target of 10.0 for iOS (the minimum is 11.0). Please select a newer deployment target in your project's Info.plist or change the SupportedOSPlatformVersion property in your project file.
    [...]/packages/microsoft.net.illink.tasks/8.0.8/build/Microsoft.NET.ILLink.targets(87,5): error NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false.

So improve this to only show a single error message:

    The SupportedOSPlatformVersion value '10.0' in the project file is lower than the minimum value '11.0'.

Fixes https://github.com/xamarin/xamarin-macios/issues/21368.
2024-10-10 20:10:04 +02:00
Rolf Bjarne Kvinge 9daafdae64
[builds] Remove all legacy logic. (#21307)
We still need some of the source files from the legacy Mono library, but it's
only a few files, so just add them to the git repo.

Also implement caching of the .NET download, which speeds up clean rebuilds
significantly.

Note: all the files in the `builds/mono-ios-sdk-destdir` are a straight import
from the Mono archive, so those shouldn't need much reviewing (nor will I
change them unless absolutely necessary).
2024-10-10 14:21:42 +02:00
Rolf Bjarne Kvinge 7781c5184e
[system-dependencies] Remove the cmake dependency. (#21375)
It was needed to build Mono from source, which we haven't done in quite
a few years now.
2024-10-10 11:23:39 +02:00
Rolf Bjarne Kvinge 55baa59437
[UIKit] Fix a few UITraitCollection bindings. Fixes #21377. (#21380)
The methods 'GetTraitCollectionWithTraits' and 'GetTraitCollectionByModifyingTraits' takes a callback, but the callback
had the wrong signature.

So introduce a new overload for each of these methods, using a delegate with the correct signature.

Also deprecate 'FromTraitsFromCollections' according to both headers and documentation.

Fixes https://github.com/xamarin/xamarin-macios/issues/21377.
2024-10-10 10:22:10 +02:00
Rolf Bjarne Kvinge 5affb0b4e9
[tests] Remove legacy logic to package and run macOS tests. (#21384) 2024-10-10 09:41:56 +02:00
Alex Soto 4791b4b469 Merge remote-tracking branch 'origin/main' into dev/alex/x16.1-main 2024-10-09 19:31:29 -04:00
Rolf Bjarne Kvinge e860f533da
[build] Fix installing the arm64 version of .NET. (#21396)
On the bots we're executing with Rosetta, and 'arch' returns 'i386' under
Rosetta, so detect when we're executing under Rosetta, and install the arm64
version of .NET in that case as well.

Also fix a bug in the same area in our tests.
2024-10-09 16:57:00 +02:00
Alex Soto d2634a9d62
[xcode16.1] Bump Xcode to Xcode 16.1 (#21386)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-10-08 12:50:11 -04:00
Rolf Bjarne Kvinge 5ef0d91b33
[msbuild/tests] Use 'dotnet test' for the MSBuild tests (take 2). (#21363)
This is another step towards removing Mono.

This required a few changes:

* Nullability updates in test code.
* Explicitly sorted list of strings in a warning message, to make the warning text stable.
* Stopped allowing the test assemblies to see internals of the task assembly. This was necessary for to solve a problem with duplicate types:
    * The netstandard2.0 version of `System.Reflection.Metadata.dll` contains
      the `UnconditionalSuppressMessageAttribute` type (internally).
    * Since we ILMerge the tasks assembly, this type ends up in
      Xamarin.iOS.Tasks.dll (internally).
    * The test assembly can't be a net472 assembly, because that means using
      the netfx/desktop versions of the Microsoft.Build.* assemblies, which
      don't work on .NET (they check for Mono, but .NET isn't Mono, so the
      check fails and a PlatformNotSupportedException is thrown).
    * So I bumped the test assembly to be a net8.0 assembly, but then there's
      a conflict between the `UnconditionalSuppressMessageAttribute` shipped
      in .NET vs the one in `Xamarin.iOS.Tasks.dll` (because the test assembly
      can see the internals of `Xamarin.iOS.Tasks.dll`).
    * The fix that _doesn't work_ is to not merge system assemblies in the
      `Xamarin.iOS.Tasks.dll` assembly anymore. `Xamarin.iOS.Tasks.Windows.dll`
      already does this, but it doesn't work when building remotely.
    * The fix that seems to work is to just not allow the test assemblies to
      see the internals of the task assembly. This is really an anti-pattern
      anyway, so no big loss. This required a few changes (make some API in
      the task assembly public, remove some legacy tests that don't apply
      anymore in .NET, etc.)
2024-10-07 18:14:01 +02:00
Rolf Bjarne Kvinge 133bd65abd
Merge net9.0 into main. (#21349) 2024-10-04 09:22:01 +02:00
Rolf Bjarne Kvinge f800899ebc
[tests] Include more information in asserts in MonoTouchFixtures.Security.RecordTest.DeskCase_83099_InmutableDictionary. (#21354)
This will hopefully help us track down a random test failure in this test.

Ref: https://github.com/xamarin/maccore/issues/868
2024-10-03 19:53:11 +02:00
Rolf Bjarne Kvinge 129ab97506
[tests] Fix generation for a few variables in test[-system].config. (#21344)
Lines end with a newline character...
2024-10-03 19:12:57 +02:00
Rolf Bjarne Kvinge 6002243ee4
[Vision] Bind VNVisionVersionNumber. Fixes #21342. (#21350)
Fixes https://github.com/xamarin/xamarin-macios/issues/21342.
2024-10-03 11:15:02 +02:00
Rolf Bjarne Kvinge 2a3b250aba
[tests] Fix FontManagerTest.RegisterFontDescriptors_WithCallback to be a bit more lax. Fixes #6690. (#21348)
This way we can actually run the test.

Fixes https://github.com/xamarin/xamarin-macios/issues/6690.
2024-10-03 11:14:31 +02:00
Rolf Bjarne Kvinge 260b12a99d
[AppKit] Remove the NS[Open|Save]Panel constructors in XAMCORE_5_0. Fixes #6474. (#21346)
These constructors haven't worked since macOS 10.14 (see #6474), so just
remove them (when we can make breaking changes).

Fixes https://github.com/xamarin/xamarin-macios/issues/6474.
2024-10-03 11:13:43 +02:00
Rolf Bjarne Kvinge 07256bf177 [tests] Update list of expected native libraries we link with for .NET 9. 2024-10-03 10:45:58 +02:00
Rolf Bjarne Kvinge 13d6013d9c Merge remote-tracking branch 'origin/main' into dev/rolf/merge-net9.0-into-main 2024-10-02 20:02:22 +02:00
Rolf Bjarne Kvinge f6501e922f
[dotnet] Don't link with BrowserEngineKit. Fixes #21324. (#21337)
Fixes https://github.com/xamarin/xamarin-macios/issues/21324.
2024-10-02 19:54:47 +02:00
Rolf Bjarne Kvinge 3317327c23
[tests] Fix building the custom-type-assembly assembly from inside a project file. (#21347)
Building the custom-type-assembly assembly doesn't work quite right if the
RuntimeIdentifier(s) variables are set in the environment from the project
file, so don't forward those to the sub-make we execute to build the assembly.

This fixes an issue where building monotouch-test would fail locally, because
building the custom-type-assembly assembly would fail.

Also remove legacy Xamarin logic.
2024-10-02 19:53:47 +02:00
Rolf Bjarne Kvinge abcec04b75
Revert "[msbuild/tests] Use 'dotnet test' for the MSBuild tests. (#21263)" (#21356)
This reverts commit 15c1e7527e.

It breaks the Windows tests.
2024-10-02 19:51:31 +02:00
Rolf Bjarne Kvinge 15c1e7527e
[msbuild/tests] Use 'dotnet test' for the MSBuild tests. (#21263)
This is another step towards removing Mono.

This required a few changes:

* Nullability updates in test code.
* Explicitly sorted list of strings in a warning message, to make the warning text stable.
* Stopped merging system assemblies in the merged tasks assembly. This was necessary for to solve a problem with duplicate types:
    * The netstandard2.0 version of `System.Reflection.Metadata.dll` contains
      the `UnconditionalSuppressMessageAttribute` type (internally).
    * Since we ILMerge the tasks assembly, this type ends up in
      Xamarin.iOS.Tasks.dll (internally).
    * The test assembly can't be a net472 assembly, because that means using
      the netfx/desktop versions of the Microsoft.Build.* assemblies, which
      don't work on .NET (they check for Mono, but .NET isn't Mono, so the
      check fails and a PlatformNotSupportedException is thrown).
    * So I bumped the test assembly to be a net8.0 assembly, but then there's
      a conflict between the `UnconditionalSuppressMessageAttribute` shipped
      in .NET vs the one in `Xamarin.iOS.Tasks.dll` (because the test assembly
      can see the internals of `Xamarin.iOS.Tasks.dll`).
    * The fix that seems to work is to *not* merge system assemblies in the
      `Xamarin.iOS.Tasks.dll` assembly. `Xamarin.iOS.Tasks.Windows.dll`
      already does this, so hopefully there are no problems on Windows, and on
      macOS our tests doesn't reveal any problems.
2024-10-01 17:54:27 +02:00
Rolf Bjarne Kvinge 9647b45ce4 Merge remote-tracking branch 'origin/net9.0' into merge-net9.0-into-main 2024-10-01 17:03:30 +02:00
Rolf Bjarne Kvinge 6b2e93651a
[UIKit] Improve code for UISegmentedControl. Fixes #21289. (#21299)
1. Enable nullability.
2. Move Get|SetTitleTextAttributes to generated code.
3. Remove dead code (pre-.NET code paths).

Point 2. fixes #21289, so add tests for this scenario.

Fixes https://github.com/xamarin/xamarin-macios/issues/21289.
2024-10-01 12:24:56 +02:00
Rolf Bjarne Kvinge c4a5627f03
[PassKit] Finish implementation of PKPayLaterValidateAmount. Fixes #19271. (#21339)
Fixes https://github.com/xamarin/xamarin-macios/issues/19271.
2024-10-01 11:32:43 +02:00
Rolf Bjarne Kvinge 3db59cc8d5
[tests] Fix inclusion of Directory.Build.props up the directory hierarchy. (#21341)
The first Directory.Build.props should be imported, so do that.
2024-10-01 10:36:22 +02:00
Rolf Bjarne Kvinge 76b6538845
[tests] Ignore a few tests that fail on Mac Catalyst/arm64. (#21322)
Also remove some outdated watchOS ignores.

Ref: https://github.com/xamarin/xamarin-macios/issues/19781
2024-10-01 01:27:22 +02:00
Rolf Bjarne Kvinge b81fc7375c
[tests] Rework StringAttributesTests.SimpleAttributesTest. Fixes #18656. (#21336)
* CTLine crashes with certain NSAttributedStrings, so don't do that. This fixes #18656.
* Implement this test for macOS.
* Misc other fixes.

Fixes https://github.com/xamarin/xamarin-macios/issues/18656.
2024-10-01 01:22:36 +02:00
Rolf Bjarne Kvinge b327bcc493
[tests] Remove mono-native logic. (#21312)
It's only for legacy Xamarin.
2024-10-01 01:03:06 +02:00
Rolf Bjarne Kvinge f657ca9fca
[AppKit] Implement NSToolbarItemVisibilityPriority. Fixes #21298. (#21304)
Fixes https://github.com/xamarin/xamarin-macios/issues/21298.
2024-10-01 00:23:38 +02:00
Manuel de la Pena fbe8fe395c
Merge branch 'main' into dev/rolf/bump-main-in-net9.0-2024-09-24 2024-09-26 16:28:33 -04:00
Rolf Bjarne Kvinge 1850ef907c [monotouch-test] Update usage of X509 API obsoleted in .NET 9. 2024-09-25 19:02:38 +02:00
Rolf Bjarne Kvinge cabb3e5e5e
[tests/devops] Remove logic to build samples. (#21267)
It's old, hasn't been executed in years and quite bitrotten by now (it only
builds legacy Xamarin samples for instance).

We could port it to .NET, but first we'd need sample apps, and there
aren't many of those yet.
2024-09-25 17:51:24 +02:00
Rolf Bjarne Kvinge 458ca8bc01 [monotouch-test] Update usage of X509 API obsoleted in .NET 9. 2024-09-25 13:34:07 +02:00
Rolf Bjarne Kvinge 1a4f376b74 [net9.0] Merge main into net9.0. 2024-09-24 23:57:47 +02:00
Peter Collins 448999982c
[msbuild] Add @(XcodeProject) action (#21232)
Context: https://github.com/CommunityToolkit/Maui.NativeLibraryInterop

Introduces a `@(XcodeProject)` build action which can be used to build
and consume the outputs of Xcode framework projects.

The following metadata are supported on this item:

```xml
  <XcodeProject Include="path/to/myproject.xcodeproj" >
    <Configuration>Release</Configuration>
    <CreateNativeReference>true</CreateNativeReference>
    <ForceLoad></ForceLoad>
    <Frameworks></Frameworks>
    <Kind>Framework</Kind>
    <OutputPath></OutputPath>
    <SchemeName></SchemeName>
    <SmartLink></SmartLink>
    <Visible></Visible>
  </XcodeProject>
```

 * `%(SchemeName)`: The name of the build scheme or target that should
    be used to build the project.

 * `%(Configuration)`: The name of the configuration to use to build the
    project. The default value is `Release`.

 * `%(CreateNativeReference)`: Output XCFRAMEWORK files will be added as
    a `@(NativeReference)` to the project. Metadata supported by
    `@(NativeReference)` like `%(Kind)`, `%(Frameworks)`, or `%(SmartLink)`
    will be forwarded if set. The default value is `true`.

 * `%(OutputPath)`: Can be set to override the XCARCHIVE and XCFRAMEWORK
    output path of the Xcode project. The default value is
    `$(IntermediateOutputPath)xcode/{SchemeName}-{Hash}`.

A new `_BuildXcodeProjects` target will attempt to build XCARCHIVE and
XCFRAMEWORK files for each `@(XcodeProject)` item. These outputs will be
created for the platform specified in the target framework. If multiple
target frameworks are specified, the project will be built for each
platform during each inner build.

A new `$(MaciOSPrepareForBuildDependsOn)` build extension point has been
added to allow customer projects to more easily hook into the beginning
of the build process.

---------

Co-authored-by: Peter Collins <pecolli@microsoft.com>
Co-authored-by: Alex Soto <alex@soto.dev>
2024-09-24 23:47:09 +02:00
Rolf Bjarne Kvinge eabf3ab371
[Foundation] NSUrlSessionHandler: Adds support for X509 client certificates (#21284)
Addresses #13856

This was originally created by @dotMorten in #20434.

Also make SecIdentity.Import use an in-memory keychain on macOS 15+, so that
SecIdentity.Import works like all othe other platforms (i.e. not requiring
access to the default keychain, which, among other things, is not ideal on
bots).

---------

Co-authored-by: Morten Nielsen <mort5161@esri.com>
Co-authored-by: dotMorten <mn@iter.dk>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2024-09-24 23:44:02 +02:00
Ivan Povazan 103c82a3f4
NativeAOT: Exclude pdbs from NativeAOT app bundles (#21291)
### Description

Previously we were including .pdbs in NativeAOT debug bundles, which was causing issues with debug builds of universal apps (during app bundle merging). This does not seem to be required, as in debug builds NativeAOT compiler uses information from pdbs to provide more data about the managed code during native debugging (like line numbers in stack traces, etc), embedding it into the native image, and does not require presence of said files during runtime.

### Changes

- This PR excludes pdbs from NativeAOT app bundles by removing them from `ResolvedFileToPublish` item group.
- The relevant unit tests are reenabled.

---
Fixes https://github.com/xamarin/xamarin-macios/issues/20903
2024-09-24 19:21:55 +02:00
Rolf Bjarne Kvinge de1f7e91dd
[tests] Add missing platform ignore in bgen tests. (#21282) 2024-09-24 17:26:55 +02:00
Ivan Povazan 22b5933ebb
NativeAOT: Reenable failing networking tests on tvOS/x64 with NativeAOT (#21285)
This PR reenables failing tests on tvOS/x64 with NativeAOT as the
dotnet/runtime fix became available in:
cd064dd8cc
and got merged in to the xamarin net9.0 branch.

The tests were previously disabled in:
https://github.com/xamarin/xamarin-macios/pull/20949

---
Fixes: https://github.com/xamarin/xamarin-macios/issues/20972
2024-09-24 08:29:03 +02:00
Ivan Povazan 5633f4e890
NativeAOT: Fix output dir path for universal apps built with NativeAOT (#21288)
### Description 

When building universal apps with NativeAOT, the output path for the app bundle (and zipped .ipa) is incorrect when building with NativeAOT.

For example publishing a MAUI template app with NativeAOT gives the following output (notice: `osx-arm64`):
```
Created the package: /Users/ivan/tmp/net9-rc1/MacCatRc1/bin/Release/net9.0-maccatalyst/osx-arm64/publish/MacCatRc1-1.0.pkg
```
and the following output tree:
```
bin/Release 
bin/Release/net9.0-maccatalyst 
bin/Release/net9.0-maccatalyst/maccatalyst-arm64/*
bin/Release/net9.0-maccatalyst/maccatalyst-x64/*
bin/Release/net9.0-maccatalyst/osx-arm64
bin/Release/net9.0-maccatalyst/osx-arm64/MacCatRc1.app/*
bin/Release/net9.0-maccatalyst/osx-arm64/publish/*
```

The problem comes from the fact that .NET SDK for NativeAOT builds will try to resolve `RuntimeIdentifier` when it is not specified in:
58eb155e30/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets (L95-L114)

which resolves to `osx-arm64` and gets later used to setup `IntermediateOutputPath` and `OutputPath` in:
58eb155e30/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets (L343-L346)
 
However, this shouldn't be done in universal builds, as the outer build does not have the runtime identifier specified and should not be altered.

### Changes

In this PR we are disabling the resolution of the `RuntimeIdentifier` when building universal apps with NativeAOT early in SDK in order to fix the output path.

I also included unit tests to verify the existence of .app bundles. 

### Follow-up

There is an additional issue with Debug builds of universal apps with NativeAOT, where merging PDBs fails, which is reported in: https://github.com/xamarin/xamarin-macios/issues/20903

---
Contributes to: https://github.com/xamarin/xamarin-macios/issues/20903

---------

Co-authored-by: Ivan Povazan <ivan.povazan@gmail.com>
2024-09-23 21:18:12 +02:00
Jeremi Kurdek d5a7b3981c
Fix MobileILStrip handling of unmanaged dlls (#21098)
Fixes https://github.com/dotnet/runtime/issues/101967
Follow up to the runtime change
https://github.com/dotnet/runtime/pull/106267
2024-09-20 20:01:44 +02:00
Rolf Bjarne Kvinge ba954b9c24
[builds] Delete most of the legacy logic. (#21239) 2024-09-20 17:44:15 +02:00
Rolf Bjarne Kvinge f634ea9b3c Merge remote-tracking branch 'origin/main' into dev/rolf/bump-main-in-net9.0-2024-09-18 2024-09-19 09:48:34 +02:00
Rolf Bjarne Kvinge cc1412c67b
Merge xcode16 into main. (#21260) 2024-09-19 08:57:07 +02:00
Rolf Bjarne Kvinge a5489a9250 [net9.0] Merge main into net9.0. 2024-09-18 18:19:58 +02:00
Rolf Bjarne Kvinge 6fa626f3ac
[tests] Remove the BCL tests. (#21197)
They're legacy Xamarin only, which we don't support anymore.
2024-09-18 17:59:23 +02:00
Rolf Bjarne Kvinge 0db2dd1143 Merge remote-tracking branch 'origin/xcode16' into merge-xcode16-into-main 2024-09-18 17:41:45 +02:00
Rolf Bjarne Kvinge 5f84f5fbdd
[HealthKit] Implement Xcode 16 RC changes. (#21225) 2024-09-18 17:40:45 +02:00
Rolf Bjarne Kvinge 4a94d7679c
[BrowserEngineKit] Improve API a bit by making a few methods async. (#21236) 2024-09-18 10:14:22 +02:00
Rolf Bjarne Kvinge 06286a2416
[ScriptingBridge] Remove outdated tests and add documentation. Fixes #21242. (#21246)
The test we had in our codebase for the SBApplication class was not only
outdated, but also incorrect.

With recent changes the test code doesn't work anymore, so delete it.

Instead, add XML documentation that explains how to use the class in a
way that works.

Fixes https://github.com/xamarin/xamarin-macios/issues/21242.
2024-09-17 17:31:43 +02:00
Rolf Bjarne Kvinge c1953a54f6
[msbuild] Use ILRepack as a dotnet tool. (#21240)
This is one step towards removing the dependency on having Mono
installed during the build.

For some reason that also ended up requiring a few nullability issues in
the msbuild tests.
2024-09-17 16:22:04 +02:00
Rolf Bjarne Kvinge 58ebbe7a06 [tests] Don't use an iOS-specific storyboard on other platforms. 2024-09-17 08:45:29 +02:00
Rolf Bjarne Kvinge 4c10b3a2ab Merge remote-tracking branch 'origin/xcode16' into dev/rolf/bump-main-in-xcode16-2024-09-13 2024-09-17 06:57:27 +02:00
Rolf Bjarne Kvinge 00ec47ae39 Merge remote-tracking branch 'origin/main' into dev/rolf/bump-main-in-xcode16-2024-09-13 2024-09-17 06:57:03 +02:00
dotnet-maestro[bot] 1dd6b6c4f2
[net9.0] Update dependencies from dotnet/sdk (#21085)
This pull request updates the following dependencies

## From https://github.com/dotnet/sdk

- **Subscription**: 3727984b-7a79-4ba3-37dd-08dbe6bddf31
- **Build**: 20240914.3
- **Date Produced**: September 14, 2024 9:05:51 PM UTC
- **Commit**: 1a658dfc714a5064eea57af48d5fd68a3ffab7ef
- **Branch**: refs/heads/release/9.0.1xx

- **Updates**:
  - **Microsoft.NET.Sdk**: [from 9.0.100-rc.2.24463.45 to 9.0.100-rc.2.24464.3][49]

[49]: 0f07337f8d...1a658dfc71

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 9.0.0-rc.2.24461.16 to 9.0.0-rc.2.24462.10 (parent: Microsoft.NET.Sdk)
  - **Microsoft.AspNetCore.App.Ref**: from 9.0.0-rc.2.24462.5 to 9.0.0-rc.2.24463.6 (parent: Microsoft.NET.Sdk)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-rc.2.24461.16 to 9.0.0-rc.2.24462.10 (parent: Microsoft.NET.Sdk)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-rc.2.24461.16 to 9.0.0-rc.2.24462.10 (parent: Microsoft.NET.Sdk)
2024-09-16 19:54:05 +02:00
Rolf Bjarne Kvinge 280b27aec1
[CoreMidi] Implement Xcode 16.0 beta 1-6 changes. (#20882)
Note: there were no changes in beta 3, beta 4, beta 5 or beta 6.
2024-09-16 10:59:28 +02:00
Rolf Bjarne Kvinge e45dca7413
[Metal] Implement Xcode 16 RC changes. (#21229) 2024-09-13 19:29:18 +02:00
Rolf Bjarne Kvinge a52f186066 [xcode16] Merge main into xcode16. 2024-09-13 15:53:38 +02:00
Rolf Bjarne Kvinge 5fd9438bde
[tools/install-source] Remove. (#21195)
This is legacy only, so we don't need it anymore.
2024-09-13 15:49:53 +02:00
Rolf Bjarne Kvinge 3245946fdc
[xtro] Remove all legacy Xamarin bits. (#21196) 2024-09-13 15:49:13 +02:00
Rolf Bjarne Kvinge 99ce14daf7
[CoreMedia] Implement Xcode 16 RC changes. (#21226) 2024-09-13 12:15:21 +02:00
Rolf Bjarne Kvinge 096eca541b
[MediaExtension] Implement this new framework. (#21176) 2024-09-12 19:53:51 +02:00
Rolf Bjarne Kvinge 8a41217f73
[xcode16] Merge main into xcode16. (#21220) 2024-09-12 18:53:12 +02:00
Rolf Bjarne Kvinge 59d489dfe6
[MetalPerforanceShaders] Implement Xcode 16.0 beta 1-6 changes. (#21155)
Some of the availability attributes are from earlier OS versions, but
it's what the headers + Apple's documentation say.

Note: there were no changes in beta 2, beta 3, beta 4, beta 5 or beta 6.
2024-09-12 18:22:53 +02:00
Rolf Bjarne Kvinge f009530af5
[Phase] Implement Xcode 16.0 beta 1-6 changes. (#21156)
Note: there were no changes in beta 2, beta 3, beta 4, beta 5 or beta 6.
2024-09-12 15:12:56 +02:00
Rolf Bjarne Kvinge 6a040739fa
[CoreML] Implement Xcode 16.0 beta 1-6 changes. (#21145)
Note: there were no changes in beta 4, beta 5 or beta 6.
2024-09-12 13:24:16 +02:00
Rolf Bjarne Kvinge d3dd195956
[VideoToolbox] Implement Xcode 16.0 beta 1-6 changes. (#21157)
Note: there were no changes in beta 6.
2024-09-12 13:11:48 +02:00
Rolf Bjarne Kvinge f7bddc6ac9
[PassKit] Implement Xcode 16.0 beta 1-6 changes. (#21139)
Note: there were no changes in beta 3, beta 4 or beta 5.
2024-09-12 13:10:34 +02:00
Rolf Bjarne Kvinge 17d27c9b07
[WebKit] Implement Xcode 16.0 beta 1-6 changes. (#21166)
Note: there were no changes in beta 3, beta 4, beta 5 or beta 6.
2024-09-12 13:04:51 +02:00
Rolf Bjarne Kvinge ad1a3b789f
[CoreVideo] Implement Xcode 16.0 beta 1-6 changes. (#21163)
Note: there were no changes in beta 2, beta 3, beta 5 or beta 6.
2024-09-12 13:03:49 +02:00
Rolf Bjarne Kvinge fd882726c9
[xcode16] Bump to Xcode 16 RC. (#21209) 2024-09-12 13:00:36 +02:00
Rolf Bjarne Kvinge 6325335fe5 [xcode16] Merge main into xcode16. 2024-09-12 11:10:51 +02:00
Rolf Bjarne Kvinge 06c2920791
[NetworkExtension] Implement Xcode 16.0 beta 1-6 changes. (#21171)
Note: there were no changes in beta 2, beta 3, beta 4, beta 5 or beta 6.
2024-09-11 22:02:09 +02:00
Rolf Bjarne Kvinge 567b2a0a71
[xcode16] Misc fixes after running tests on macOS Sequoia. (#21193) 2024-09-11 20:56:55 +02:00
Rolf Bjarne Kvinge cf8d2ad695
[BrowserEngineKit] Implement this new framework. (#21168)
Note: this framework was introduced in Xcode 15.4.

Up-to-date until RC.
2024-09-11 20:34:52 +02:00
Rolf Bjarne Kvinge 81799f17f1 [net9.0] Merge main into net9.0. 2024-09-11 20:33:17 +02:00
Rolf Bjarne Kvinge 499820eda5
[tests] Fix ignoring members based on OSPlatformAttributes. (#21192)
We were ignoring members based on whether a member had
ObsoletedOSPlatformAttribute/UnavailableOSPlatformAttribute, not taking
into account that the attribute might not apply to the current platform.

So implement logic to only take into account
[Obsoleted|Unavailable]OSPlatformAttributes for the current platform.
2024-09-11 20:24:03 +02:00
Rolf Bjarne Kvinge d99f6f8fa9
[AppKit/UIKit] Implement Xcode 16.0 beta 1-6 changes. (#21130) 2024-09-11 16:48:52 +02:00
Rolf Bjarne Kvinge e8bf4541d0
[AVFoundation] Add AVCaptureDeviceTypeExternal. (#21190)
Adds an enum entry for: 

https://developer.apple.com/documentation/avfoundation/avcapturedevicetypeexternal

PR originally submitted by @jeremy-visionaid in #21187.

Fixes #21187.

---------

Co-authored-by: Jeremy Powell <jeremy@visionaid.com>
2024-09-11 14:26:18 +02:00
Rolf Bjarne Kvinge 1417b22b99 [xcode16] Merge main into xcode16. 2024-09-10 18:59:19 +02:00
Rolf Bjarne Kvinge 39459a2352
[bgen] Fix detecting NSObject types and generating block code with types that aren't NSObjects. (#21181) 2024-09-10 18:59:05 +02:00
Rolf Bjarne Kvinge 674ded4af4
[xcode16] Use [Experimental] instead of [RequiresPreviewFeatures]. (#21178)
This is because `EnablePreviewFeatures=true` doesn't quite work, since it
requires the building .NET and the target .NET to be on the same version.

We might want to build with .NET 9, but the Xcode branch is targeting .NET 8,
so it doesn't work.

This behavior is explained here:
https://github.com/dotnet/designs/blob/main/accepted/2021/preview-features/preview-features.md#meaning-of-property-in-multi-targeted-projects

The best solution seems to switch to using the Experimental attribute instead,
which was designed for our scenario (and explicitly to fix the problem we're
running into): bba3216250/accepted/2023/preview-apis/preview-apis.md

This also meant we had to augment `-nowarn` for bgen to:

* Pass any nowarn values to the compiler when bgen compiles stuff.
* Pass `$(NoWarn)` (the MSBuild property) to bgen when building a binding project.

---------

Co-authored-by: Alex Soto <alex@soto.dev>
2024-09-10 16:11:58 +02:00
Rolf Bjarne Kvinge 6aca92cd74
[Metal] Implement Xcode 16.0 beta 1-6 changes. (#20895)
Note: there were no changes in beta 3, beta 4 or beta 5.
2024-09-09 19:42:49 +02:00
Rolf Bjarne Kvinge ef077323f3
[bgen] Fix using arrays of INativeObjects in delegate signatures. (#21183) 2024-09-09 15:25:38 +02:00
Rolf Bjarne Kvinge d909174f47
[tests] Make the simulator the default runtime identifier when running test suites from the command line. (#21194)
Because simulator is where we most commonly run tests.

And hardcode arm64 - if x64 is ever needed, and I'm bugged enough to add
auto-detection, I'll do it then.
2024-09-09 15:03:14 +02:00
Rolf Bjarne Kvinge 941ead0ff4
[bgen] Fix using types that are in multiple namespaces. (#21182)
There's both a Network.NWEndpoint and a NetworkExtension.NWEndpoint, and the
generator generates ambiguous code in certain cases.

Fix the generator to use the full type reference for such types.
2024-09-09 14:28:15 +02:00