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

412 Коммитов

Автор SHA1 Сообщение Дата
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 a123e460f5
[watchOS] Remove the build logic for watchOS. (#21440) 2024-10-16 12:30:13 +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 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 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 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 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 f657ca9fca
[AppKit] Implement NSToolbarItemVisibilityPriority. Fixes #21298. (#21304)
Fixes https://github.com/xamarin/xamarin-macios/issues/21298.
2024-10-01 00:23:38 +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
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 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 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 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 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 ea8310c33a
[Intents] Fix a few missing APIs for Xcode 16 beta 1-6. (#21138) 2024-09-06 14:58:04 +02:00
Rolf Bjarne Kvinge 9efe6948a0
[AuthenticationServices] Implement Xcode 16.0 beta 1-6 changes. (#21143) 2024-09-06 12:08:17 +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 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 22d6e44411
[CoreSpotlight] Implement Xcode 16.0 beta 1-6 changes. (#20866)
Note: there were no changes in beta 2-6.
2024-09-05 13:58:28 +02:00
Rolf Bjarne Kvinge c206728177 Merge remote-tracking branch 'origin/main' into dev/rolf/bump-main-in-xcode16-2024-09-02 2024-09-05 12:24:17 +02:00
Rolf Bjarne Kvinge 9edb31477d
[MetalPerforanceShadersGraph] Implement Xcode 16.0 beta 1-6 changes. (#21154)
Note: there were no changes in beta 2, beta 3, beta 5 or beta 6.
2024-09-05 12:06:09 +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 f0d4a30a64
[Vision] Implement Xcode 16.0 beta 1-6 changes. (#21149)
Note: there were no changes in beta 2, beta 3 or beta 6.
2024-09-05 09:39:03 +02:00
Rolf Bjarne Kvinge 1f5e485c80
[StoreKit] Implement Xcode 16.0 beta 1-6 changes. (#21165)
No changes in beta 2, beta 3, beta 4, beta 5 or beta 6.

This is basically a giant deprecation in favor of StoreKit 2 (which is
Swift only).
2024-09-04 23:28:59 +02:00
Rolf Bjarne Kvinge b2a5fd4199
[Network] Fix binding mistake in NWConnection. (#21174)
The 'nw_connection_set_viability_changed_handler' P/Invoke was originally
bound as 'SetBooleanChangeHandler', which isn't quite right.

So now bind it as 'SetViabilityChangeHandler', obsolete the old version and
remove it in XAMCORE_5_0.
2024-09-04 23:14:07 +02:00
Rolf Bjarne Kvinge 47bd4d9f82
[PencilKit] Implement Xcode 16.0 beta 1-6 changes. (#21148)
Note: there were no changes in beta 4, beta 5 or beta 6.
2024-09-04 16:50:34 +02:00
Rolf Bjarne Kvinge 16207e9898
[CarPlay] Implement Xcode 16.0 beta 1-6 changes. (#21039)
Note: there were no changes in beta 2, beta 3, beta 4, beta 5 or beta 6.
2024-09-04 16:48:08 +02:00