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

1541 Коммитов

Автор 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
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 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 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 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 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 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 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 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 1850ef907c [monotouch-test] Update usage of X509 API obsoleted in .NET 9. 2024-09-25 19:02:38 +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
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 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
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 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 5f84f5fbdd
[HealthKit] Implement Xcode 16 RC changes. (#21225) 2024-09-18 17:40:45 +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 096eca541b
[MediaExtension] Implement this new framework. (#21176) 2024-09-12 19:53:51 +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 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 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 567b2a0a71
[xcode16] Misc fixes after running tests on macOS Sequoia. (#21193) 2024-09-11 20:56:55 +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 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 02fe91bcb2
[xcode16] Merge main into xcode16. (#21164) 2024-09-07 01:41:12 +02:00
Rolf Bjarne Kvinge 92cd45d064
[MediaAccessibility] Implement Xcode 16.0 beta 4 changes. (#21144) 2024-09-06 13:55:19 +02:00
Rolf Bjarne Kvinge ae99651b5c Merge remote-tracking branch 'origin/xcode16' into dev/rolf/bump-main-in-xcode16-2024-09-02 2024-09-06 11:34:35 +02:00
Rolf Bjarne Kvinge a6dca9db10 [monotouch-test] Adjust how we detect when protocols are registered. 2024-09-05 19:36:03 +02:00
Rolf Bjarne Kvinge 3f6da31049 [monotouch-test] Fix NativeAOT compilation + detecting when protocols are registered. 2024-09-05 14:19:03 +02:00
Rolf Bjarne Kvinge e2c0cb331a
[MapKit] Implement Xcode 16.0 beta 1-6 changes. (#20893)
Note: there were no changes in beta 2, beta 3, beta 4, beta 5 or beta 6.
2024-09-05 14:12:09 +02:00
Rolf Bjarne Kvinge afb561b9d6
[HealthKit] Implement Xcode 16.0 beta 1-6 changes. (#21146)
There were no changes in beta 2, beta 3, beta 4 or beta 6.
2024-09-05 14:06:24 +02:00
Rolf Bjarne Kvinge 7439accc6b
[Accessibility] Implement Xcode 16.0 beta 1-6 changes. (#21070)
Note: there were no changes in beta 3, beta 4, beta 5 or beta 6.
2024-09-05 09:41:48 +02:00
Rolf Bjarne Kvinge 7dd8f3ef7c
[CoreData] Implement Xcode 16.0 beta 1-6 changes. (#21113)
Note: there were no changes in beta 1, beta 2, beta 3, beta 5 or beta 6.
2024-09-05 09:40:50 +02:00
Rolf Bjarne Kvinge 3de8349a9d
[Security] Implement Xcode 16.0 beta 1-6 changes. (#21152)
Note: there were no changes in beta 2, beta 3, beta 4, beta 5 or beta 6.
2024-09-05 09:40:01 +02:00
Rolf Bjarne Kvinge a6a11784d4 [net9.0] Merge main into net9.0. 2024-09-04 15:24:51 +02:00
Rolf Bjarne Kvinge 73683f8124 [xcode16] Merge main into xcode16. 2024-09-02 19:51:07 +02:00
Rolf Bjarne Kvinge ff707c145e
[dotnet-linker] Trim away the static constructor for protocol interfaces if we're registering protocols in the static registrar. (#21012)
When we implemented support for using default interface members for binding protocols, we also unintentionally introduced a size regression. This happened because we now tell the linker to keep all methods in a protocol interface, thus all the corresponding types end up marked as well, etc.

This had an additional side effect: depending on the types that weren't linked away anymore, the App Store could flag an app, saying that additional entitlements is needed. This is what's happening in #21002: the App Store detects that the app references the `application:didRegisterForRemoteNotificationsWithDeviceToken:` selector [1] (from the method `RegisteredForRemoteNotifications` on `IUIApplicationDelegate`) and tells the developer they probably need the push notification entitlement.

The good news is that we don't need these protocol interface methods at runtime if the optimization to register protocols with the static registrar is enabled (which it is by default).

In this PR I teach the optimizer to remove the DynamicDependency attributes keeping these protocol interface methods from being trimmed out.

## Size improvements

* monotouch-test build for Release/ios-arm64 shrinks by [2.9mb (-2.6%)](https://gist.github.com/rolfbjarne/5e8ca6ea6854dc4a46f8e838dff11e6b)
* A very simple app (tests/dotnet/MySimpleApp) shrinks by [176kb (-0.3%)](https://gist.github.com/rolfbjarne/f0e062900528eb499fd96d124d18376f)

[1]: This is somewhat speculative, but it's probably not far from what the App Store actually does.

Fixes #21002.
2024-09-02 15:02:10 +02:00
Rolf Bjarne Kvinge a26a7fd231 [xcode16] Merge main into xcode16. 2024-08-31 02:49:11 +02:00
Rolf Bjarne Kvinge 73c035a818
[CoreVideo] Create a strongly typed dictionary for the CVPixelFormat values. (#21110)
Also a few other misc API improvements.
2024-08-30 21:01:28 +02:00
Rolf Bjarne Kvinge 56de4fa92e
[ObjCRuntime/bgen] Add support for (s)byte, (u)short and nuint fields. (#21141) 2024-08-29 20:14:52 +02:00
Rolf Bjarne Kvinge 84bcea0a40
[AudioToolbox] Implement Xcode 16.0 beta 1-6 changes. (#20856)
Note: there were no changes in beta 2, beta 3, beta 4, beta 5 or beta 6.
2024-08-27 13:58:15 +02:00
Rolf Bjarne Kvinge 0aed4d8aaf
[Network] Implement Xcode 16.0 beta 1-6 changes. (#21075)
Note: there were no changes in beta 2, beta 3, beta 4, beta 5 or beta 6.
2024-08-26 22:36:50 +02:00
Rolf Bjarne Kvinge 762e628bd8
[CoreGraphics] Implement Xcode 16.0 beta 1-6 changes. (#21033)
Note: there were no changes in beta 3, beta 5 or beta 6.
2024-08-26 19:56:23 +02:00