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

748 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 78229568e7
[autoformat] Add introspection. (#16593) 2022-11-07 15:20:26 +01:00
Rolf Bjarne Kvinge c708c71c3b Merge remote-tracking branch 'origin/xcode14.1' into bump-xcode14.1-in-net7.0-xcode14.1-2022-10-24 2022-10-28 09:50:14 +02:00
Manuel de la Pena e315f09ea8
[MacOS] Fix all the issues we found running the tests on Ventura. (#16488) 2022-10-27 20:42:35 -04:00
Alex Soto ac3ef8c348
[xcode14.1][HomeKit] Brings back HMAccessorySetupManager (#16439)
Fixes xamarin/xamarin-macios#16415

HMAccessorySetupManager was removed by mistake when we had to remove
matter related objects due to submission tests.

We have kept the Matter APIs removed and just enabled
PerformAccessorySetup Submission tests are happy using Xcode 14.1 RC1
https://gist.github.com/dalexsoto/243b0da224c613e9afc9706c54f882a1
2022-10-25 15:31:44 -04:00
Rolf Bjarne Kvinge 24f1fc18ed Merge remote-tracking branch 'origin/xcode14.1' into net7.0-xcode14.1 2022-10-20 19:30:22 +02:00
Rolf Bjarne Kvinge a15b2e0fe0
Bump min watchOS simulator version. (#16317) 2022-10-17 17:57:47 +02:00
Israel Soto 48293a4b05
[HomeKit] Added support to Xcode 14.1 b1-b3 (#16069)
* Matter properties are still missing

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-13 11:35:09 -04:00
Israel Soto bac36c5040
[VideoToolbox] Added support for Xcode 14 b1-3 (#15845)
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-13 11:27:15 -04:00
Israel Soto 17f0ffd332
[SharedWithYouCore] Added support for Xcode 14.1 b3 (#16198)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-12 12:09:00 -04:00
Chris Hamons 83ed66e7d6
[generator] Use new ObsoletedOSPlatformAttribute for generated code (#15941)
- Part of https://github.com/xamarin/xamarin-macios/issues/15849
- A bit of dead code was removed while I was reviewing things.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-10-06 11:15:51 -05:00
Alex Soto 27e6958b0a
[xcode14.1] Bump to Xcode 14.1 Beta 3 (#16010)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-03 17:24:41 +02:00
Chris Hamons 8a07db61bb
[main] Fix selectors from submission tests (#16042)
These selectors failed the most recent submission test:

```
UIFocusDebugger
  checkFocusGroupTreeForEnvironment:

HMMatterRequestHandler
  configureAccessoryWithName:room:completion:
  fetchRoomsInHome:completion:
  pairAccessoryInHome:onboardingPayload:completion:
HMMatterTopology
  initWithHomes:
HMMatterHome/HMMatterRoom
  initWithUUID:name:
HMAccessorySetupManager
  performMatterEcosystemAccessorySetupUsingRequest:topology:completionHandler:

ChipDeviceController
  pairDevice:address:port:discriminator:setupPINCode:error:
  setListenPort:
  sharedController
ChipLowPower
  sleep:
ChipTestCluster
  test:
  toggle:
ChipGeneralCommissioning
  commissioningComplete:
```

Passed API diff locally.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-09-27 08:42:53 +02:00
Chris Hamons 865e481498
[xcode14.1] Fix selectors from submission tests (#16047)
Manual backport of https://github.com/xamarin/xamarin-macios/pull/16042 to xcode14.1

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-09-26 11:14:37 +02:00
Rolf Bjarne Kvinge b230ef3601 Merge remote-tracking branch 'origin/main' into bump-main-in-xcode14.1-2022-09-16 2022-09-19 14:11:45 +02:00
Rolf Bjarne Kvinge 4643e42b7d
[tests] Introspection does not use simlauncher64-sgen.framework in .NET. (#15966) 2022-09-16 18:37:34 +02:00
Manuel de la Pena ae42d556fe
[ShareWithYou] Add support for Xcode 14 beta 6. (#15819)
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2022-09-02 10:46:52 -04:00
TJ Lambert 7bd98383e1
[HealthKit] Update bindings for Xcode 14 beta 1-4 (#15612)
This one has been a toughy 😮‍💨
@mandel-macaque I am creating the draft PR and here is a gist with the MacModern failures that you mentioned you would take a closer look at: https://gist.github.com/tj-devel709/24f5c63d4b698a0e2387524a0d2666c6

There were also monotouch-test failures that seem to be related to enabling mac that I could use some help with as well.

Lastly, @chamons there was a failing Cecil test regarding ios in DidGenerateEvent method found here: https://gist.github.com/tj-devel709/2c8aee7325c0c2751e29269d3eb77fef. I did not touch this method so I am not sure why this would be a problem.
Here is the Cecil failure: https://gist.github.com/tj-devel709/cfb2576c75de2ee100a8f2b7ee6e3923

Thanks for the help!

Edit *: Issues mentioned in the code comments
https://github.com/xamarin/maccore/issues/2609
https://github.com/xamarin/maccore/issues/2610

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-09-01 10:24:35 -05:00
Chris Hamons 532ad02c6b
[AppKit] Xcode 14 Beta 1-5 (#15778)
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-08-31 15:08:57 -05:00
Manuel de la Pena 8cecb962a4
[UIKit] Add support for Xcode 14 up to beta 5. (#15694)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-08-26 20:14:11 -04:00
Manuel de la Pena e95ae331e3
[Mediaplayer] Add support for xcode14 beta 4. (#15654)
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-08-26 10:38:21 -04:00
Manuel de la Pena 52cb5066f4
[VideoSubscriberAccount] Update API to support Xcode 14 beta 5. (#15699)
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-08-25 09:59:38 -04:00
TJ Lambert b6ece9e175
[PassKit] Update bindings for Xcode 14 beta 1-5 (#15613)
* Starting Xcode14 changes for PassKit Beta 123

* use protocol correctly, ignore conformance

* make suggested changes

* add the abstract to the ignore files

* removing disabledefaultctor

* remove empty todo files

* use manual file for same type constructors and beta changes

* adjust apiselector test

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-08-12 15:17:55 -05:00
Manuel de la Pena 3962f6cb34
[SharedWithYouCore] Add new framework for xcode14. (#15634) 2022-08-08 19:41:32 -04:00
Manuel de la Pena d02dd49235
[PushToTalk] Add new framework for Xcode 14 bet4. (#15645)
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-08-07 14:07:21 -04:00
Manuel de la Pena 7749b91153
[DeviceCheck] Add support for Xcode 14 beta 4. (#15639) 2022-08-05 11:51:11 -04:00
Chris Hamons 3c359f5838
[foundation] Xcode 13 & Xcode 14 beta 1-3 bindings (#15579)
- Xcode 13 section Based upon https://github.com/xamarin/xamarin-macios/pull/13328- 
- Some disabled due to https://github.com/xamarin/maccore/issues/2608
2022-08-01 10:22:39 -05:00
Chris Hamons 4276c90260
[xcode14] Bump to beta 4 (#15584)
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-07-29 12:34:27 -05:00
Chris Hamons ca8e5cb068
[tests] Fix MonoNativeFunctionWrapper/MonoPInvokeCallback to report specific errors (#15572)
- Both tests directly asserted there were no errors, and tried to print results from an unused 'failed_api' variable.
- However, details were being written via `ReportError` in the base class's 'error_output' that was not being printed
- AssertIfErrors on the base class prints that, and asserts that there are no errors so it works for both these cases

I checked the other tests that asserted against 0 errors, and they all seems to have valid test data to report, and thus appear fine.
2022-07-26 09:56:55 -05:00
Manuel de la Pena c5bd8bd4b1
[ClockKit] Add support for Xcode 14 beta 1 & 2. (#15417)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-07-15 11:24:07 -04:00
Rolf Bjarne Kvinge 330ddae9ba [introspection] A few fixes for watchOS. 2022-06-29 13:30:53 +02:00
Manuel de la Pena 754bfe53a5 Fix all intro issues + xtro. 2022-06-28 13:06:26 -04:00
Manuel de la Pena 9bb446eda8 Fix most but not all intro. 2022-06-27 10:01:29 -04:00
Rolf Bjarne Kvinge a358b493fd Merge remote-tracking branch 'origin/xcode14' into HEAD 2022-06-21 16:12:26 +02:00
Rolf Bjarne Kvinge d5e8656b53
[introspection] Fix protocol checks on iOS and tvOS 12.4. (#15265) 2022-06-15 12:18:04 +02:00
Rolf Bjarne Kvinge be6b818ecf Merge remote-tracking branch 'origin/xcode14' into xcode14-initial-pr 2022-06-13 10:17:06 +02:00
Rolf Bjarne Kvinge 0fa87fef48
[introspection] Fix according to macOS 12.4. Fixes #15229. (#15230)
* Ignore anything Chip-related, the framework was removed from macOS.
* Fix reporting errors some protocol-related errors so that they're actually
  reported as errors (by calling 'ReportError' instead of just adding the
  errors to a list that doesn't affect anything else).
* Ignore the NSUserActivityRestoring protocol, according to the macOS headers
  it's attached to NSResponder using a category, which is invisible at
  runtime. Due to the previous point this didn't show up before, but once at
  least another error (which happened with the Chip framework), then this was
  listed as well.
* Add ignores for a couple of protocols.

Fixes https://github.com/xamarin/xamarin-macios/issues/15229.
2022-06-13 09:55:24 +02:00
Rolf Bjarne Kvinge 89eb1bbd9d [introspection] Skip checking IOSurface ctor in Xcode 14, it crashes. 2022-06-08 18:42:08 +02:00
Rolf Bjarne Kvinge 30e03ffbe4
[tests] We're not implementing Mac Catalyst for legacy Xamarin.iOS. (#15181)
So there's no need to ignore tests for that particular scenario.
2022-06-03 10:40:52 +02:00
Frank A. Krueger bd4fee0cdc
Add MetalPerformanceShadersGraph Bindings (#14303)
I'm very pleased to present full bindings to the MetalPerformanceShadersGraph framework!

I'm happy with how everything turned out with the exception of a few notes and questions below.

I re-implemented Apple's MNIST sample (from https://developer.apple.com/documentation/metalperformanceshadersgraph/training_a_neural_network_using_mps_graph) here:

https://gist.github.com/praeclarum/b8077771fb341a1f9c28240113e00425

It's also added as a unit test.

Fixes #14286

### Notes

* Although the API says it works on macOS 11, it has bugs and crashes with errors even with Apple’s Swift examples. It’s better on macOS 12. iOS 14 and on is fine.

* `MPSGraphSparseStorageType` has terrible names. They match Apple's but I wish they were better.

* I added convenience methods to `MPSNDArray` and `MPSGrapTensorData` and the `Variable` and `Constant` operations to decrease the amount of unsafe code users have to write. I currently do this for 32-bit floats, the most common data type.

Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-05-10 10:52:22 +02:00
Chris Hamons 7d3fd33b2a
[introspection] Fix failures on older iOS/tvOS (#14911)
- Fixes https://github.com/xamarin/xamarin-macios/issues/14905 by skipping with a link to https://github.com/xamarin/xamarin-macios/issues/14802
2022-05-06 08:51:55 +02:00
Chris Hamons 1dcefc9c56
[NET Attribute Conversion][generator] Generate NET style attributes (#14779)
This PR teaches our code generator to generate .NET 6 style availability attributes, adds a 4th Cecil test to verify our generated attributes, and a metric ton of API changes to satisfy that test.

The generator work is the core of this PR, and includes:

- Hacking out chunks of generator.cs that "helpfully" remove duplicate attributes, which are no longer duplicate in the new order that NET6 attributes force upon us. See changes in FilterMinimumVersion and PrintPlatformAttributes
- Prevent a crash when the generator processes availability attributes with no version included (example: introduced on iOS but no version). See Is64BitiOSOnly.
- The meat, GetPlatformAttributesToPrint, which synthesizes many attributes "out of thing air" from:
        - The parent context
        - Implied introduced just because the class exists on a given framework at all
        - Implied Catalyst because iOS exists
- A few cludgy hacks PrintPlatformAttributesNoDuplicates and GenerateProperty because the existing PrintPlatformAttributes did not pass down parent context down, and the refactor was dangerous/too time consuming given time pressure.

There are two intended API changes introduced by the reviews in this PR:

- GetCurrentInputDevice was obviously intended by availability attributes to exist on Catalyst but due to define confusion was excluded. It is an addition in Microsoft.MacCatalyst.dll only.
- The NEAppRule constructors were mis-marked on platforms, and were showing up incorrectly on Mac/Catalyst. I corrected the Catalyst one unconditionally, as we have not shipped Catalyst yet, but Mac is only fixed in NET6.

There is a lot of follow up work in https://github.com/xamarin/xamarin-macios/issues/14802 to do to remove a number of hard coded test failures, but this should be almost all of the remaining work in NET6 attributes.

🤞 this doesn't break too much for future us.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-05-02 09:44:25 -05:00
Chris Hamons cf77b790cb
[NET Attribute Conversion] Add missing attributes in code-behind by re-running conversion (#14660)
* [NET Attribute Conversion] Chip Framework
* [NET Attribute Conversion] Rerun with many fixes
* Fix generator crash when compiling attributes with no introduced version
* Test changes for availability re-run. One new test
2022-04-07 10:46:15 -05:00
Rolf Bjarne Kvinge a46afd0147
[tests] Use 'BundledNETCoreAppTargetFrameworkVersion' to specify the .NET version in the project files. (#14666)
This way we don't have to update all these files when moving to .NET 7.
2022-04-06 20:58:20 +02:00
Alex Soto 132d5694d6
[ScreenCaptureKit] Add ScreenCaptureKit bindings up to Xcode 13.3 (#14644)
* [ScreenCaptureKit] Add ScreenCaptureKit bindings up to Xcode 13.3

* Use more appropriate exceptions.

* Remove ScreenCaptureKit from Mac Catalyst.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-04-05 20:16:31 -04:00
Alex Soto cf9f4aa446 [HomeKit] Update bindings up to Xcode 13.3 Beta 3 2022-03-14 22:54:34 -04:00
Alex Soto 0b0ad6f904 [tests] Fix introspection tests for Xcode 13.3 2022-03-14 22:54:33 -04:00
Rolf Bjarne Kvinge 03f8ec502f
[introspection] Fix ApiCMAttachmentTest on macOS / Mac Catalyst. (#14266)
Fixes:

    Introspection.ApiCMAttachmentTest
        [FAIL] CheckFailAttachments : System.InvalidOperationException : Could not create the new instance for type CGEvent.
            at Introspection.ApiCMAttachmentTest.GetINativeInstance(Type t) in xamarin-macios/tests/introspection/ApiCMAttachmentTest.cs:line 498
            at Introspection.ApiCMAttachmentTest.CheckFailAttachments() in xamarin-macios/tests/introspection/ApiCMAttachmentTest.cs:line 572
            at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
2022-02-28 22:35:42 +01:00
Rolf Bjarne Kvinge bd97933b60
[runtime] Remove ObjCRuntime.nfloat in favor of System.Runtime.InteropServices.NFloat. (#14197)
* Remove ObjCRuntime.nfloat (in favor of   System.Runtime.InteropServices.NFloat).
* Automatically add a reference to the System.Runtime.InteropServices.Internal
  package, so that developers get the new NFloat API (with operators) we've
  added post .NET 6 (but don't do this for .NET 7).
* Automatically add a global using alias for
  System.Runtime.InteropServices.NFloat -> nfloat. This is not behind the
  usual `ImplicitUsings` condition our other implicit usings are, because
  they're off by default for existing projects, and the main target for the
  global using alias for nfloat is upgraded projects.
* Automatically generate a global using alias (like above) in the generator
  for all code the generator compiles.
* Update xtro entries to reference System.Runtime.InteropServices.NFloat
  instead of ObjCRuntime.nfloat.
* Add a workaround for a hopefully temporary issue with .NET/CoreCLR where the
  wrong runtime pack is selected otherwise (without the new NFloat API, so
  nothing works at runtime).

Ref: https://github.com/xamarin/xamarin-macios/issues/13087
2022-02-24 16:51:12 +01:00
Rolf Bjarne Kvinge a021ecae72
[test] Add help makefile targets to run .NET tests on remote machines. (#14144) 2022-02-16 07:57:09 +01:00
Rolf Bjarne Kvinge 3eb50804a3
[src/introspection] Adjust tests and availability attributes to work run on iOS/tvOS 12.4. Fixes #13957. (#14133)
Fixes https://github.com/xamarin/xamarin-macios/issues/13957.
2022-02-15 08:20:16 +01:00