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

12487 Коммитов

Автор SHA1 Сообщение Дата
TJ Lambert a0ad207ea7
[Dotnet] Automatically Allow Assets of all types and Test (#13346) 2022-01-10 08:32:05 -06:00
dotnet-maestro[bot] 06e563dda5
[main] Update dependencies from dotnet/installer (#13647)
* Update dependencies from https://github.com/dotnet/installer build 20220104.7

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.200-preview.22053.5 -> To Version 6.0.200-preview.22054.7

* Update dependencies from https://github.com/dotnet/installer build 20220105.18

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.200-preview.22053.5 -> To Version 6.0.200-preview.22055.18

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2022-01-10 13:15:42 +01:00
James Parsons 321ceb62a4
Remove xamarin iOS designtime targets import (#13659)
These files are no longer used by the XamarinVS extension and the import is therefore unnecessary.
2022-01-10 13:03:33 +01:00
Rolf Bjarne Kvinge e06151c903
[VideoToolbox] Add a VTCompressionSession.EncodeFrame overload that takes a CVImageBuffer instead of a handle to one. (#13631)
This makes the API nicer to use.
2022-01-10 13:00:34 +01:00
Chris Hamons 260730d488
Prepare for NET6 attribute conversion with hand fixes (#13658)
- The tool I wrote to convert attributes [mellite](https://github.com/chamons/mellite) does single pass through each file
- This means files that define Foo and !Foo, each with availability attributes inside can not be proccessed
- These 2 locations were easy to fix by moving defines inside binding definations, so I did that
- About 10 other locations were not so easy, so those will be worked around by hand in the conversion process.

Part of https://github.com/xamarin/xamarin-macios/issues/10170
2022-01-07 13:57:20 -06:00
Manuel de la Pena b52af4b4f9
[CI] Fix mac tests yaml error (#13653) 2022-01-06 16:25:28 -05:00
Mauro Agnoletti 165924f83a
Ensure we remotely copy all project pdbs and not only the main app one (#13650) 2022-01-06 08:00:15 -05:00
Alex Soto 6515cfcfbf [dotnet] Bump to preview 13. 2022-01-05 14:29:12 -05:00
dotnet-maestro[bot] e49c11f99e
[main] Update dependencies from dotnet/installer (#13636)
* Update dependencies from https://github.com/dotnet/installer build 20211223.6

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.200-preview.21617.4 -> To Version 6.0.200-preview.21623.6

* Update dependencies from https://github.com/dotnet/installer build 20220103.5

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.200-preview.21617.4 -> To Version 6.0.200-preview.22053.5

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-01-04 22:04:11 -05:00
TJ Lambert 226cc169d2
[Metal] Exposing Selectors in iOS. Fixes #12648 (#13644) 2022-01-04 16:42:52 -06:00
dotnet-maestro[bot] 53f69259cb
Update dependencies from https://github.com/dotnet/runtime build 20211222.4 (#13633)
Microsoft.NETCore.App.Ref
 From Version 6.0.1-mauipre.1.21616.2 -> To Version 6.0.2-mauipre.1.21622.4

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-01-04 16:26:50 -05:00
github-actions[bot] ec3fc498fb
[Localization] Pulling New Localization Translations 1627849748 (#13639) 2022-01-04 08:37:41 -06:00
Mauro Agnoletti 9e4eaf1f1c
[hotrestart] Fixed MSBuild outputs when using $(AppBundleManifest) (#13629)
We only want the file name of the app manifest path to define the outputs because the app manifest will be always located at the app bundle root level.
For MAUI, the app manifest source file could be located on a sub-folder (like \Platforms\iOS\Info.plist) so if we take the full value of the property we will end up looking the manifest in the wrong place inside the app bundle, causing the inputs/outputs checks to fail and forcing many tasks to always run (like code sign), also causing unwanted behaviors like breaking incremental builds and incremental deployments

Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-01-04 07:10:40 -05:00
Alex Soto dfe6c2b5ab
[main] Add Xcode 13.2 Support (#13643)
* [Xcode13.2] Bump to Xcode 13.2 RC (#13497)

* [Xcode13.2] Bump to Xcode 13.2 Beta 2

Breaking changes addressed for legacy
* HomeKit
* CallKit
* CoreLocation

* [xcode13.2] Bump to Xcode 13.2 RC and apply feedback

* [AppKit] Fix missing Notifications

* Fix xtro

* [xcode13.2] Bump versions and use stable Xcode 13.2

* [monotouch-tests] Make TestAddingByComponents work on the last day of the year

Happy New Year!!

* NO BOM PLZ!
2022-01-03 09:28:00 -05:00
Rolf Bjarne Kvinge 3fe85ef24c
[msbuild] Make sure to update global.json/NuGet.config for the Xamarin.HotRestart.PreBuilt build whenever needed. (#13625)
This fixes an issue where rebuilding in an already build working copy after a
.NET bump would fail.
2021-12-22 21:54:18 +01:00
Rolf Bjarne Kvinge 5a45a3c3aa
[src] Remove the ModelAttribute.AutoGeneratedName property in .NET. (#13619)
AutoGeneratedName was a toggle to implement a certain (correct) behavior,
while at the same time not cause breaking changes.

Now that we can do breaking changes in .NET, we can remove the toggle (i.e.
the property), and just always do the right thing (that is: automatically
generate a _unique_ Objective-C name for Model classes, unless a name is
specified manually).

Ref: https://github.com/xamarin/xamarin-macios/issues/5107
2021-12-22 21:28:19 +01:00
Rolf Bjarne Kvinge 1b189a83c2
[VideoToolbox] Fix typo in parameter name to VTCompressionSession.EncodeFrame. (#13620) 2021-12-22 17:57:58 +01:00
Rolf Bjarne Kvinge 00d28dd859
[src] Fix dependencies for core-maccatalyst.dll. (#13627)
Fix a c&p error with the dependencies for core-maccatalyst.dll.

This fixes a random build error:

> error CS2001: Source file 'xamarin-macios/src/build/dotnet/Constants.maccatalyst.generated.cs' could not be found.
2021-12-22 17:57:43 +01:00
Rolf Bjarne Kvinge ad0a5202f5
[WebKit] Fix the return types for WebUIDelegate.UIGetDragDestinationActionMask and WebUIDelegate.UIDragSourceActionMask in .NET. (#13626)
Fixes in https://bugzilla.xamarin.com/show_bug.cgi?id=46316.
2021-12-22 17:55:50 +01:00
Rolf Bjarne Kvinge 156ddead7b
[AppKit] Fix NSWindow.WindowController's return type in .NET. (#13624)
NSWindow.WindowController's type is supposed to be 'NSWindowController', not
'NSObject'. Fix this in .NET, since it's a breaking change.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=40095.
2021-12-22 17:52:54 +01:00
dotnet-maestro[bot] aacfb87a5f
[main] Update dependencies from dotnet/installer (#13588)
* Update dependencies from https://github.com/dotnet/installer build 20211215.3

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.200-preview.21614.17 -> To Version 6.0.200-preview.21615.3

* Update dependencies from https://github.com/dotnet/installer build 20211216.3

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.200-preview.21614.17 -> To Version 6.0.200-preview.21616.3

* Update dependencies from https://github.com/dotnet/installer build 20211217.4

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.200-preview.21614.17 -> To Version 6.0.200-preview.21617.4

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-12-22 09:02:12 +01:00
Rolf Bjarne Kvinge b75b9f509a
[UIKit] Make UITextInputTraits members optional in .NET. Fixes #5831. (#13607)
Once upon a long time ago we decided to mark the properties in the
UITextInputTraits protocol as required in our API definition, because that way
we'd inline these properties in any class that implemented the
UITextInputTraits protocol, which made calling these properties much easier.

At a later point, we implemented better support for protocols, and now we
automatically generate extension methods for such properties (a corresponding
Get/Set method for the get/set property accessors), so we don't need these
inlined properties anymore.

However, removing them would be a breaking change, so we were stuck with these
redundant inlined properties, until .NET came along.

Ref: 0e80570863

Fixes https://github.com/xamarin/xamarin-macios/issues/5831.
2021-12-22 08:01:15 +01:00
Rolf Bjarne Kvinge c45d0ae55c
[generator] Fix the selector in extension methods for protocol properties with Bind attributes. Fixes #12727. (#13618)
Take into account any Bind attributes on optional property getters and setters
on protocols when generating the Get* and Set* extension methods, so that we
use the right selector.

Fixes https://github.com/xamarin/xamarin-macios/issues/12727.
2021-12-21 20:39:03 +01:00
VS MobileTools Engineering Service 2 a7eacd2eb5
Localized file check-in by OneLocBuild Task: Build definition ID 14411: Build ID 5561912 (#13604) 2021-12-21 10:48:59 -06:00
Rolf Bjarne Kvinge 5c4deb6ffe
[UIKit] Use the correct protocol hierarchy for UICollectionViewDelegate for .NET. (#13617)
The source code claims that having the different protocol hierarchy reduces
duplicate code, but I can't see what kind of code duplication this would
remove. The incorrect hierarchy causes all the UIScrollViewDelegate members to
not be inlined in UICollectionViewController, UICollectionViewDelegate and
UICollectionViewSource, effectively breaking API / source code, because this
might happen in UICollectionViewController subclasses now:

    MyUICollectionViewController.cs(105,24): error CS0115: 'MyUICollectionViewController.DraggingStarted(UIScrollView)': no suitable method found to override
    MyUICollectionViewController.cs(111,24): error CS0115: 'MyUICollectionViewController.DraggingEnded(UIScrollView, bool)': no suitable method found to override

This also debunks the claim from the comment in the api definition that
changing the protocol hierarchy would not be a breaking source change.

So go back to the correct protocol hierarchy for .NET, for all platforms.
2021-12-21 16:31:07 +01:00
Rolf Bjarne Kvinge f87016ca7d
[tests] Allow 502 Bad Gateway as well in the SecureTransportTest.Tls12 test. (#13610)
The "502 Bad Gateway" error occurs sometimes on the bots.

Maybe we should rename it "502 Bad Bot"?
2021-12-21 15:23:15 +01:00
Rolf Bjarne Kvinge 0ec6e13566
[Foundation] Make NSStream.[Get|Set]Property abstract in .NET. (#13599)
These methods must be overridden, otherwise the app might crash, so making
them abstract forces developers to do the right thing.

Ref: https://bugzilla.xamarin.com/show_bug.cgi?id=50891
2021-12-21 15:22:40 +01:00
Mauro Agnoletti d117b0a01e
Updated Xamarin.Messaging reference (#13615) 2021-12-21 09:24:42 +01:00
Rolf Bjarne Kvinge b695c8c837
[dotnet] Don't add FileNativeReferences to the main libraries to link with. Fixes #13503. (#13598)
Don't add FileNativeReferences to the main libraries to link with, because we
pass that list of main libraries to the LinkNativeCodeTask, and we're already
passing the FileNativeReferences for a different task parameter.

This means that we end up adding the file native reference twice to the linker
arguments, and that's wasteful. It can also cause problems if those linker
arguments aren't always computed in the same way (once as a relative path,
once as an absolute path for instance).

Fixes https://github.com/xamarin/xamarin-macios/issues/13503.
2021-12-21 08:13:53 +01:00
Rolf Bjarne Kvinge c71143277e
[NSMetadataItem] Enable nullability + a few other code updates. (#13595) 2021-12-21 08:13:21 +01:00
Rolf Bjarne Kvinge 1100703536
[AVFoundation] Address all the XAMCORE_4_0 notes in AVFoundation for .NET. (#13593) 2021-12-21 08:12:25 +01:00
Rolf Bjarne Kvinge 9940062336
[src] No need to add the legacy version of the generated constants to the Mac Catalyst build. (#13597)
We're only building for Mac Catalyst on .NET, and this generated file is
entirely surrounded in a "#if !NET" condition, so not generating/compiling it
won't make a difference.
2021-12-21 08:10:47 +01:00
Rolf Bjarne Kvinge 71c8187fdf
[Blocks] Constrain the generic type for GetTarget and GetDelegateForBlock to delegates in .NET (#13606)
This makes it clearer what kind of types the method can handle.

A delegate constraint requires a newer C# version, which is why we can't do it
for legacy Xamarin.
2021-12-21 08:10:13 +01:00
Rolf Bjarne Kvinge 86c1a2fcf2
[src] Remove Runtime.GetSurfacedObjects in .NET. (#13608)
This method exposes internal implementation details, and makes it difficult to
innovate in the runtime. Additionally it's purpose was always for diagnosis,
but I've never seen it used (not even for its intented purpose), so we can
just remove it for .NET.
2021-12-21 08:09:26 +01:00
Rolf Bjarne Kvinge 368cf1fbbb
[VTCompressionSession] Fix broken Create overloads for .NET. (#13589)
Once upon a time there was a single VTCompressionSession.Create method, which
was [driving users insane][1] - they had to manually call CFRetain to avoid
crashes! What an abomination!!

Insane users are clearly not happy users, and we wanted happy users, so time
and effort went into creating a solution: a new Create overload was devised
and [implemented][1], taking extreme care to not break our brave and insane
existing users who had to manually call CFRetain. Because the fix would break
existing users - the now extraneous CFRetain would mean that their apps would
leak memory. *A lot* of it! That's bad, so we decided to make sure that didn't
happen.

Of course, dear old Murhpy wanted a say, so the new Create overload didn't do
as intended. In fact, it had the same insane behavior the old Create overload
had! Ops.

But Murphy decided to have even more fun: the changes were so buggy, that they
in fact fixed the old Create overload! Which from now on wouldn't require the
horrendous manual CFRetain calls... and effectively introducing the leak the
fix was trying so hard to not introduce.

Oh dear Murphy.

Of course he had another trick up his sleeve: in our extreme efforts to help
our users, we added an Obsolete attribute that would tell people to use the
new Create overload.

Let that sink in for a moment: we had an Obsolete attribute on a function that
was (now) perfectly fine, telling users to use a function that was broken.

To get the correct behavior, users would now have to to remove their manual
CFRetain calls, and ignore the obsolete warning on the old (and correct)
Create overload which told users to use the new (and buggy) Create overload.

In other words: still insanity, just a slightly different flavor.

Murphy had a field day!

Time went by, and eventually a sane enough user [reported the insanity to
us][2]. Even better: the user actually provided a fix! Truly, we have some
amazing users.

Unfortunately, the user didn't have access to our code history, and thus was
obviously not able to see the whole picture, and the fix ended up being
incorrect.

Unrelated lesson learned: don't forget your history, otherwise you'll end up
repeating mistakes from the past.

So now came the problem: how to fix all the APIs? In a way that didn't make
our users' existing apps just suddenly start crashing or leaking?

There really was no way, so nothing really happened for quite a while.

Then, an opportunity presented itself: we'd be able to do [widespread breaking
changes][3].

So, hoping that Murphy stays away this sunny winter day, I'm changing both the
new and the old Create overloads to do the right thing. But only in .NET,
where we can do breaking changes! Or at least that's my intention. I've tried
to stave off our dear old friend by adding his arch enemy: unit tests. Which,
of course, Murphy couldn't stay away from, but it seems adding a few
Thread.Sleep calls makes him bored enough to stay away. Hopefully for good...

[1]: 66c50b9a17
[2]: https://github.com/xamarin/xamarin-macios/pull/2070
[3]: https://github.com/xamarin/xamarin-macios/issues/13087
2021-12-21 08:08:40 +01:00
Rolf Bjarne Kvinge 3e0f589cd6
Merge branch 'main' into avfoundation-xamcore40 2021-12-20 18:07:05 +01:00
Rolf Bjarne Kvinge e103cbc6f5
[xharness] Improve how we execute external processes in certain cases (#13596)
* Capture evaluation output, and write it all to the terminal when something
  goes wrong. This way we can see the entire output next to the failure (often
  there's a lot of stuff written to the terminal from different threads, and
  this way we get all that matters written together).
* Only evaluate one project at a time, to avoid overloading the machine.
* Only execute `git ls-files` once at a time, to avoid overloading the machine.
* Bump evaluation timeout to 5 minutes.
* Also increase the time for git to list files in a directory to 60 seconds.

Hopefully this will fix errors like this:

* `Unable to evaluate the property OutputPath, build failed with exit code 0. Timed out: True`
* `System.Exception: Failed to list the files in the directory /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test3403 (TimedOut: True ExitCode: 0)`
2021-12-20 18:05:55 +01:00
Filip Navara 23263f7f29
Remove duplicate code (#13600) 2021-12-20 14:01:17 +01:00
Rolf Bjarne Kvinge 07f19ed423
Fix grammar in documentation
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2021-12-20 08:26:08 +01:00
Rolf Bjarne Kvinge 9ee6af7d4d
Fix grammar in documentation
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2021-12-20 08:26:02 +01:00
dotnet-maestro[bot] 0bbafbfe08
Update dependencies from https://github.com/dotnet/runtime build 20211216.2 (#13601)
Microsoft.NETCore.App.Ref
 From Version 6.0.1-mauipre.1.21602.7 -> To Version 6.0.1-mauipre.1.21616.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2021-12-20 08:24:02 +01:00
Rolf Bjarne Kvinge 3dd3c52503
[.NET/AudioSession] Use [UnmanagedCallersOnly] instead of [MonoPInvokeCallback] for the managed callbacks called from native code. (#13567)
Ref: https://github.com/xamarin/xamarin-macios/issues/10470.
2021-12-17 22:35:18 +01:00
Rolf Bjarne Kvinge 09f349b8ce
[generator] Fix reporting BI1042. (#13587)
Fix reporting BI1042 to include the type + property that triggered the error +
add a test.
2021-12-17 21:47:24 +01:00
Rolf Bjarne Kvinge b071f969f9 [AVFoundation] Fix unintentional API break in AVCaptureVideoDataOutput.SetSampleBufferDelegate. 2021-12-17 16:33:07 +01:00
Rolf Bjarne Kvinge aee17ec7ad Update xtro. 2021-12-17 07:45:12 +01:00
Rolf Bjarne Kvinge b0bb76f796 [AVFoundation] Fix AVCapture[Audio|Video]DataOutput.SetSampleBufferDelegate naming in .NET.
There were two issues to fix with regards to the legacy signature:

* Use an IAVCaptureVideoDataOutputSampleBufferDelegate parameter instead of AVCaptureVideoDataOutputSampleBufferDelegate.
* Name 'SetSampleBufferDelegate' instead of 'SetSampleBufferDelegateQueue'.
2021-12-17 07:45:12 +01:00
Rolf Bjarne Kvinge d4f3565200 [AVFoundation] Use a more strongly typed property type for AVCapturePhotoOutput.SupportedFlashModes in .NET 2021-12-17 07:45:12 +01:00
Rolf Bjarne Kvinge dfd1a9cb15 [AVFoundation] Use a more strongly typed property type for AVCaptureVideoDataOutput.AvailableVideoCVPixelFormatType in .NET 2021-12-17 07:45:12 +01:00
Rolf Bjarne Kvinge eadff5bd8b [AVFoundation] Use a more strongly typed return type for AVAssetExportSession.SupportedFileTypes in .NET 2021-12-17 07:45:12 +01:00
Rolf Bjarne Kvinge 17f877957f [AVFoundation] Remove AVFragmentedMovieTrack.ATimeRangeDidChangeNotification in .NET
This API has a typo in its name, and the correct alternative is already implemented.
2021-12-17 07:45:12 +01:00