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

822 Коммитов

Автор SHA1 Сообщение Дата
Alex Soto 4486eb3b9f Merge remote-tracking branch 'xamarin/main' into dev/alex/main-net9.0 2024-07-11 18:53:54 -04:00
Rolf Bjarne Kvinge 219c74a3c4
[xcode15.4] Update bindings to Xcode 15.4 (#20865)
Co-authored-by: Alex Soto <alex@soto.dev>
2024-07-11 14:09:52 -04:00
dotnet-maestro[bot] dfa48ff895
[net9.0] Update dependencies from dotnet/sdk (#20794)
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 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.AspNetCore.App.Ref**: from 9.0.0-preview.6.24320.4 to 9.0.0-preview.7.24360.7 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: from 9.0.0-preview.6.24317.2 to 9.0.0-preview.7.24319.4 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.DotNet.Cecil**: from 0.11.4-alpha.24313.1 to 0.11.5-alpha.24324.1 (parent: Microsoft.NETCore.App.Ref)

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

- **Subscription**: 3727984b-7a79-4ba3-37dd-08dbe6bddf31
- **Build**: 20240711.1
- **Date Produced**: July 11, 2024 8:29:26 AM UTC
- **Commit**: 81ac886071828da7f14d0c26d731ac06abd0c7f6
- **Branch**: refs/heads/main

- **Updates**:
  - **VS.Tools.Net.Core.SDK.Resolver**: [from 9.0.100-preview.7.24323.5 to 9.0.100-preview.7.24361.1][58]
  - **Microsoft.NET.ILLink.Tasks**: [from 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2][59]
  - **Microsoft.AspNetCore.App.Ref**: [from 9.0.0-preview.6.24320.4 to 9.0.0-preview.7.24360.7][60]
  - **Microsoft.NETCore.App.Ref**: [from 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2][59]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: [from 9.0.0-preview.6.24317.2 to 9.0.0-preview.7.24319.4][61]
  - **Microsoft.NETCore.App.Ref**: [from 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2][59]
  - **Microsoft.DotNet.Cecil**: [from 0.11.4-alpha.24313.1 to 0.11.5-alpha.24324.1][62]

[58]: ea9243f9cb...81ac886071
[59]: 117cfccdd7...4e278fe17f
[60]: 613c1e990b...71b5ef3f5c
[61]: 9880d891dd...ffe9afdc04
[62]: d145726036...7e4af02521
2024-07-11 19:58:14 +02:00
Alex Soto 2e5ef1eb1c
[xcode15.3] Bump to Xcode 15.3 bindings (#20780)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2024-07-11 11:41:31 +02:00
dotnet-maestro[bot] 4a9bfcb154
[net9.0] Update dependencies from dotnet/sdk (#20621)
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 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.AspNetCore.App.Ref**: from 9.0.0-preview.5.24256.2 to 9.0.0-preview.6.24305.3 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: from 9.0.0-preview.5.24223.2 to 9.0.0-preview.6.24277.2 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1 (parent: VS.Tools.Net.Core.SDK.Resolver)

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

- **Subscription**: 3727984b-7a79-4ba3-37dd-08dbe6bddf31
- **Build**: 20240605.17
- **Date Produced**: June 5, 2024 11:40:08 PM UTC
- **Commit**: 6ecc573c92a1237627b37310c6aec65ff3caacc8
- **Branch**: refs/heads/main

- **Updates**:
  - **VS.Tools.Net.Core.SDK.Resolver**: [from 9.0.100-preview.5.24262.2 to 9.0.100-preview.6.24305.17][65]
  - **Microsoft.NET.ILLink.Tasks**: [from 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1][66]
  - **Microsoft.AspNetCore.App.Ref**: [from 9.0.0-preview.5.24256.2 to 9.0.0-preview.6.24305.3][67]
  - **Microsoft.NETCore.App.Ref**: [from 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1][66]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: [from 9.0.0-preview.5.24223.2 to 9.0.0-preview.6.24277.2][68]
  - **Microsoft.NETCore.App.Ref**: [from 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1][66]

[65]: 1741345c63...6ecc573c92
[66]: 84b3339505...3750ac5161
[67]: da3aa27233...8adff2c3cf
[68]: 53288f87c5...fae2c95346

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
2024-06-25 13:49:44 +02:00
Rolf Bjarne Kvinge 0e537376a4 [net9.0] Merge main into net9.0. 2024-06-05 17:23:29 +02:00
Rolf Bjarne Kvinge 36bc43f7dc
[CryptoTokenKit] Bind this framework. Fixes #7876. (#20587)
Fixes https://github.com/xamarin/xamarin-macios/issues/7876.

---------

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2024-05-29 20:38:40 +02:00
Rolf Bjarne Kvinge 50f8494961 [net9.0] Merge main into net9.0. 2024-04-23 15:35:11 +02:00
Rolf Bjarne Kvinge be241769fc
[GameplayKit] Remove the bindings for GKHybridStrategist. (#20468)
The GKHybridStrategist type doesn't exist in iOS. This was probably a type
initially introduced in a beta version, and then removed in a later beta
version, and then we didn't notice.
2024-04-22 07:26:10 +02:00
Rolf Bjarne Kvinge 3cc37f4998 [net9.0] Merge main into net9.0. 2024-03-18 18:38:20 +01:00
Rolf Bjarne Kvinge 76482387c8
[SafetyKit] Added bindings for SafetyKit. (#20263)
This also required a minor generator fix to fix generation of async methods
with a nullable NSError.

---------

Co-authored-by: Israel Soto <issoto@microsoft.com>
2024-03-15 08:15:01 +01:00
Rolf Bjarne Kvinge 2348736a2b
[DeviceDiscoveryExtension] Added bindings for DeviceDiscoveryExtension. (#20272)
---------

Co-authored-by: Israel Soto <issoto@microsoft.com>
2024-03-14 07:58:45 +01:00
Rolf Bjarne Kvinge 58e382efb7
[DeviceDiscoveryUI] Added bindings for DeviceDiscoveryUI. (#20271)
Follow-up of #15762.

---------

Co-authored-by: Israel Soto <issoto@microsoft.com>
2024-03-08 10:07:39 +01:00
Rolf Bjarne Kvinge f749cb323f
[net9.0] Bump min macOS to 12.0 and min Mac Catalyst to 15.0. Fixes #19392. (#20186)
This is a follow-up to a previous pull request that bumped min OS
version for iOS and tvOS: #19953.

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

This PR might be easiest to review commit-by-commit.
2024-02-29 17:26:41 +01:00
Rolf Bjarne Kvinge b17de38d2d Merge remote-tracking branch 'origin/main' into bump-main-in-net9.0-2024-02-19 2024-02-28 17:56:05 +01:00
Rolf Bjarne Kvinge 9cd3e86ced [tests] Bump min OS versions in all tests. 2024-02-28 12:08:24 +01:00
Rolf Bjarne Kvinge b099691015
[introspection] Fix calling base in iOSApiCtorInitTest.SkipCheckShouldReExposeBaseCtor. (#20154)
The Skip* overrides in introspection are of the type "Do we skip? If not, then
I don't know, and we should call base", but the implementation of
iOSApiCtorInitTest.SkipCheckShouldReExposeBaseCtor is wrong, it just says to
not skip for every type except the one the method knows about.

So adjust the logic to call base if
iOSApiCtorInitTest.SkipCheckShouldReExposeBaseCtor has no knowledge of the
type in question.
2024-02-21 10:41:28 +01:00
Rolf Bjarne Kvinge 79ac366c8f
[Foundation] Don't leak exceptions in WrappedNSInputStream.Read. (#20131)
We don't want to leak exceptions back to the calling native code in WrappedNSInputStream.Read, because that will likely crash the process.

Example stack trace:

    ObjectDisposed_StreamClosed (System.ObjectDisposedException)
       at System.ThrowHelper.ThrowObjectDisposedException_StreamClosed(String) + 0x3c
       at System.IO.MemoryStream.Read(Byte[], Int32, Int32) + 0x124
       at System.Net.Http.MultipartContent.ContentReadStream.Read(Byte[], Int32, Int32) + 0x78
       at System.Net.Http.NSUrlSessionHandler.WrappedNSInputStream.Read(IntPtr buffer, UIntPtr len) + 0x58
       at MyApp!<BaseAddress>+0x7082f8

Instead return -1 from the Read method, which is documented as an error
condition, and then also return a custom NSError from the Error property -
which is also documented to be where the error is supposed to be surfaced.

Ref: https://developer.apple.com/documentation/foundation/nsinputstream/1411544-read

Ref: https://github.com/xamarin/xamarin-macios/issues/20123.
2024-02-21 10:29:33 +01:00
Rolf Bjarne Kvinge 3fb52c3ed7 [tests] Bump min OS versions in all tests. 2024-01-29 15:24:30 +01:00
Alex Soto b3f7021eff
[Xcode 15.2] Bump to Xcode 15.2 (#19785)
This is a manual and squashed backport of
https://github.com/xamarin/xamarin-macios/pull/19717 and it was updated
to use Xcode 15.2 since Xcode 15.2 contains the same SDKs as Xcode 15.1
but Xcode 15.2 has visionOS SDK and it is the new stable release from
Apple.

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-01-12 04:56:22 -05:00
Manuel de la Pena d60cded66e
[PassKit] Fix the intro tests for PassKit on macOS. (#19760) 2024-01-08 11:58:08 -05:00
Manuel de la Pena 7ad1837e7d
[Metal] Add support for Xcode15. (#19379)
This PR brings all the changes from the new Metal APIs. During the
review pay special attention to the changes done in the Protocols in
order to add tvOS support.

The main problem we have had doing this PR is that tvOS was not done on
time before the NET branching, that left us with a lot of memebers that
were NOT added in tvOS that are abstract on dotnet, which has left use
in a pickle.

Lets use the following code as an example.

Code found before this commit:

```csharp
	[Mac (11, 0), iOS (14, 0), NoTV]
	[MacCatalyst (14, 0)]
#if NET
	[Abstract]
#endif
	[Export ("accelerationStructureCommandEncoder")]
	IMTLAccelerationStructureCommandEncoder CreateAccelerationStructureCommandEncoder ();
```

A naive approach would be to add just the tvOS suppor as follows:

```csharp
	[Mac (11, 0), iOS (14, 0), TV (16,0)]
	[MacCatalyst (14, 0)]
#if NET
	[Abstract]
#endif
	[Export ("accelerationStructureCommandEncoder")]
	IMTLAccelerationStructureCommandEncoder CreateAccelerationStructureCommandEncoder ();
```

The above change represents and API braking change on the donet tvOS dll
because it adds a new Abstrtact members, so this is no an acceptable
solution.

There is a second naive approach we can take which is as follows:

```csharp
	[Mac (11, 0), iOS (14, 0), TV (16,0)]
	[MacCatalyst (14, 0)]
#if NET &!TVOS
	[Abstract]
#endif
	[Export ("accelerationStructureCommandEncoder")]
	IMTLAccelerationStructureCommandEncoder CreateAccelerationStructureCommandEncoder ();
```

Yet again, the naive approach has an issue with it. In this case, all
the extension methods that are generated for tvOS (something the
generator writes when methods are not abstract) will be decorated with
availability attributes for all the other platforms, which is incorrect
and will make developers life worse.

That leaves us with the following approach:

```csharp
#if NET
#if !TVOS
	[Mac (11, 0), iOS (14, 0), NoTV, MacCatalyst (14, 0)]
	[Abstract]
#else
	[NoMac, NoiOS, TV (16,0), NoMacCatalyst]
#endif
#else
	[Mac (11, 0), iOS (14, 0), TV (16,0), MacCatalyst (14, 0)]
#endif
	[Export ("accelerationStructureCommandEncoder")]
	IMTLAccelerationStructureCommandEncoder CreateAccelerationStructureCommandEncoder ();
```

With the above change, we do not add an abstract method in tvOS and we
only add the tvOS abailabity attribute to the extension methods, and use
NoiOS etc for all the other platforms.

The change had to be done to ALL methods that added tvOS support. The
good news are that our cecil tests and our introspection tests catch the
two naive approaces :)

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Haritha Mohan <harithamohan@microsoft.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-12-12 17:39:56 -05:00
Rolf Bjarne Kvinge a648b6951f
[CoreText] Fix a few nullability issues in CTFontDescriptor. (#19439) 2023-11-21 07:59:13 +01:00
Manuel de la Pena d9f5a2bfb5
[UIKit] Add support for Xcode 15. (#19120)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Haritha Mohan <harithamohan@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2023-10-25 12:41:17 -04:00
Manuel de la Pena f181a1d744
[MacCatalyst] Fix intro failures in catalyst on sonoma. (#19308) 2023-10-23 21:28:02 -04:00
TJ Lambert 6d30e583d3
[PassKit] Add support Xcode15 Beta 7 (#19139)
The bindings for PassKit Xcode15 Beta 7.

---------

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2023-10-23 13:05:19 -05:00
Manuel de la Pena 61f438656c
[MetalFX] Add the framework (which was added in Xcode 14) and add xcode 15 support. (#19107)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-10-23 10:40:02 -04:00
Manuel de la Pena 1cbca67c84
[Tests] Fix introspection tests on Sonoma. (#19256)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-10-19 09:52:24 -04:00
Haritha Mohan 9345934791
[PHASE] Add support for Xcode 15 (#19104)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-10-05 09:50:05 -07:00
Haritha Mohan ae6ef4af3e
[HealthKit] Add support for Xcode 15 beta 7 (#18927)
Looking into a intro failure on iOS: Selector not found for
HealthKit.HKHealthStore : workoutSessionMirroringStartHandler in
System.Action`1[HealthKit.HKWorkoutSession]
get_WorkoutSessionMirroringStartHandler() on HealthKit.HKHealthStore

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Alex Soto <alex@soto.dev>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-09-11 08:40:52 -07:00
Manuel de la Pena 4e4b8c4c5b
[CoreImage] Add support for Xcode 15 beta 7. (#18874)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-09-04 12:17:28 -04:00
Manuel de la Pena 712896357c
[AuthentationServices] Add support for xcode 15 beta 6. (#18787)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-09-03 11:42:59 -04:00
Rolf Bjarne Kvinge 6c06feea40
[src] Add back manual NewsstandKitLibrary constant for backwards compatibility. (#18841) 2023-08-30 19:27:13 +02:00
Manuel de la Pena 0e4afa6945
[CoreData] Add support for xcode 15 beta6. (#18837)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-08-30 09:42:43 -04:00
Manuel de la Pena 642889a11b
[Cinematic] Add support for Xcode 15 beta 6. (#18686)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2023-08-28 14:59:22 -04:00
Manuel de la Pena 6e4ca1a3c1
[CloudKit] Add support for Xcode 15 beta 6. (#18786)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2023-08-28 11:08:55 -04:00
Rolf Bjarne Kvinge 8bb54d360f [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-08-16 11:21:06 +02:00
Rolf Bjarne Kvinge ac90c511d1 [net8.0] Merge main into net8.0. 2023-08-14 15:36:54 +02:00
Rolf Bjarne Kvinge 24895406b2
[dotnet] Link Mono and Xamarin statically in Mac Catalyst by default. Fixes #14686. (#18619)
It's possible to create a provisioning profile for Mac Catalyst that
doesn't allow dylibs in the app. It seems a significant number of people run
into this problem when publishing their apps, so avoid it by linking Mono and
Xamarin statically by default instead.

The downside is that build time might increase a little bit.

An upside however is that the app size might decrease somewhat.

Fixes https://github.com/xamarin/xamarin-macios/issues/14686.
2023-08-11 15:08:27 +02:00
Manuel de la Pena b44ac6f8df [Introspection] Fix intro skip when the properties are internal.
The issue relies in the fact that this code path was not executed when
using classic because in the classic version of the SDK we added the
availavility attrs both in the property, the getters and the setters.
With dotnet, we only add the attr in the property.

The code uses the GetProperty method which does not return
internal/private properties which means that some of those properties
are not correctly skipped when on dotnet. This was discovered while
working on xcode 15.
2023-08-04 11:49:45 -04:00
GitHub Actions Autoformatter a11a5db97d Auto-format source code 2023-08-04 11:49:45 -04:00
Manuel de la Pena 6e7e6ddbc5 [Tests] Fix intro for xcode15 and older sim. 2023-08-04 11:49:45 -04:00
Alex Soto 576cebc081 [Introspection] Fix failing tests. 2023-08-04 11:47:29 -04:00
Manuel de la Pena b8b56bff76 [Introspection] Fix a number of failing tests. 2023-08-04 11:47:28 -04:00
Alex Soto 77744b0374 [introspection] Fix tests 2023-08-04 11:47:27 -04:00
Alex Soto 3cb99867d7 Bump to beta 3 2023-08-04 11:47:27 -04:00
Rolf Bjarne Kvinge 729c403704 [net8.0] Merge main into net8.0. 2023-08-04 14:28:12 +02:00
Manuel de la Pena e4ed7e18bf
[Introspection] Fix intro skip when the properties are internal. (#18613) 2023-08-02 07:46:45 -04:00
Rolf Bjarne Kvinge 6f1c0ea534 [net8.0] Merge main into net8.0. 2023-06-08 13:32:48 +02:00
Rolf Bjarne Kvinge b59587a0cd
[tests] Rework TestRuntime.RunAsync. (#18391)
* Move all the RunAsync logic to the TestRuntime class, instead of having some
  in TestRuntime and some in AppDelegate.
* Create a unified Task-based implementation for all platforms, optionally showing
  a UI on the platforms where we can do that.
* Remove all the overloads that took a DateTime timeout, and instead only use a
  TimeSpan timeout. This simplified some of the code.
* The new Task-based implementation will capture any exceptions (and rethrow most
  of them) from the tasks we're waiting for, so no need to do that in each RunAsync
  caller. This simplifies the testing code a lot for some tests.
* Add a new TryRunAsync method that will return (instead of rethrowing) any exceptions.
  This simplifies some of the testing code (which verifies the correct exception,
  or ignores the test in case of some exceptions).
* The new Task-based implementation will bubble up any NUnit exceptions, which
  means that the tasks we're waiting for can call NUnit's Assert and the right thing
  happens (in particular Assert.Ignore will actually ignore the test).
2023-06-06 21:36:49 +02:00