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

1644 Коммитов

Автор SHA1 Сообщение Дата
JonnHard d1d3dcdf68
Add getFileProviderConnectionWithCompletionHandler signature to start… (#18533)
… supporting XPC on File Provider instance

File Provider Service can act as an standalone XPC that you can
establish the connection with.
To open up the capability this new signature has to be exposed

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-07-20 10:39:08 -04:00
Rolf Bjarne Kvinge aab0ed1362
[AVFoundation] Fix a few issues with the AVAssetImageGenerator bindings. Partial fix for #18452. (#18460)
* The 'copyCGImageAtTime:actualTime:error:' selector is deprecated, so
replicate that.
* Bind the 'generateCGImageAsynchronouslyForTime:completionHandler:'
selector.

Fixes parts 1 and 2 of https://github.com/xamarin/xamarin-macios/issues/18452.
2023-06-19 19:16:29 +02:00
Rolf Bjarne Kvinge 12be89c189
[CoreFoundation] Add a few missing APIs to CFRunLoop and enable nullability. (#18322) 2023-05-30 08:50:42 +02:00
Rolf Bjarne Kvinge 00de70eb8f
[ServiceManagement] Bind this framework. Fixes #18084. (#18263)
Fixes https://github.com/xamarin/xamarin-macios/issues/18084.
2023-05-12 15:40:36 +02:00
Rolf Bjarne Kvinge d06209a917
[Foundation] Bind two overloads to create NSUrl instances from file paths. (#18265) 2023-05-12 07:37:36 +02:00
Rolf Bjarne Kvinge 415086c4ce
[Foundation] Fix nullability issues in NSUserDefaults. Fixes #18243. (#18246)
Fixes https://github.com/xamarin/xamarin-macios/issues/18243.
2023-05-09 17:39:34 +02:00
Rolf Bjarne Kvinge 36af029204
Change all null checking expressions to use 'is' and 'is not'. (#18176)
Change all null checking expressions to use 'is null' and 'is not null'
instead of '== null' and '!= null'.

This was mostly done with sed, so code can probably be improved in many
other ways with manual inspection, but that will come over time.

Also add code to the autoformat script to automatically fix these issues in the future.
2023-05-05 17:52:19 +02:00
Rolf Bjarne Kvinge a182ad5a1f
[AVFoundation] Add missing AVCapture members. Fixes #18155. (#18156)
Fixes https://github.com/xamarin/xamarin-macios/issues/18155.
2023-04-28 10:48:03 +02:00
Rolf Bjarne Kvinge c9cb8ca5e3
[AppKit] Add a few missing NullAllowed attributes. Fixes #18115. (#18118)
Fixes https://github.com/xamarin/xamarin-macios/issues/18115.
2023-04-25 07:44:38 +02:00
Rolf Bjarne Kvinge 03f0a35012
[CoreMidi] Create a blittable version of MidiCIDeviceIdentification. (#18052)
The original implementation for the MidiCIDeviceIdentification struct uses
public byte[] fields with a MarshalAs attribute to set the array size. This is
not blittable, but unfortunately these are _public_ fields, which means we
can't change them.

Instead introduce an internal intermediate struct, which is blittable, and
convert to and from this struct when marshalling to and from native code.

Then in XAMCORE_5_0 we can make the intermediate struct public and use it
instead of the non-blittable struct everywhere.
2023-04-17 07:49:31 +02:00
Alex Soto f793719e58 [xcode14.3] Update bidnings to Xcode 14.3 RC and fix tests 2023-03-29 14:37:51 -04:00
Alex Soto 658346262d Apply suggestions from code review
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-03-29 14:37:51 -04:00
Alex Soto 67ee103d30 [WebKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 014eb10674 [VideoSubscriberAccount] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 3936403fd3 [UIKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto cdf9be3038 [ThreadNetwork] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto db24230b67 [SensorKit] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto c0169509ba [PencilKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto dd8007b98a [PassKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 81034eb003 [NetworkExtension] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto c525187e3d [MediaAccessibility] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto d824a93b9a [JavaScriptCore] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto f21f9a63a5 [Intents] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 4eda3948ca [HomeKit] [ImageIO] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 542f8cd07e [HealthKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 6c36c1abe9 [GameKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 6a21f91f16 [Foundation] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 9f03095fd7 [FileProvider] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 6f9113f54f [CoreWLAN] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 283c2dc643 [CoreML] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 7bb36f88aa [CoreLocation] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 968c73eee8 [CoreFoundation] Cleanup xtro as nothing to be done here 2023-03-29 14:37:51 -04:00
Alex Soto c3daeaf510 [CarPlay] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 80dcea3188 [BackgroundAssets] Update bindings to Xcode 13.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 85b2e8c93d [AVRouting] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 8b6f1c64e4 [AppKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 3aad6f054d [authenticationservices] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 46eaabc17d [xcode14.3] Update bindings to Xcode 14.3 2023-03-29 14:37:51 -04:00
Haritha Mohan c814120173
[ImageCaptureCore] Add missing binding (#17424)
Deprecated "cameraDevice:didReceiveThumbnailForItem:" for macOS and
macCatalyst platforms and added updated binding for
"cameraDevice:didReceiveThumbnail:forItem:error:" method.

Refs:
[Deprecated
method](https://developer.apple.com/documentation/imagecapturecore/iccameradevicedelegate/1507941-cameradevice?changes=la_5&language=objc)
[Updated
method](https://developer.apple.com/documentation/imagecapturecore/iccameradevicedelegate/3142895-cameradevice?changes=la_5&language=objc)
2023-02-03 17:46:05 -08:00
Rolf Bjarne Kvinge 33bd311736
[xtro] Add ImageCaptureCore to the frameworks we process. (#17417)
Since we already have some ImageCaptureCore bindings.
2023-02-01 21:13:08 +01:00
Rolf Bjarne Kvinge 63abb2d419
[AVFoundation] Add a few missing APIs. Fixes #16954. (#17310)
Fixes https://github.com/xamarin/xamarin-macios/issues/16954.
2023-01-26 08:20:38 +01:00
Rolf Bjarne Kvinge 98819287cc
[runtime/generator] Add support for BindAs with CMVideoDimensions. (#17308)
This is required for some new iOS 16 APIs.
2023-01-25 15:34:28 +01:00
Rolf Bjarne Kvinge 40b98b650d
[CoreAnimation] Add missing CAMetalLayer properties. Fixes #17340. (#17345)
Also make CAEdrMetadata available on iOS and add a missing CAEdrMetadata
property.

Fixes https://github.com/xamarin/xamarin-macios/issues/17340.
2023-01-25 08:57:46 +01:00
dustin-wojciechowski 9c0bfd4e42 [src] Added manual binding to prevent issue of AVAudioPlayer FromData() and FromUrl() throwing exceptions. (#17073)
Provided manual binding of AVAudioPlayer::initWithContentsOfURL:error: and AVAudioPlayer::initWithData:error: to prevent an issue where AVAudioPlayer::FromData() and FromUrl() do not throw exceptions when returning null.

Fixes #16229

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-24 14:22:34 +01:00
Rolf Bjarne Kvinge 49d13fc0ef
[AppKit] Bind an NSWindow(IntPtr) constructor in the API definition. (#17264)
This simplifies our manual bindings a little bit.
2023-01-18 07:13:58 +01:00
Rolf Bjarne Kvinge 4ce35769cf
[xtro] Improve assembly resolution to not load incorrect assemblies. (#17177)
Add support to xtro-sharpie for where to look for referenced assemblies, and
adjust assembly resolution to only look in those directories.

This makes sure xtro-sharpie loads the expected references, and fixes a
problem where the (broken) assembly resolution wouldn't find a .NET assembly
because it doesn't exist in legacy Xamarin (where it would look by default).

Fixes this problem that showed up in a different PR (due to new .NET API
referencing the System.Runtime.Loader assembly, which doesn't exist in legacy
Xamarin):

    mono64 --debug bin/Debug/xtro-sharpie.exe --output-directory api-annotations-dotnet appletvos16.1-arm64.pch ../../_build/Microsoft.tvOS.Runtime.tvos-arm64/runtimes/tvos-arm64/lib/net7.0/Microsoft.tvOS.dll
    Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
      at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000ff] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:172
      at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:117
      at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0001d] in C:\src\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:33
      at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x0003a] in C:\src\cecil\Mono.Cecil\MetadataResolver.cs:110
      at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in C:\src\cecil\Mono.Cecil\ModuleDefinition.cs:748
      at Mono.Cecil.TypeReference.Resolve () [0x0000f] in C:\src\cecil\Mono.Cecil\TypeReference.cs:280
      at Extrospection.Helpers.GetName (Mono.Cecil.MethodDefinition self) [0x00051] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Helpers.cs:332
      at Extrospection.DesignatedInitializerCheck.VisitManagedMethod (Mono.Cecil.MethodDefinition method) [0x00001] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/DesignatedInitializerCheck.cs:43
      at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x0002b] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:104
      at Extrospection.AssemblyReader.Process () [0x0008e] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:93
      at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames, System.String outputDirectory) [0x001af] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:52
      at Extrospection.MainClass.Main (System.String[] arguments) [0x0008f] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Program.cs:28
    make: *** [.stamp-dotnet-classify-tvOS] Error 1

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-11 17:59:47 +01:00
Rolf Bjarne Kvinge 5e72799e28
[Foundation] Add missing fields in NSAttributedStringDocumentReadingOptionKey. (#17112) 2023-01-09 11:38:19 +01:00
Rolf Bjarne Kvinge 491c5c979c
[src/tests] Fix consistency between ObsoletedOSPlatform and UnsupportedOSPlatform attributes. (#17104)
* If there's both an UnsupportedOSPlatform and ObsoletedOSPlatform attribute with
  the same version, then remove the UnsupportedOSPlatform attribute. This is because
  in the past we used [UnsupportedOSPlatform] + [Obsolete] to indicate that an API
  is obsolete, but then the [ObsoletedOSPlatform] attribute was added, and we replaced
  the [Obsolete] attributes with [ObsoletedOSPlatform] attributes, which makes the
  [UnsupportedOSPlatform] attributes redundant/incorrect.
* If there's [UnsupportedOSPlatform] with a version or [ObsoletedOSPlatform] with
  a version, then also add [SupportedOSPlatform] in a few cases.
* If there's an [UnsupportedOSPlatform] with a version for API that's obsolete/non-working,
  then remove the version.
2022-12-22 12:40:04 +01:00
Alex Soto a7502b2b8d
[main] Bump bindings to Xcode 14.2 (#17037) 2022-12-21 08:39:03 +01:00
Rolf Bjarne Kvinge 41a4abe54b [xtro] Update. 2022-12-15 16:35:40 +01:00