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

6015 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 5975ffd6f1 Merge main into net7.0. 2022-10-17 10:21:24 +02:00
Simon Rozsival 7171baaeca
[Foundation] Implement the server certificate custom validation callback usage in NSUrlSessionHandler (#15117)
We recently implemented the `ServerCertificateCustomValidationCallback` in Xamarin.Android (https://github.com/xamarin/xamarin-android/pull/6665). It would be great to have feature parity and support the same callback in Xamarin.iOS and Xamarin.Mac.

Related to https://github.com/dotnet/runtime/issues/68898.

Partial fix for https://github.com/xamarin/xamarin-macios/issues/14632.

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-10-17 10:14:39 +02:00
Rolf Bjarne Kvinge 71383ff1f0
[xtro] Fix processing common files when not all platforms are selected. (#16349)
We can't process a common-fx.ignore file for a given framework if that
framework isn't included in any of the platforms we're building for.

Example: we can't process common-AppKit.ignore when only iOS is enabled,
because none of the errors listed in common-AppKit.ignore will be reported for
an iOS build.
2022-10-17 09:26:07 +02:00
Rolf Bjarne Kvinge ad8cdb3f91
[msbuild] Build the solution with .NET. (#16304)
Hopefully this fixes some of the recurrent build problems where we'd fail to
restore nuget packages.

Ref: https://github.com/xamarin/maccore/issues/2620

I wasn't able to execute ilrepack.exe with .NET, so that continues to be
executed with mono.
2022-10-17 07:22:24 +02:00
Rolf Bjarne Kvinge 98ffb7e32b
[xharness] Don't run Mac Catalyst tests if Mac Catalyst isn't enabled. (#16324) 2022-10-14 14:51:11 +02:00
Rolf Bjarne Kvinge 4db2998300
[tests] Adjust the BGen.ResponseFile to only execute when the platforms it needs are enabled. (#16333) 2022-10-14 10:01:59 +02:00
Rolf Bjarne Kvinge 05939b5e86
[xtro] Don't allow entries in 'common' ignore files that aren't actually common to all platforms for a given framework. Fixes #12769. (#16342)
This makes it possible to run xtro consistently when not all platforms are
enabled.

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

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-10-14 09:29:59 +02:00
Rolf Bjarne Kvinge 73ec322dd9
[mtouch] Generate own constants file. (#16321)
Generate own constants file, instead of relying on platform-specific files in
src/, which may or may not exist depending on the enabled platforms.
2022-10-14 09:24:04 +02:00
Rolf Bjarne Kvinge 19680b568a
[xtro] Only run legacy/.NET tests if legacy/.NET is enabled. (#16329) 2022-10-13 23:28:27 +02:00
Rolf Bjarne Kvinge 7659696c23
[autoformat] Add xharness.csproj. (#16322) 2022-10-13 23:10:08 +02:00
Israel Soto d910c1ba60
[GameController] Added support to Xcode 14.1 b1 (#16094)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-13 11:42:52 -04: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
Rolf Bjarne Kvinge 319de6759e Fix merge conflict. 2022-10-13 09:29:53 +02:00
Rolf Bjarne Kvinge 216018cda6
Merge main into xcode14.1. (#16303) 2022-10-13 09:28:06 +02:00
Israel Soto 76a8673260
[SharedWithYou] Added support for Xcode 14.1 b3 (#16199)
* Added macOS support
* Added some missing attributes and a class

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-12 17:48:55 -04:00
Israel Soto 9543d817f4
[MapKit] Add support for Xcode 14 beta 1 & 2 & 5 (#15562) 2022-10-12 12:10:01 -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
Rolf Bjarne Kvinge 1913c3efed
[tests] Re-enable tests that were disabled in Xcode 12 beta 1. Fixes #9531. (#16307)
Looks like some of these tests are working in the simulator now.

I also confirmed that ARReferenceObjectTest.MarshallingTest test should be
ignored in the simulator by verifying that Xcode gets the same behavior we do
(i.e. it doesn't work).

Fixes https://github.com/xamarin/xamarin-macios/issues/9531.
2022-10-11 23:25:14 +02:00
Chris Hamons 8eb182f95d
[appkit] Xcode 14.1 Beta 1-3 (#16255)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-10-11 13:45:28 -05:00
Chris Hamons b959804c25
[foundation] Add new/fixed selectors from beta1 (#16249) 2022-10-11 13:38:01 -05:00
Israel Soto 1e877a84cb
[CoreLocation] Added support for Xcode 14.1 b1 (#16119)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-10-11 12:09:28 -04:00
Israel Soto 11b1d1e1c7
[ThreadNetwork] Added support for Xcode 14.1 b3 (#16196)
This PR adds support for Mac and MacCatalyst. Apple says that these
platforms are now supported; framework's headers does not specify them
but do not deny them either, so let's see what intro says about this.

I'm just creating this PR to test it against intro once we can build the
branch.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-10 10:51:50 -04:00
Rolf Bjarne Kvinge 6b0d192131 Merge main into xcode14.1. 2022-10-10 13:02:13 +02:00
Rolf Bjarne Kvinge 9d306f3862 Merge main into net7.0. 2022-10-10 13:01:32 +02:00
Rolf Bjarne Kvinge acf4edbfed
[dotnet] Add numerous item templates. Fixes #15836. (#16287)
Add the following item templates for all platforms:

* Controller (View Controller with UI written in code)
* View
* View Controller (View Controller with UI written in XIB)
* Storyboard

Item templates won't show up in VSMac until this is released:
https://github.com/xamarin/vsmac/pull/9133.

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

Also update the template tests accordingly.

This PR might be easier to review commit-by-commit due to the large number of generated localization files.
2022-10-10 08:09:34 +02:00
Rolf Bjarne Kvinge 6013e06418
[system-dependencies] Check for and install shellcheck and yamllint. (#16285)
Also make the build go into the tools/devops directory, which will run
shellcheck on the bash files. This also required fixing a couple of issues in
one of the bash scripts.

We currently don't use yamllint, but that's coming very soon.
2022-10-10 08:05:51 +02:00
Israel Soto b97e797709
[CoreMotion] Added support for Xcode 14.1 b1 (#16118)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-07 11:31:12 -04:00
Rolf Bjarne Kvinge fc1bf0a974
Merge main into xcode14.1. (#16267) 2022-10-07 16:04:14 +02:00
Rolf Bjarne Kvinge 2a4eaea5a7
[tests] Enable tests for interfaces being linked away. Fixes #9566. (#16279)
Fixes https://github.com/xamarin/xamarin-macios/issues/9566.
2022-10-07 13:10:03 +02:00
Rolf Bjarne Kvinge fa778b50e8
[autoformat] Add the DotNetUnitTests project to the projects to autoformat. (#16257) 2022-10-07 08:05:53 +02:00
Rolf Bjarne Kvinge d73f2f8fea
Merge main into net7.0. (#16268) 2022-10-07 07:52:44 +02:00
Israel Soto 4e765eca0b
[NetworkExtension] Added support for Xcode 14.1 b1 (#16066)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-06 12:16:12 -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
Rolf Bjarne Kvinge 6d6c3b8570
[dotnet] Add class library project templates for tvOS, macOS and Mac Catalyst. (#16263)
These new project templates won't show up in VSMac until the new templates are
added to VSMac.

Ref: 61afbd1cd1/Xamarin.Addins.Core/Xamarin.Ide.Templating/TemplateDescriptionProvider.cs (L207-L216)

Also update the corresponding template tests.

This PR might be easier to review commit-by-commit due to the large number of generated localization files.
2022-10-06 16:47:06 +02:00
Rolf Bjarne Kvinge fb97063227 Merge main into net7.0. 2022-10-06 14:01:27 +02:00
Rolf Bjarne Kvinge 45b97d838e Merge main into xcode14.1. 2022-10-06 13:59:29 +02:00
Rolf Bjarne Kvinge 273c2fa51a
[Foundation] Add NSArray.ToArray and implement IEnumerable<NSObject>. (#16252)
For NSArray, implement:

* A ToArray () method that returns an NSArray[].
* A ToArray<T> () method that returns a T[].
* The IEnumerable<NSObject> interface.

For NSArray<T>, implement:

* A ToArray () method that returns a T[].

This should make NSArray much better to work with from managed code.
2022-10-06 08:37:02 +02:00
Rolf Bjarne Kvinge f22ecb5f05
[autoformat] Add xtro projects to the projects to autoformat. (#16239) 2022-10-06 07:30:47 +02:00
Israel Soto c019630352
[WatchKit] Added support for Xcode 14.1 b1 (#16061)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-05 11:39:28 -04:00
Israel Soto 66ae01a3b2
[StoreKit] Added support for Xcode 14.1 b1-b3 (#16026)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-10-05 11:37:09 -04:00
Rolf Bjarne Kvinge c7badeacf1 Merge main into xcode14.1. 2022-10-04 16:21:54 +02:00
Rolf Bjarne Kvinge 651acc9ec5 Merge main into net7.0. 2022-10-04 16:21:28 +02:00
Rolf Bjarne Kvinge b0e99f8c26 Fix merge failure. 2022-10-04 08:13:46 +02:00
Rolf Bjarne Kvinge fd2ee69c2b Merge remote-tracking branch 'origin/xcode14.1' into bump-main-in-xcode14.1-2022-09-28 2022-10-03 22:28:13 +02:00
Rolf Bjarne Kvinge 5078c8b065
[AVFoundation] Fix the AVAudioFormat.StreamDescription binding. Fixes #8892. (#16206)
The property returns a pointer to a struct, not the struct itself.

Fixes https://github.com/xamarin/xamarin-macios/issues/8892.
2022-10-03 22:18:07 +02: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
Rolf Bjarne Kvinge 7e6edcbc36
[Network] Fix a few issues with the callbacks in NWPath. Fixes #13772. (#16138)
* Change EnumerateGateways to use the 'static_EnumerateGatewaysHandler'
  callback. It looks like this was a c&p error, since the
  'static_EnumerateGatewaysHandler' callback was implemented, just never
  referenced anywhere.
* Add an overload to EnumerateGateways and EnumerateInterfaces that takes a
  callback that returns a bool indicating whether the enumeration should
  continue. This mirrors the native API.
* Obsolete the EnumerateGateways and EnumerateInterfaces overloads that take a
  void callback (and remove in XAMCORE_5_0).
* Add a test for EnumerateGateways that works (the previous failed, but never
  asserted the failure, so it would just silently time out).

Fixes https://github.com/xamarin/xamarin-macios/issues/13772.
2022-10-03 12:11:52 +02:00
Rolf Bjarne Kvinge 8b247307ab Merge main into net7.0. 2022-09-30 14:02:34 +02:00
Rolf Bjarne Kvinge 513355602d
[msbuild] Make DetectSigningIdentity.CodesignEntitlements an ITaskItem property. (#16174)
This way XVS will copy the corresponding file to the mac during a build.

Fixes this error:

Target Name=_DetectSigningIdentity
Project=C:\Users\admin\source\repos\iOSApp4\iOSApp4\iOSApp4.csproj
        DetectSigningIdentity
Assembly = C:\Program
Files\dotnet\packs\Microsoft.iOS.Sdk\16.0.515\tools\msbuild\iOS\..\iOS\Xamarin.iOS.Tasks.dll
            Parameters
                AppBundleName = iOSApp4
                BundleIdentifier = com.companyname.iOSApp4
                CodesignEntitlements = Entitlements.plist
                RequireCodeSigning = False
                SdkIsSimulator = True
                SdkPlatform = iPhoneSimulator
                SessionId = ...
TargetFrameworkMoniker = .NETCoreApp,Version=v6.0,Profile=ios
DetectSigningIdentity: 2022-09-28T04:17:13.3947732-07:00 - Started
DetectSigningIdentity: 2022-09-28T04:17:13.3947732-07:00 - Initializing
[xma][info]: Trying to get a Build Connection for Session '...':
Xamarin.Messaging.Build.Client.BuildConnection...., Lifetime: AppDomain
DetectSigningIdentity: 2022-09-28T04:17:13.3947732-07:00 - Initialized
DetectSigningIdentity: 2022-09-28T04:17:13.3957722-07:00 - There's no
available inputs to copy to the Mac
DetectSigningIdentity: 2022-09-28T04:17:13.3957722-07:00 - Serializing
intputs
DetectSigningIdentity: 2022-09-28T04:17:13.4077719-07:00 - Executing
[xma][info]: Starting remote task execution for 'iOSApp4':
Xamarin.MacDev.Tasks.DetectSigningIdentity
[xma][info]: Sending Request
Xamarin.Messaging.Build.Contracts.ExecuteTaskMessage to topic
xvs/build/execute-task/iOSApp4/01e0050002fDetectSigningIdentity
[xma][err]: An error occurred on the receiver while executing a post for
topic xvs/build/execute-task/iOSApp4/01e0050002fDetectSigningIdentity
and client
build01e0050ee064bdc5af5fe8d051898268699b25ed1eeec849023e711753e8d82d6484admin
[xma][info]: An error occurred while executing the operation. The Build
Server connection is active and running so no retries will be attempted.
            Errors
C:\Program
Files\dotnet\packs\Microsoft.iOS.Sdk\16.0.515\tools\msbuild\iOS\Xamarin.Shared.targets(1699,3):
MessagingRemoteException: An error occurred on client Build while
executing a reply for topic
xvs/build/execute-task/iOSApp4/01e0050002fDetectSigningIdentity
FileNotFoundException: Could not find file
"/Users/vstester/Library/Caches/Xamarin/mtbs/builds/iOSApp4/.../Entitlements.plist"
     [C:\Users\admin\source\repos\iOSApp4\iOSApp4\iOSApp4.csproj]
DetectSigningIdentity: 2022-09-28T04:17:13.4631033-07:00 - Finished

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1635214.
2022-09-30 09:33:33 +02:00
Rolf Bjarne Kvinge e8c7805ddf
Remove part of the maccore logic. (#16181)
* Don't load maccore/mk/versions.mk anymore, which means we're not checking
  any subsequent dependencies listed in maccore. Note that we still need the
  maccore dependency itself for a little while longer.
* Remove some outdated testing code that called into maccore.
* Don't recurse into the maccore directory during make.
* Remove some code checking for ENABLE_XAMARIN that's not used anymore, in
  particular in xharness.
2022-09-30 09:30:12 +02:00
Rolf Bjarne Kvinge ed612dcd6e Merge main into net7.0. 2022-09-28 17:17:10 +02:00
Rolf Bjarne Kvinge 7cc91e0c53 Merge main into xcode14.1. 2022-09-28 17:14:31 +02:00
Rolf Bjarne Kvinge b6d484e3c4
Remove Xamarin.Analysis. (#16149)
It's not used by anyone anymore, and there are better alternatives for .NET.

This removes a dependency on a private component, which makes a potential move
into the dotnet org easier.
2022-09-28 16:25:07 +02:00
Rolf Bjarne Kvinge 00578621d4
[dotnet] Don't try to ILStrip assemblies unless we're connected to a Mac. (#16160)
Fixes this error:

	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018: The "Xamarin.MacDev.Tasks.ILStrip" task failed unexpectedly.
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018: System.ArgumentException: 'Assemblies' is required. (Parameter 'Assemblies')
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018:    at ILStrip.Execute()
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018:    at ILStripTasks.ILStripBase.Execute() in /Users/rolf/work/maccore/main/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Tasks/ILStripBase.cs:line 18
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018:    at Xamarin.MacDev.Tasks.ILStrip.Execute() in /Users/rolf/work/maccore/main/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Tasks/ILStrip.cs:line 16
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
	targets/Xamarin.Shared.Sdk.targets(754,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
     0 Warning(s)
     1 Error(s)
2022-09-28 07:29:52 +02:00
Rolf Bjarne Kvinge e9e097c794
[dotnet] Don't try to collect RID-specific items to codesign unless we're connected to (or building on) a Mac. (#16153)
Fixes this problem when building universal Mac Catalyst apps on Windows:

    Target Name=_CollectRidSpecificCodesignItems Project=D:\a\_work\1\s\src\Graphics\samples\GraphicsTester.Skia.Mac\GraphicsTester.Skia.Mac.csproj
        ReadItemsFromFile
            Assembly = D:\a\_work\1\s\bin\dotnet\packs\Microsoft.MacCatalyst.Sdk\15.4.1173-rc.2\tools\msbuild\iOS\..\iOS\Xamarin.iOS.Tasks.dll
            Parameters
                File = obj\Release\net7.0-macos\codesignitems-osx-x64.items
            Errors
                D:\a\_work\1\s\bin\dotnet\packs\Microsoft.macOS.Sdk\12.3.1173-rc.2\targets\Xamarin.Shared.Sdk.targets(1303,3): error MSB4018: The "ReadItemsFromFile" task failed unexpectedly.
    System.IO.FileNotFoundException: Could not find file 'D:\a\_work\1\s\src\Graphics\samples\GraphicsTester.Skia.Mac\obj\Release\net7.0-macos\codesignitems-osx-x64.items'.
    File name: 'D:\a\_work\1\s\src\Graphics\samples\GraphicsTester.Skia.Mac\obj\Release\net7.0-macos\codesignitems-osx-x64.items'
       at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
       at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
       at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
       at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy)
       at System.Xml.XmlTextReaderImpl.FinishInitUriString()
       at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
       at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
       at Xamarin.MacDev.Tasks.ReadItemsFromFileBase.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/ReadItemsFromFileBase.cs:line 39
       at Xamarin.MacDev.Tasks.ReadItemsFromFile.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/ReadItemsFromFile.cs:line 15
       at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
       at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\a\_work\1\s\src\Graphics\samples\GraphicsTester.Skia.Mac\GraphicsTester.Skia.Mac.csproj]
2022-09-27 17:29:58 +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
GitHub Actions Autoformatter 14f7a23833 Auto-format source code 2022-09-26 20:49:33 +00:00
Rolf Bjarne Kvinge 9c3458dc33 Merge main into xcode14.1. 2022-09-26 22:46:59 +02:00
Rolf Bjarne Kvinge 56165a77ec Merge main into net7.0. 2022-09-26 22:44:48 +02:00
Rolf Bjarne Kvinge deb0faa4f2
Autoformat cecil-tests.csproj. (#16103)
All other changes should be blank space only.

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-09-26 21:00:28 +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 afbd3336ba
[tests] Ignore the CustomizedCodeSigning test when the selected platform isn't enabled. (#16101) 2022-09-23 20:55:53 +02:00
Rolf Bjarne Kvinge b82b1685a7
Use Environment.SpecialFolder.UserProfile, not SpecialFolder.Personal. (#16017)
Context: dotnet/runtime#68610
Context: https://github.com/xamarin/xamarin-android-tools/commit/0be567a9

In Mono and .NET prior to .NET 8, the
[`System.Environment.SpecialFolder`][0]`.Personal` enum value would refer to
`$HOME` on Unix platforms.

This will be changing in .NET 8, such that
`Environment.SpecialFolder.Personal` will instead refer to
`$XDG_DOCUMENTS_DIR` (if set) or `$HOME/Documents`.  This is for "semantic
compatibility" with .NET on Windows.

Replace usage of `Environment.SpecialFolder.Personal` with
`Environment.SpecialFolder.UserProfile`, so that our code continues to work as
expected under .NET 8.

[0]: https://docs.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?view=net-6.0
2022-09-23 16:29:19 +02:00
Rolf Bjarne Kvinge 5837d5a1e0
[tests] Update tests to cope with a different default platform than the latest version. (#16063) 2022-09-23 14:08:40 +02:00
Rolf Bjarne Kvinge f592de721d
[tests/xharness] Skip legacy tests if legacy isn't enabled. (#16073) 2022-09-23 13:54:26 +02:00
Rolf Bjarne Kvinge 15e9683a53 Bump main in net7.0. 2022-09-22 07:55:18 +02:00
Rolf Bjarne Kvinge f4d5e6eeab Merge main into xcode14.1. 2022-09-22 07:50:58 +02:00
Rolf Bjarne Kvinge 8e92e9e5c5
[tests] Ignore tests that require platforms not included in the current build. (#16000) 2022-09-22 07:33:42 +02:00
VS MobileTools Engineering Service 2 abae256b40
[main] [mtouch] Automatically disable bitcode if using Xcode 14+. Fixes #15210. (#16054)
Apple has deprecated bitcode, and will apparently reject app submissions
containing bitcode starting with Xcode 14. So automatically disable bitcode if
building using Xcode 14+ (and show a warning so that app developers can remove
the 'MtouchEnableBitcode' property from their project files).

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

Backport of #15804

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-09-22 07:32:33 +02:00
Rolf Bjarne Kvinge 421dad0fed
[tests] Don't package/execute legacy mac tests if legacy hasn't been enabled. (#16051) 2022-09-22 07:13:24 +02:00
Haritha Mohan a9c8efa893
[UIKit] Add Constructor for UIHoverGestureRecognizer (#15837)
Fixes #15335

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-09-21 12:54:10 -07:00
Rolf Bjarne Kvinge 6e49a6748a
[xharness] Find a different mlaunch if legacy Xamarin is disabled. (#15996) 2022-09-21 14:27:10 +02:00
Rolf Bjarne Kvinge a2f52c77da
[tests] Ignore msbuild tests that require legacy Xamarin when legacy Xamarin is not enabled. (#16019) 2022-09-21 12:13:59 +02:00
Rolf Bjarne Kvinge 52a332cb9b
[dotnet/msbuild] Add support for skipping/adding items (and bundles) to be signed. Fixes #15594. (#15894)
Add support for two new MSBuild item groups:

* CodesignBundle: lists additional app bundles inside the main bundle which should
  be signed (typically manually copied into the app bundle by the developer).
* SkipCodesignItems: lists files we'd sign by default, but which shouldn't be signed.

Fixes https://github.com/xamarin/xamarin-macios/issues/15594.
2022-09-21 11:38:03 +02:00
Steve Hawley ea3f7d28dc
[.NET] added cecil tests for generic pinvokes and generic delegates. Fix for #11771 (#15974) 2022-09-20 10:23:53 -04:00
Rolf Bjarne Kvinge 4dcfaa3d05 Merge main into xcode14.1. 2022-09-20 13:57:49 +02:00
dotnet-maestro[bot] 249f470e57
[main] Update dependencies from dotnet/runtime (#15886)
This pull request updates the following dependencies

## From https://github.com/dotnet/runtime
- **Subscription**: 0f76eea3-d4b0-4229-e732-08d9ecb01c9c
- **Build**: 20220916.13
- **Date Produced**: September 17, 2022 2:53:53 AM UTC
- **Commit**: cdf48abd370f148a537960141f73769e678660e7
- **Branch**: refs/heads/release/6.0

- **Updates**:
  - **Microsoft.NETCore.App.Ref**: [from 6.0.9 to 6.0.10][15]
- **Microsoft.NET.Workload.Emscripten.Manifest-6.0.100**: [from 6.0.9 to
6.0.10][16]

[15]: 531f715...cdf48ab
[16]: 3f6c45a...c3fc739

## Coherency Updates

The following updates ensure that dependencies with a
*CoherentParentDependency*
attribute were produced in a build used as input to the parent
dependency's build.
See [Dependency Description
Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
- **Microsoft.NET.Workload.Emscripten.Manifest-6.0.100**: from 6.0.9 to
6.0.10 (parent: Microsoft.NETCore.App.Ref)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-09-20 13:44:06 +02:00
Rolf Bjarne Kvinge 3fac95049f Merge remote-tracking branch 'origin/xcode14.1' into bump-main-in-xcode14.1-2022-09-16 2022-09-19 14:11:53 +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 85e3332b82 Merge remote-tracking branch 'origin/main' into bump-main-in-net7.0-2022-09-16 2022-09-19 14:10:49 +02:00
Rolf Bjarne Kvinge a020f09979
[tests] Update the cecil tests to run on .NET assemblies. (#15969)
And not legacy assemblies if the legacy build is disabled.
2022-09-19 11:52:23 +02:00
Rolf Bjarne Kvinge 9e04da9006
[xharness] Fix typo in method name. (#15968) 2022-09-19 11:51:05 +02:00
Rolf Bjarne Kvinge cf4d1001ca
[xtro] Fix minor issue. (#15972) 2022-09-16 18:41:58 +02:00
Rolf Bjarne Kvinge f9c5070c0e
[tests] Remove unused/dead code. (#15967) 2022-09-16 18:37:55 +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
Rolf Bjarne Kvinge 57ee60106b
[tests] We do not need qa-dependencies.zip anymore. (#15964)
This was used in the old Xamarin days.
2022-09-16 18:36:51 +02:00
Rolf Bjarne Kvinge 40b3831bc7 Merge remote-tracking branch 'origin/main' into bump-main-in-net7.0-2022-09-16 2022-09-16 18:32:01 +02:00
Chris Hamons efa2935a9d
[foundation] Add lowPowerModeEnabled to macOS (#15940)
- Fixes https://github.com/xamarin/xamarin-macios/issues/15932
2022-09-16 10:37:17 -05:00
Rolf Bjarne Kvinge 5a613f7c86 Merge remote-tracking branch 'origin/main' into bump-main-in-net7.0-2022-09-15 2022-09-15 09:30:29 +02:00
Rolf Bjarne Kvinge 5fda07d3f3 Merge remote-tracking branch 'origin/main' into bump-main-in-xcode14.1-2022-09-15 2022-09-15 09:29:28 +02:00
Alex Soto 3e065fe0d3
Merge branch 'xcode14' into bump-main-in-xcode14-2022-09-13 2022-09-14 08:06:08 -04:00
TJ Lambert b85a883eab
[CoreMIDI] Updates for Xcode14 Beta 1 (#15917)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-09-13 17:15:32 -05:00
Rolf Bjarne Kvinge 40199966b6
[msbuild] Automatically add the 'com.apple.security.cs.allow-jit' entitlement for desktop release builds. Fixes #15745. (#15927)
* Add support for specifying custom entitlements with an MSBuild item group.
* Use this new support to automatically add the 'com.apple.security.cs.allow-jit'
  entitlement to .NET desktop apps when building for release, since all apps that
  go through notarization will need it in order to be able to use the JIT.

It's possible to override the default behavior by adding something like this to the project file:

    <ItemGroup>
        <CustomEntitlements Include="com.apple.security.cs.allow-jit" Type="Remove" />
    </ItemGroup>

Fixes https://github.com/xamarin/xamarin-macios/issues/15745.
2022-09-13 17:41:22 +02:00
Rolf Bjarne Kvinge 7df80a40da
[msbuild] Remove MS7068 so allow creating binding projects without native libraries. Fixes #15489. (#15926)
Fixes https://github.com/xamarin/xamarin-macios/issues/15489.
2022-09-13 17:40:43 +02:00
Rolf Bjarne Kvinge 594e88bfca
[tests] Adjust test for tvOS and watchOS. (#15939)
Probably regressed after 61e8ce443f.

Fixes https://github.com/xamarin/maccore/issues/2618.
2022-09-13 16:06:10 +02:00
Rolf Bjarne Kvinge f93e5fba12 Merge remote-tracking branch 'origin/main' into bump-main-in-xcode14-2022-09-13 2022-09-13 11:00:35 +02:00
Rolf Bjarne Kvinge dea88f7fed Merge remote-tracking branch 'origin/main' into bump-main-in-net7.0-2022-09-13 2022-09-13 10:59:01 +02:00
Rolf Bjarne Kvinge 9a839d6c4a
Merge main into xcode14. (#15928) 2022-09-13 10:58:30 +02:00
Rolf Bjarne Kvinge d769fa99cc
[msbuild] Only require a provisioning profile if we have non-empty entitlements. (#15918)
This is the behavior in legacy Xamarin (for mobile projects): if a project
contains a CodesignEntitlements=Entitlements.plist property, we require a
provisioning profile (and failing the build if none is found).

In .NET, the expected behavior is that if a file is in the project directory,
it should be detected automatically and handled accordingly. We didn't do this
for the initial release of .NET, but we implemented it later
(https://github.com/xamarin/xamarin-macios/pull/15729).

However, this turned out to be complicated, because many templates provide an
Entitlements.plist file, and now suddenly just the presence of such a file
would require a provisioning profile, which also means setting up the whole
rigmarole of Apple's certificates and provisioning profiles (and even
potentially getting a paid Apple Developer account).

This usually worked well in legacy Xamarin, because in templates only the
Release configuration would set the CodesignEntitlements=Entitlements.plist
property, and thus we'd only require a provisioning profile for release builds
(and the Entitlements.plist file would be ignored for Debug builds).

Here we change the default behavior when building for .NET so that we only
require a provisioning profile if the Entitlements.plist file is empty (i.e.
doesn't request any entitlements).

I've also implemented an override, where setting the
CodesignRequireProvisioningProfile=true property will override our default
logic.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1613459.
2022-09-13 10:51:41 +02:00