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

16750 Коммитов

Автор SHA1 Сообщение Дата
dotnet-maestro[bot] a1f8588ceb Fix merge failure. 2023-09-11 10:32:51 +02:00
Rolf Bjarne Kvinge 9d8962c06c [net8.0] Merge main into net8.0. 2023-09-11 10:31:07 +02:00
Rolf Bjarne Kvinge d6eb39543f
[ObjCRuntime] Remove unnecessary macOS code from .NET. (#18967)
In Xamarin.Mac we have some code to support unusual ways of creating app
bundles while including Xamarin.Mac, and also dynamic loading of the Mono
runtime.

In .NET, we don't support these unusual app bundle creating logic for any
platform, and the Mono runtime isn't even an option for macOS, so exclude some
of the corresponding code from .NET.

This fixes a few warnings in NativeAOT about this code not being trimmer-safe.
2023-09-11 10:30:36 +02:00
Rolf Bjarne Kvinge de762d67cc
[dotnet] Point app extensions to any frameworks in the root app bundle. Fixes #17876. (#18913)
Put any frameworks in app extensions in the Frameworks directory in the
containing app bundle. This saves a lot of space if the same framework is used
in both an app extension and the containing project (or multiple app
extensions).

Fixes https://github.com/xamarin/xamarin-macios/issues/17876.
Fixes https://github.com/xamarin/xamarin-macios/issues/17679.
2023-09-11 09:52:54 +02:00
Rolf Bjarne Kvinge b44b57e59d
[dotnet] Make bundling the 'createdump' utility opt-in. Fixes #16189. (#18960)
Make bundling the 'createdump' utility opt-in by setting BundleCreateDump=true.

Fixes: https://github.com/xamarin/xamarin-macios/issues/16189
2023-09-11 09:52:14 +02:00
Rolf Bjarne Kvinge 2fba9a81fe
[msbuild] Remove unused parameters from the CompileEntitlement task. (#18945) 2023-09-11 09:35:37 +02:00
Ivan Povazan bf77022512
Simplify icudat file lookup by specifying ICU_DAT_FILE_PATH as a RuntimeHostConfigurationOption (#18914)
Fixes https://github.com/xamarin/xamarin-macios/issues/18471
2023-09-08 16:46:32 +02:00
Haritha Mohan 4e0951bee7
[MetricKit] Add support for Xcode 15 beta 8 (#18958)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-09-08 10:17:57 -04:00
Haritha Mohan e9241bcd12
[UniformTypeIdentifiers] Add support for Xcode 15 beta 8 (#18942)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-09-08 10:16:14 -04:00
dotnet-maestro[bot] 33bee558da
[net8.0] Update dependencies from dotnet/installer (#18956)
This pull request updates the following dependencies

## 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.AspNetCore.App.Ref**: from 8.0.0-rc.2.23454.12 to 8.0.0-rc.2.23455.8 (parent: Microsoft.Dotnet.Sdk.Internal)

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

- **Subscription**: f9b68d84-9c90-4bd0-5499-08db4112d57e
- **Build**: 20230906.6
- **Date Produced**: September 7, 2023 12:12:59 AM UTC
- **Commit**: 476310d94a3f821f8413a213472224729bfd43a8
- **Branch**: refs/heads/release/8.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-rc.2.23455.10 to 8.0.100-rc.2.23456.6][3]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-rc.2.23454.12 to 8.0.0-rc.2.23455.8][4]

[3]: 096a36b4b2...476310d94a
[4]: 51367f6a3e...2772a78349
2023-09-08 14:51:46 +02:00
Rolf Bjarne Kvinge 673dd5782b [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-09-08 10:31:44 +02:00
Haritha Mohan f3db44e156
[Photos] Add support for Xcode 15 beta 8 (#18941)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-09-07 17:59:43 -04:00
Manuel de la Pena e54983e0ef
[ExtensionKit] Add support for xcode15 beta7. (#18929) 2023-09-07 09:05:51 -04:00
Haritha Mohan 540d3375d4
[SafariServices] Add support for Xcode 15 beta 8 (#18939)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-09-07 08:48:58 -04:00
Rolf Bjarne Kvinge 69c435188f
[src] Throw an exception if entering methods that aren't supported with NativeAOT. (#18907)
We have numerous methods that we should never end up executing when using
NativeAOT, in particular methods called from native code.

Ideally we'd be able to link these away completely, but that's a much larger
refactoring, so in the meantime we can do something simpler: just throw an
exception in these methods if using NativeAOT.

There are two advantages:

* Smaller apps.
* No warnings from NativeAOT about these methods doing things that aren't
  trimmer-safe.

Contributes towards https://github.com/xamarin/xamarin-macios/issues/18629.
2023-09-07 13:57:54 +02:00
Rolf Bjarne Kvinge 8b3bf352d1
[AppKit] Implement a few missing fields for NSToolbar. Fixes #12871. (#18946)
Fixes https://github.com/xamarin/xamarin-macios/issues/12871.
2023-09-07 13:56:40 +02:00
Rolf Bjarne Kvinge 08ad43a003
[msbuild] Warn when we detect that the app developer is trying to link with a static library when using Hot Restart. Fixes #17640. (#18940)
Warn when we detect that the app developer is trying to link with a static
library when using Hot Restart, because we don't support linking with static
libraries in that case.

Also change the resource generation for Xamarin.iOS.Tasks.Windows project to
generate the code-behind for the resources during the build (as opposed to by
the IDE - which won't happen unless using an IDE, while the build will always
happen).

Fixes https://github.com/xamarin/xamarin-macios/issues/17640.
2023-09-07 13:53:45 +02:00
dotnet-maestro[bot] befd108873
[net8.0] Update dependencies from xamarin/xamarin-macios (#18950)
This pull request updates the following dependencies

## From https://github.com/xamarin/xamarin-macios

- **Subscription**: 34d10fbb-96e7-4139-42ad-08db73ee5f69
- **Build**: 20230906.13
- **Date Produced**: September 6, 2023 9:33:42 PM UTC
- **Commit**: 63a764bfb5
- **Branch**: refs/heads/release/7.0.3xx-multi-targeting

- **Updates**:
  - **Microsoft.iOS.Sdk.net7.0_16.4**: [from 16.4.7383-ci.release-test-multi-targetting-main to 16.4.7106-ci.release-7-0-3xx-multi-targeting][4]

[4]: 63792d9cc1...63a764bfb5
2023-09-07 09:01:59 +02:00
Šimon Rozsíval aef2c916e9
[NativeAOT] Do not root platform assembly (#18885)
Closes #18779

Based on testing several MAUI samples, there doesn't seem to be a reason
to root the whole platform assembly anymore.
2023-09-07 08:13:02 +02:00
Rolf Bjarne Kvinge 1c8c4fb6d0
[tools] Skip more types and namespaces when using Xcode 15. (#18938)
Backport of #18936.
2023-09-07 07:37:35 +02:00
dotnet-maestro[bot] 4bb45ebbf7
[main] Update dependencies from dotnet/xharness (#18921)
This pull request updates the following dependencies

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

- **Subscription**: 601bc5e1-1cae-44b5-cf5f-08db9342aa2f
- **Build**: 20230831.1
- **Date Produced**: August 31, 2023 4:27:34 PM UTC
- **Commit**: 1446eababf78d7787af2aa86d5393c342c4b1b0b
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.DotNet.XHarness.iOS.Shared**: [from 8.0.0-prerelease.23421.1 to 8.0.0-prerelease.23431.1][1]

[1]: 1c09ef5b66...1446eababf
2023-09-07 07:33:18 +02:00
Manuel de la Pena 48c498b73f
[CoreLocation] Add support for xcode 15. (#18876)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-09-06 16:40:27 -04:00
Manuel de la Pena f8da3db02d
[FSEvents] Add support for xcode 15 beta7. (#18930) 2023-09-06 16:39:45 -04:00
VS MobileTools Engineering Service 2 79da6c2c46
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 8349044 (#18917)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2023-09-06 13:01:07 -05:00
dotnet-maestro[bot] 585e3fc7a9
[net8.0] Update dependencies from dotnet/installer (#18935)
This pull request updates the following dependencies

## 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.AspNetCore.App.Ref**: from 8.0.0-rc.2.23453.2 to 8.0.0-rc.2.23454.12 (parent: Microsoft.Dotnet.Sdk.Internal)

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

- **Subscription**: f9b68d84-9c90-4bd0-5499-08db4112d57e
- **Build**: 20230905.10
- **Date Produced**: September 6, 2023 7:15:30 AM UTC
- **Commit**: 096a36b4b25ee54d00938076f467f3696a295104
- **Branch**: refs/heads/release/8.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-rc.2.23454.1 to 8.0.100-rc.2.23455.10][1]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-rc.2.23453.2 to 8.0.0-rc.2.23454.12][2]

[1]: d511823dcc...096a36b4b2
[2]: 7ac89ddffb...51367f6a3e
2023-09-06 19:51:24 +02:00
Rolf Bjarne Kvinge 5fdb0a3976
[net8.0] [dotnet] Add support for multi-targeting. (#18931)
Multi targetting is described here:
https://github.com/xamarin/xamarin-macios/blob/main/docs/multi-target-framework.md

This change implements support for:

* Building using the first .NET 7 packages we shipped.
* Building using the last .NET 7 packages we've shipped.

In both cases by specifying the OS version in the target framework.

Additionally adding support for any other API/OS version is trivial: it's just
a matter of listing the corresponding versions in a few files (this is
particularly interesting to add support for preview versions).

It does so by:

* Renaming the ref, sdk and runtime packs to contain the target framework and
  the target platfrom version, so the packages will now be named:

    * iOS

        * Microsoft.iOS.Sdk.net8.0_16.4
        * Microsoft.iOS.Ref.net8.0_16.4
        * Microsoft.iOS.Runtime.ios-arm64.net8.0_16.4
        * Microsoft.iOS.Runtime.iossimulator-arm64.net8.0_16.4
        * Microsoft.iOS.Runtime.iossimulator-x64.net8.0_16.4

    * tvOS

        * Microsoft.tvOS.Sdk.net8.0_16.4
        * Microsoft.tvOS.Ref.net8.0_16.4
        * Microsoft.tvOS.Runtime.ios-arm64.net8.0_16.4
        * Microsoft.tvOS.Runtime.iossimulator-arm64.net8.0_16.4
        * Microsoft.tvOS.Runtime.iossimulator-x64.net8.0_16.4

    * Mac Catalyst

        * Microsoft.MacCatalyst.Sdk.net8.0_16.4
        * Microsoft.MacCatalyst.Ref.net8.0_16.4
        * Microsoft.MacCatalyst.Runtime.maccatalyst-x64.net8.0_16.4
        * Microsoft.MacCatalyst.Runtime.maccatalyst-arm64.net8.0_16.4

    * macOS

        * Microsoft.macOS.Sdk.net8.0_13.3
        * Microsoft.macOS.Ref.net8.0_13.3
        * Microsoft.macOS.Runtime.osx-x64.net8.0_13.3
        * Microsoft.macOS.Runtime.osx-arm64.net8.0_13.3

* Updating the WorkloadManifest.json and WorkloadManifest.targets files to
  load the correct packs according to the TargetFramework in the developer's
  project.

* We're also now giving a better error message for invalid/unsupported/eol'ed
  target frameworks. Fixes https://github.com/xamarin/xamarin-macios/issues/18790.

* Add a few tests.

Fixes:
* https://github.com/xamarin/xamarin-macios/issues/18790.
* https://github.com/dotnet/sdk/issues/30103.
* https://github.com/xamarin/xamarin-macios/issues/16802.

Contributes towards:

* https://github.com/xamarin/xamarin-macios/issues/18343.
2023-09-06 19:29:07 +02:00
Rolf Bjarne Kvinge c251110865
[net8.0] Merge main into net8.0. (#18932) 2023-09-06 19:26:36 +02:00
Ivan Povazan 1e06cef1e7 Clean up globalization custom logic 2023-09-06 18:03:32 +02:00
Rolf Bjarne Kvinge 324a0f0578
[AppKit] Add missing NSView.ClipsToBounds. Fixes #18916. (#18924)
Fixes https://github.com/xamarin/xamarin-macios/issues/18916.
2023-09-06 16:42:07 +02:00
Manuel de la Pena 0c14d8925e
[CoreWLAN] Add support for Xcode 15 beta 7. (#18926) 2023-09-06 07:34:51 -04:00
Rolf Bjarne Kvinge 8ac62371e4 [net8.0] Merge main into net8.0. 2023-09-06 12:22:22 +02:00
Rolf Bjarne Kvinge 17126b3d7e
[docs] Point to general documentation about workloads in the documentation for multi targeting. (#18923) 2023-09-06 12:16:35 +02:00
Rolf Bjarne Kvinge 68432a1550
[bgen] Add ToArray and ToFlags extension methods for strongly typed [Flags] enums. (#18925)
We have a few different implementations of how to compute a set or array of NSString
constants from an enum value, and also computing an enum value from a set or array
of NSString constants.

So add support to the generator for generating a ToArray and a ToFlags method for
these conversions, and remove all the manual code.

This has a few advantages:

* The generated code is automatically updated with new enum fields (not all previous
  implementations were).
* Reduces code duplication.
* Reduces manual code.

Additionally, when computing between a group of constants and the corresponding flags,
we have to handle any missing constants or flags gracefully, otherwise the code won’t
be forward compatible.

Example (from bug #18833):

* App developer writes code to fetch the AVCaptureMetadataOutput.AvailableMetadataObjectTypes
  property, which is an enum value of flags.
* App developer ships their app in the app store.
* Apple releases a new iOS update, adding new values and constants to the enum.
* The native [AVCaptureMetadataOutput availableMetadataObjectTypes] method returns
  these new constants.
* This means that if the AVCaptureMetadataOutput.AvailableMetadataObjectTypes property
  throws an exception if encountering unknown constants, our API wouldn’t be forward
  compatible.
* The correct solution here is that AVCaptureMetadataOutput.AvailableMetadataObjectTypes
  must ignore any constants it doesn’t know about.

Fixes https://github.com/xamarin/xamarin-macios/issues/18833.
2023-09-06 12:15:45 +02:00
Šimon Rozsíval fb86b95849
[NativeAOT] Fix ILC warning for NSObject.RegisterToggleRef (#18889)
This PR implements a workaround for the following build warning:

```
ILC: Method '[Microsoft.iOS]Foundation.NSObject.RegisterToggleRef(NSObject,native int,bool)' will always throw because:
Invalid IL or CLR metadata in 'Void Foundation.NSObject.RegisterToggleRef(Foundation.NSObject, IntPtr, Boolean)'
```

Ref #18524
2023-09-06 12:13:30 +02:00
Rolf Bjarne Kvinge eaa69e79b7 [tests] Add multi-targeting test. 2023-09-06 11:32:54 +02:00
Rolf Bjarne Kvinge 42f523812f [dotnet] Add support for multi-targeting. 2023-09-06 11:32:54 +02:00
Rolf Bjarne Kvinge 19f30a1f06 [dotnet] Rename packs to contain target framework. 2023-09-06 11:29:16 +02:00
Rolf Bjarne Kvinge ed23576fea
[net8.0] Merge main into net8.0. (#18910) 2023-09-06 11:11:10 +02:00
Manuel de la Pena db1ad017d0
[CoreMotion] Add support for Xcode 15 beta 7. (#18915)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-09-05 10:45:37 -04:00
Manuel de la Pena d59ddc0704
[CoreML] Add xcode 15 beta 7 support. (#18898)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-09-05 10:41:07 -04:00
Manuel de la Pena 138884abee
[CoreServices] Add support for Xcode 15. (#18919) 2023-09-05 10:40:50 -04:00
Manuel de la Pena 1b818059c1
[CoreTelephony] Add support for xcode 15. (#18920)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-09-05 10:39:39 -04:00
Haritha Mohan 193618591d
[MapKit] Add support for Xcode 15 beta 7 (#18877)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2023-09-05 08:22:13 -04:00
Rolf Bjarne Kvinge 2ee21367ec Merge remote-tracking branch 'origin/net8.0' into bump-main-in-net8.0-2023-09-01 2023-09-05 12:35:07 +02:00
dotnet-maestro[bot] 4a5fbd7644
[net8.0] Update dependencies from dotnet/installer (#18871)
This pull request updates the following dependencies

## 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 8.0.0-rc.2.23426.4 to 8.0.0-rc.2.23431.9 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-rc.2.23425.11 to 8.0.0-rc.2.23453.2 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-rc.2.23426.4 to 8.0.0-rc.2.23431.9 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-rc.2.23426.4 to 8.0.0-rc.2.23431.9 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.DotNet.Cecil**: from 0.11.4-alpha.23421.1 to 0.11.4-alpha.23428.2 (parent: Microsoft.NETCore.App.Ref)

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

- **Subscription**: f9b68d84-9c90-4bd0-5499-08db4112d57e
- **Build**: 20230904.1
- **Date Produced**: September 4, 2023 10:20:53 AM UTC
- **Commit**: d511823dcc3ac2a03333d9572625605d2a9929ab
- **Branch**: refs/heads/release/8.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-rc.2.23428.11 to 8.0.100-rc.2.23454.1][17]
  - **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-rc.2.23426.4 to 8.0.0-rc.2.23431.9][18]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-rc.2.23425.11 to 8.0.0-rc.2.23453.2][19]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-rc.2.23426.4 to 8.0.0-rc.2.23431.9][18]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-rc.2.23426.4 to 8.0.0-rc.2.23431.9][18]
  - **Microsoft.DotNet.Cecil**: [from 0.11.4-alpha.23421.1 to 0.11.4-alpha.23428.2][20]

[17]: b0336e3edc...d511823dcc
[18]: 4122c63a13...3c48925a6c
[19]: fcc98f5c65...7ac89ddffb
[20]: d412306c15...fa5acbd2cc
2023-09-05 12:27:59 +02:00
Rolf Bjarne Kvinge 4d22b96f21
[net8.0] [msbuild] Show an error for a remote build if [Intermediate]OutputPath is an absolute path. (#18900)
This is way better than some obscure build error.

References:

* https://github.com/xamarin/xamarin-macios/issues/18510
* https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1847166
2023-09-05 10:44:59 +02:00
Rolf Bjarne Kvinge 86c82c91a3
[net8.0-xcode15] [runtime] Bump the min OS version in the Info.plist in Xamarin.framework. (#18912)
Bump the min OS version to match our actual min OS version.
2023-09-05 10:26:44 +02:00
Rolf Bjarne Kvinge 33a05569e0
[src] Make Runtime.GetDelegateForBlock a generic method to pass the delegate type. (#18906)
This makes it possible to call the generic
Marshal.GetDelegateForFunctionPointer<T> method instead of the non-generic 
Marshal.GetDelegateForFunctionPointer method, which is easier for AOT
compilers to handle (no reflection for Marshal.GetDelegateForFunctionPointer<T>).

Contributes towards https://github.com/xamarin/xamarin-macios/issues/18629.
2023-09-05 10:26:22 +02:00
Rolf Bjarne Kvinge cbcde7e15d
[tests] Move the ARConfigurationTest.Subclasses test from monotouch-test to cecil-test. (#18908)
This test uses reflection to figure out if there are any ARConfiguration
subclasses that don't implement a particular method. The reflection usage is
problematic when trimming apps, and this is really what the Cecil tests are
for, so just re-implement the entire tests as a Cecil test.
2023-09-05 09:36:47 +02:00
Rolf Bjarne Kvinge da639bf576 [tests] Fix building unit tests after an MSBuild.StructuredLogger bump. 2023-09-05 09:16:20 +02:00