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

8371 Коммитов

Автор SHA1 Сообщение Дата
Alex Soto 01540ae5e0
[ImageIO] Update bindings up to Xcode 12.2 Beta 2 (#9793)
* [ImageIO] Update bindings up to Xcode 12.2 Beta 2

* Remove not needed case
2020-10-06 14:45:52 -04:00
Alex Soto 0ccb75f0d3
[FileProvide] Update bindings up to Xcode 12.2 Beta 2 (#9791) 2020-10-06 12:38:47 -04:00
Alex Soto 73778ebe60
[CoreImage] Update bindings up to Xcode 12.2 Beta 2 (#9790) 2020-10-06 09:52:19 -04:00
Alex Soto 60ea664788
[AppKit] Update bindings up to Xcode 12.2 Beta 2 (#9789) 2020-10-06 09:24:13 -04:00
Alex Soto 82215f8d94
[CarPlay] Update bindings to Xcode 12.2 Beta 2 (#9788) 2020-10-06 08:21:51 -04:00
Alex Soto 4511fd1757
Add ikvm-fork as a submodule instead of using the sources embedded in the mono archive. (#9776) (#9783)
There are two reasons for this:

* It grants us more independence from the mono archive for .NET 6.
* We need a bugfix in ikvm, but we can't necessarily bump mono.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-10-06 09:05:28 +02:00
monojenkins 89a36cf511
[xcode12.2] [tests][xtro] Check for missing/extra [Appearance]. Fix #7136 (#9785)
based on the header's `UI_APPEARANCE_SELECTOR` decorations

Fix https://github.com/xamarin/xamarin-macios/issues/7136
2020-10-05 21:58:59 -04:00
monojenkins 6018db4d39
[xcode12.2] [tests][xtro] Consider class (static) methods when checking for deprecation. Fix #9026 (#9781)
ref: https://github.com/xamarin/xamarin-macios/issues/9026
2020-10-05 16:00:51 -04:00
monojenkins 3b36acecba
[tests][cecil] Check that error-based enum values don't have availability attributes (#9780)
and fixes the ones that have some.

From https://github.com/xamarin/xamarin-macios/issues/9724

We do not _normally_ add availability attributes on enums **members** that represent error codes. In part because it's a lot of metadata and, foremost, because it's not really helpful to write code. E.g.

```csharp
var err = Call.Api (1);
switch (err) {
case NSError.Bad:
case NSError.Wrong:
   Console.WriteLine ($"API failed: {err});
   break;
case NSError.Ok:
   break;
default:
   Console.WriteLine ($"Unknown error code {err}");
   break;
}
```

Adding version checks inside this would be complicated (source wise) and not really helpful since
* API can return undefined error code (and the error logic should work);
* Availability information is not 100% accurate;

As such we default to not add them - but we some time forgot about it. An intro rule could easily ensure we don't add them needlessly.
2020-10-05 10:37:54 -04:00
Sebastien Pouliot 9e192d1eff
[xcode12.2][tests][xtro] Check for deprecated p/invokes (C API) (#9773)
We already had support for ObjC API but nothing reported missing
availability attributes for p/invokes, used in manual bindings

Backport of #9700 which adds fixes for missing [Deprecated] inside Xamarin.Mac.dll
2020-10-05 08:12:45 -04:00
Alex Soto 5deee9ea95
[xcode12.2] Initial bump to Xcode 12.2 Beta 2 (#9730)
* [xcode12.2] Initial bump to Xcode 12.2 Beta 2

* Add tvOS specific checks for exact Xcode check
2020-10-02 18:33:38 -04:00
Sebastien Pouliot 0093925e74
[xcode12.2][tests][cecil] Check for absence of `[NoX]` (Unavailable) in platform assemblies. Fix #4835 (#9771)
It's way too easy to forget that attributes like `[NoiOS]` means the code
is not generated (for bindings) on that platform but that they will be
compiled for _manual_ bindings (not run thru the generator).

This can expose types (and API) that are not usable on some platforms.
This new test checks that the `[No*]` and `[Unavailable]` attributes
are not in their respective platform assemblies.

For compatibility (existing mistakes) we ignore the check on API that
are decorated with `[Obsolete]` attributes.

Changes in the bindings are fix such mistakes - mostly adding the
`[Obsolete]` attribute.

Fix https://github.com/xamarin/xamarin-macios/issues/4835

backport of https://github.com/xamarin/xamarin-macios/pull/9686
2020-10-02 10:33:59 -04:00
Sebastien Pouliot 8f757df0bf
Merge pull request #9766 from spouliot/xcode12.2-intro-typo-relax
* [tests][intro] Split attributes typos from API typos tests (#9652)

The latter requires the spellchecker which varies by OS versions, so we
only run it on the latest OS version (and simulator, except macOS).

The former are some internal rules and can be run on every commit and
avoid finding issues late in a release cycle.

Also changed to
- process members even if a type is obsoleted
- process the properties and events on types

About the strings...

Some were fine, others were not. Copy/pasted strings are hard to
maintain. Moving them to constants will help, both maintainability and
will reduce the metadata size of the platform assemblies.

ref: https://github.com/xamarin/xamarin-macios/issues/9353

* [tests][intro] ConstantsCheck should only be executed on latest OS (#9751)

since the files, mapped by the constants, might not be present in earlier
versions of the OS. We can only be sure, of their presence, on the
current/supported SDK version

Fix intro running on iOS 10.3 (64 bits)

```
Introspection.iOSApiTypoTest
    [PASS] AttributeTypoTest
    [FAIL] ConstantsCheck :   NetworkLibrary
  Expected: True
  But was:  False
 :   at Introspection.ApiTypoTest.ConstantsCheck () [0x00168] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiTypoTest.cs:1088
```

* [mac][searchkit] Fix typo (missing '.')
2020-10-02 08:15:11 -04:00
Sebastien Pouliot 14a5d4a7f8 [mac][searchkit] Fix typo (missing '.') 2020-10-01 22:38:39 -04:00
Sebastien Pouliot 63e3744c70 [tests][intro] ConstantsCheck should only be executed on latest OS (#9751)
since the files, mapped by the constants, might not be present in earlier
versions of the OS. We can only be sure, of their presence, on the
current/supported SDK version

Fix intro running on iOS 10.3 (64 bits)

```
Introspection.iOSApiTypoTest
    [PASS] AttributeTypoTest
    [FAIL] ConstantsCheck :   NetworkLibrary
  Expected: True
  But was:  False
 :   at Introspection.ApiTypoTest.ConstantsCheck () [0x00168] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiTypoTest.cs:1088
```
2020-10-01 22:38:06 -04:00
Sebastien Pouliot 1e5801c930 [tests][intro] Split attributes typos from API typos tests (#9652)
The latter requires the spellchecker which varies by OS versions, so we
only run it on the latest OS version (and simulator, except macOS).

The former are some internal rules and can be run on every commit and
avoid finding issues late in a release cycle.

Also changed to
- process members even if a type is obsoleted
- process the properties and events on types

About the strings...

Some were fine, others were not. Copy/pasted strings are hard to
maintain. Moving them to constants will help, both maintainability and
will reduce the metadata size of the platform assemblies.

ref: https://github.com/xamarin/xamarin-macios/issues/9353
2020-10-01 22:37:54 -04:00
Manuel de la Pena e03215bbab
Merge pull request #9763 from mandel-macaque/xcode12.2-d16-7-merge
[Xcode12.2] Bring some changes preset in d16-7 that are missing in xcode12.2.
2020-10-01 19:03:20 -04:00
Sebastien Pouliot 9b792525d9
Bump API diff to the released (stable) xcode12 version of XI (#9761)
This will be a bit confusing (not directly usable from bots) to produce
a full API diff for Xamarin.Mac.
2020-10-01 17:31:57 -04:00
Manuel de la Pena de6107af94 Merge branch 'd16-7' into xcode12.2-d16-7-merge 2020-10-01 16:01:43 -04:00
Alex Soto 94dc5ebd5d
[CarPlay] Update bindings to Xcode 12.2 Beta 1 (#9719)
* [CarPlay] Update bindings to Xcode 12.2 Beta 1

CPEntity docs got removed https://developer.apple.com/documentation/carplay/cpentity
so it is very likely that Apple will keep this out from the API.

* Better obsolete and hide it from autocompletion

* Fix

* Ups I broke it again...

* Apply feedback
2020-10-01 15:22:45 -04:00
monojenkins 522eafdf1b
[xcode12.2] [d16-7] [Foundation] Avoid LINQ in bindings. Fixes #8773 (#9753)
LINQ was giving issues in a client application with the Link SDK
enabled. The root cause is that we had issues in the LINQ operations
that are used to create the headers for the native request.

We fix this by:

1. Do not modify the managed request headers. Do not modify an object we
   do not own.
2. Remove the use of LINQ

This issue was probelmatic when the client application was setting the
headers that are used by the HttpContent. If headers were not added in
the content, the issues did not happen.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2020-10-01 12:26:34 -04:00
Manuel de la Pena b2f2516818
[ExternalAccessory] Update framework for xcode 12.2 beta 1. (#9746) 2020-10-01 11:48:54 -04:00
Manuel de la Pena c72f27f939
[Viso] Clean xtro files. (#9747) 2020-10-01 00:35:04 -04:00
Alex Soto 6e8eed3e76
[AVFoundation] Update bindings to Xcode 12.2 Beta 1 (#9718)
* [AVFoundation] Update bindings to Xcode 12.2 Beta 1

* Remove availability from the enum
2020-09-29 11:04:53 -04:00
Manuel de la Pena 844178acd6
[Network] Partial bindings of Network for Xcode 12 beta 6. (#9623)
Bound part of the API and added tests to those method that could be correctly ran as part of the unit tests. Other methods should have to be tested via a sample app.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-09-28 18:22:42 -04:00
Manuel de la Pena 46f7cee230
[VSMac] Bump max version to current stable. (#9714) 2020-09-28 14:22:58 -04:00
monojenkins cd886039db
[xcode12.2] [jenkins] Don't try to run the packaged Xamarin.Mac tests if none were built. (#9690)
* [jenkins] State all the time where we're working on. (#8447)

It's annoying to have to track it down all the time when something goes wrong.

* [jenkins] Make it possible to skip running packaged Xamarin.Mac tests by setting the 'skip-packaged-xamarin-mac-tests' label. (#9170)

Diff is best viewed by ignoring whitespace.

* [jenkins] Don't try to run the packaged Xamarin.Mac tests if none were built.

* [jenkins] Add support for specifying custom labels using a file.

This is a partial backport of #8549.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-09-23 14:33:02 -04:00
Rolf Bjarne Kvinge 8bda9174fd
Bump to Xcode 12.2 beta 1. (#9665)
* Bump to Xcode 12.2 beta 1.

* [tests] Fix xtro and intro

* Fix wrong availability

* Fix monotouch tests

* Disable watchOS tests and bump iOS version to the right one

watchOS tests have been disabled because Xcode 12.2 Beta is
broken, you cannot create a watch app and deploy, Xcode just
crashes when you try to list simulators, If you try to use
our tools at the moment of deploying we get:

> error HE0046: Failed to install the app 'app' on the device 'watchOS 7.1 (18R5552f) - Apple Watch Series 6 - 44mm': Unable To Install ???app???

* Fix macOS check and bump both versions to satisfy commit distance check, luckily we have infinite numbers!!

Co-authored-by: Alex Soto <alex@alexsoto.me>
2020-09-23 08:11:26 -04:00
Manuel de la Pena 4028e53d98
[Cecil] Try to fix tests by stating the version in the console runner. (#9655)
Try to fix the issue by stating the version of the runner. This change
will not be needed when we merge with main.

fixes https://github.com/xamarin/maccore/issues/2315
2020-09-17 09:03:20 -04:00
Rolf Bjarne Kvinge 2071a13aa4
[mtouch] Refactor how we detect and avoid broken frameworks when building for the simulator. (#9647)
* Use the existing information we have in the Frameworks class to determine
  whether a particular framework works in the simulator or not.
* Show a warning (MX5223) when we run into such a framework, but only if
  the linker is enabled (otherwise we'll often get warnings for API the developer
  doesn't use).
2020-09-17 13:31:29 +02:00
Manuel de la Pena 3e3111d44b
[Metal] Add missing GC.KeeAlive. (#9653)
Do it after the review comments on https://github.com/xamarin/xamarin-macios/pull/9651
2020-09-16 17:37:29 -04:00
Rolf Bjarne Kvinge 7ec3751a10
Bump Xamarin.iOS to 14.0. (#9646)
* Bump Xamarin.iOS to 14.0.

* Don't verify that the commit distances for Xamarin.iOS and Xamarin.Mac match unless we're building both of them.
2020-09-16 11:02:44 -04:00
monojenkins c8e056166b
[jenkins] Don't try to upload any packaged Xamarin.Mac tests if there aren't any or the failed to compile. (#9645)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-09-16 10:25:59 -04:00
Alex Soto bfc98f8059
[xcode12] Initial bump for Xcode 12 GM (#9644)
* [xcode12] Initial bump for Xcode 12 GM

* [tests][intro] We cannot load CoreNFC framework on iOS simulator anymore

* [tests][xtro] New Metal API are not abstract (before XAMCORE_4_0)

* [tests][intro] Fix crash when CSLocalizedString 'description' selector is called

* [tests][xtro] Add support for excluding platforms

Based on `Make.config` variables `INCLUDE_[IOS|TVOS|WATCH|MAC]`

This required moving some entries (common -> macOS) to keep the
sanitizer happy.

* [xtro] Ignore Intents watchOS differences since they will likely match iOS in the future

* Update to use Xcode 12 GMb instead of the old GM

* [tests][xtro] Remove OSLog for iOS and tvOS (changed in GM)

* [tests][msbuild] Disable FrameworkListTest based on the active/disabled platforms

* [tests][msbuild] Track new directory/file inside CoreML projects

* [mlaunch] Bump maccore and disable mlaunch if mac build is disabled

New commits in xamarin/maccore:

* xamarin/maccore@ba332d4d07 Disable mlaunch if Mac is not built (#2314)

Diff: 87a96d21c9..ba332d4d07

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
2020-09-16 11:41:44 +02:00
Rolf Bjarne Kvinge a0797eb822
[jenkins] Fix version logic with macOS 11.0. (#9635)
Fix version logic with macOS 11.0 so that we don't compute all versions by
doing a range computation on the minor version only.

This makes it so that we run on older macOS bots again.

There are also a few other fixes for macOS 11.0.
2020-09-16 09:41:38 +02:00
monojenkins cd891d43ab
[xcode12] [Network] Add nullability support. (#9643)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-09-15 16:58:30 -04:00
Sebastien Pouliot 9f7a57ec65
[xcode12][tests] Fix typos (#9640) 2020-09-15 13:09:18 -04:00
Sebastien Pouliot 25c361f43e
[xcode12][intro] Fix running introspection on old macOS versions (#9638)
Most fixes are inside Intents. Some types were not available on macOS
and marked as such, except it backfired.

* Adding `[NoMac]` on `XAMCORE_4_0` was fine
* Adding `[Obsolete]` outside `XAMCORE_4_0` was fine
* Removing the `[Mac (x,y)]` was not quite fine. It's true (since it was never on macOS) but removing it means it default to the oldest (10.9) macOS version we support. This is what the introspection tests were expecting.

Adding an `[Obsoleted (..., 10,0, ...)]` solve this.
2020-09-15 12:59:21 -04:00
Sebastien Pouliot a8c5216148
[xcode12] Introspection-based fixes for Big Sur (#9632) 2020-09-15 08:56:24 -04:00
Alex Soto 8383b14382
[xcode12] Rename master to main (#9631)
* Fix links that point to master to point to main instead.
* Implement support in the sample tester for specifying the default branch for
  each sample repo.
* Fix various text / documentation to say 'main' instead of 'master.'
* Push to 'main' instead of 'master' in xamarin-macios-data.
* Fix xharness to make 'main' the special branch with regards to documentation tests as opposed to 'master'.
* Fix various CI to use 'main' instead of 'master'.

This is a backport of PR #9561
2020-09-15 07:09:29 -04:00
monojenkins ee0516d46a
[Foundation] Fix NSUrl's implicit Uri operators. Fixes #9607. (#9611)
Calling Uri.PathAndQuery is not allowed on a relative Uri, which made the
previous Uri -> NSUrl implicit operator always throw if given a relative
NSUrl.

So I fixed that, added several tests, and found another issue (it turns out
that 'url.RelativePath == url.Path' is not a reliable way to detect absolute
urls, because it's true for relative urls as well) and fixed that too.

Fixes https://github.com/xamarin/xamarin-macios/issues/9607.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-09-14 08:08:12 +02:00
Manuel de la Pena 2147976458
[Metal] Update framework for xcode 12 beta 6. (#9569)
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-09-11 16:06:22 -04:00
Manuel de la Pena 5a9139bcd6
[AudioToolbox] Update API to xcode 12 beta 6. (#9603)
The most important changes in the API are ignored until we fix issue https://github.com/xamarin/xamarin-macios/issues/9602
2020-09-11 10:36:54 -04:00
Sebastien Pouliot c91b45162b
[xcode12][mediaplayer] Fix MPMusicPlayerController NowPlayingItem on recent iOS versions (#9619)
Rolf nailed the issue in https://github.com/xamarin/xamarin-macios/issues/9578#issuecomment-688409802
> The problem is that iOS returns an instance of a private type (_MPMusicPlayerMediaItemProxy) which is an NSProxy subclass, and currently we don't support NSProxy.

https://github.com/rolfbjarne/xamarin-macios/commit/873a1e1 was on the
right track but it turns out `[ForcedType]` on properties don't need, nor
work (same generated code), with `return:`.

Inside `DynamicRegistrar.cs` the method
```csharp
public Type Lookup (IntPtr @class, bool throw_on_error)
```
did not respect (was unused) the `throw_on_error`. That made it
impossible to force the type to the pointer we got.

In `Runtime.cs` the method `LookupINativeObjectImplementation` must also
be able to work without an exception (from the `Lookup`) at least when we
want to force the type.

backport of https://github.com/xamarin/xamarin-macios/pull/9604
reference: https://github.com/xamarin/xamarin-macios/issues/9578
2020-09-10 11:54:16 -04:00
Manuel de la Pena 31659d61ad
[NetworkExtensions] Update framework to Xcode12 beta 6. (#9585)
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-09-08 13:07:34 -04:00
Manuel de la Pena fc7da0d313
[UIKit] Remove warning from intermediate compilation. (#9588)
Remove the following warning:
```
uikit.cs(22829,21): warning CS0108: 'UIViewConfigurationState.TraitCollection' hides inherited member 'UIConfigurationState.TraitCollection'. Use the new keyword if hiding was intended.
```
2020-09-05 09:40:20 -04:00
Manuel de la Pena 6ebc7dfbde
[ARKit] Remove warning from intermediate compilation. (#9587)
Remove the following warning:
```
arkit.cs(2056,32): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
```
2020-09-04 23:24:06 -04:00
Manuel de la Pena a6b083bd89
[CarPlay] Remove warnings when building the intermediate dlls. (#9586)
The following warnings are printed during the build:

```
carplay.cs(443,10): warning CS0108: 'CPListItem.Text' hides inherited member 'CPListTemplateItem.Text'. Use the new keyword if hiding was intended.
carplay.cs(456,12): warning CS0108: 'CPListItem.UserInfo' hides inherited member 'CPListTemplateItem.UserInfo'. Use the new keyword if hiding was intended.
carplay.cs(505,31): warning CS0108: 'CPListItem.Handler' hides inherited member 'CPSelectableListItem.Handler'. Use the new keyword if hiding was intended.
carplay.cs(1437,31): warning CS0108: 'CPListImageRowItem.Handler' hides inherited member 'CPSelectableListItem.Handler'. Use the new keyword if hiding was intended.
carplay.cs(1447,10): warning CS0108: 'CPListImageRowItem.Text' hides inherited member 'CPListTemplateItem.Text'. Use the new keyword if hiding was intended.
carplay.cs(1450,12): warning CS0108: 'CPListImageRowItem.UserInfo' hides inherited member 'CPListTemplateItem.UserInfo'. Use the new keyword if hiding was intended.
carplay.cs(1516,10): warning CS0108: 'CPMessageListItem.Text' hides inherited member 'CPListTemplateItem.Text'. Use the new keyword if hiding was intended.
carplay.cs(1519,12): warning CS0108: 'CPMessageListItem.UserInfo' hides inherited member 'CPListTemplateItem.UserInfo'. Use the new keyword if hiding was intended.
```
2020-09-04 23:23:43 -04:00
Sebastien Pouliot 0de4daa1e6
[fileprovider] Update for Xcode 12 beta 6 (#9581)
* [fileprovider] Update for Xcode 12 beta 6

This was quite noisy. Apple removed all API marked as
`FILEPROVIDER_API_AVAILABILITY_V3`.

```
```

Most were bound but they were (majority) decorated with `[NoiOS]` and
`[NoMac]` so they did not generated any bindings.

A few of them were modified or just became macOS-only.

Deprecation warnings also needed to be updated.
2020-09-04 15:46:49 -04:00
Sebastien Pouliot 9fd68b033c
[coredata] Fix breaking change for NSCoreDataCoreSpotlightDelegate (#9576)
Reference beta 2 bump / de306cd96d
2020-09-03 09:13:35 -04:00