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

11438 Коммитов

Автор SHA1 Сообщение Дата
Filip Navara 454831f613
Fix lstat P/Invoke on arm64 (#12437)
* Fix lstat P/Invoke on arm64

* Bump TargetFrameworkVersion for mmp (to match mtouch)
2021-08-16 16:21:21 +02:00
Rolf Bjarne Kvinge e3969482a8
[msbuild] Unify the iOS and macOS versions of the IBTool task. (#12424)
* Have a single implementation of AutoActivateCustomFonts.
* Share the GetTargetDevices implementations between ACTool and IBTool, after removing
  a condition for Xcode 6.0 (which we don't support anymore, so that check could
  be removed) the implementations were identical.
2021-08-16 10:54:28 +02:00
Rolf Bjarne Kvinge 961d80aedb
[dotnet] Don't use system resource keys if we're debugging. Fixes #12438. (#12439)
Fixes https://github.com/xamarin/xamarin-macios/issues/12438.
2021-08-16 10:51:16 +02:00
Rolf Bjarne Kvinge 77a838ac70
[tests] Rework the bindings-test and fsharplibrary test projects to follow the pattern of the other .NET test projects. (#12431)
* [tests] Make fsharplibrary follow the pattern of the rest.

* [tests] Make bindings-test follow the pattern of the rest.
2021-08-14 08:09:10 +02:00
Rolf Bjarne Kvinge 874a6f93b6
[tests] Add .NET version of dont link for macOS. (#12432) 2021-08-13 22:49:03 +02:00
Rolf Bjarne Kvinge cba3002d5f
[msbuild] Share the ACTool task implementation between iOS and macOS. (#12425) 2021-08-13 20:15:53 +02:00
Rolf Bjarne Kvinge e0e7f0f4eb
[tests] Add/improve interdependent-binding-projects on .NET (#12429)
* [tests] Share project logic in the .NET version of interdependent-binding-projects.

* [tests] Make interdependent-binding-projects work on macOS.
2021-08-13 20:15:06 +02:00
Manuel de la Pena bd7e5c20c1
[Xcode13] Bump to beta 5. (#12413) 2021-08-13 13:07:19 -04:00
Rolf Bjarne Kvinge d173db1a23
Bump mono. (#12428)
New commits in mono/mono:

* mono/mono@8b6809243d [mini] Add GC Unsafe transitions in mono_pmip (#21186)
* mono/mono@35bf914659 [2020-02] Fix memory leak during data registration (#21107) (#21116)
* mono/mono@6303563594 [2020-02] Start a dedicated thread for MERP crash reporting (#21126)

Diff: c633fe9238..8b6809243d
2021-08-13 17:26:47 +02:00
Rolf Bjarne Kvinge 706f18085d
[xharness] Show better error message (#12430) 2021-08-13 15:46:04 +02:00
Rolf Bjarne Kvinge 18a5351987
Bump ObjectiveSharpie (#12423) 2021-08-13 09:36:28 +02:00
Rolf Bjarne Kvinge 53f171eb4e
[Runtime] Ignore assemblies that aren't found at startup for macOS in .NET. Fixes #12341. (#12419)
We already ignore FileNotFoundExceptions for other platforms when looking for assemblies
to register at startup, so make macOS behave the same way.

Fixes https://github.com/xamarin/xamarin-macios/issues/12341.
2021-08-13 09:34:19 +02:00
Rolf Bjarne Kvinge 617b88e270
[introspection] Share the logic for .NET between all platforms. (#12409)
* Share the logic for .NET between all platforms.
* This means adding a macOS variation of introspection for .NET.
* A few fixes to make sure the macOS variation passes:
    * Make NSTabViewController.SegmentedControl fully unavailable (it's never
      been in any stable version of Xcode).
    * Treat API with an Obsolete attribute as API with an Obsoleted attribute
      with regards to availability.
    * Ignore OSPlatform attributes we don't understand.
    * Ignore the ApiAvailabilityTest.LegacyAttributes test on macOS as well.
2021-08-13 09:32:56 +02:00
Rolf Bjarne Kvinge 1b5cb35623
[tests] Add .NET versions of xcframeworks-test and bindings-xcframework-test. (#12420) 2021-08-13 09:30:45 +02:00
Sebastien Pouliot 2b1a5c12f4
[generator] Use new CFArray.ArrayFromHandle instead of the existing NSArray API (#12415)
Similar to https://github.com/xamarin/xamarin-macios/pull/12368

p/invoke are faster than selectors, so we use them inside generated
bindings and suggest (thru `[Obsolete]`) the use of `CFArray` in manual
bindings and 3rd-party code.

|                        Method |          name |               value |            Mean |            Error |          StdDev |
|------------------------------ |-------------- |-------------------- |----------------:|-----------------:|----------------:|
|       CFArray_ArrayFromHandle |         empty |                  () |        120.1 ns |         31.37 ns |         1.72 ns |
|       NSArray_ArrayFromHandle |         empty |                  () |      1,433.4 ns |        168.78 ns |         9.25 ns |
|       CFArray_ArrayFromHandle |           few |   (  (...).") [108] |      4,113.2 ns |        290.55 ns |        15.93 ns |
|       NSArray_ArrayFromHandle |           few |   (  (...).") [108] |      8,617.3 ns |      1,958.88 ns |       107.37 ns |
|       CFArray_ArrayFromHandle | large_mutable |   ((...)) [8419330] |  4,045,002.6 ns |    438,639.47 ns |    24,043.31 ns |
|       NSArray_ArrayFromHandle | large_mutable |   ((...)) [8419330] |  7,138,524.0 ns |  1,147,635.42 ns |    62,905.77 ns |
|       CFArray_ArrayFromHandle |       mutable |  (   (...)9e") [54] |      1,974.9 ns |        576.90 ns |        31.62 ns |
|       NSArray_ArrayFromHandle |       mutable |  (   (...)9e") [54] |      4,882.9 ns |        269.60 ns |        14.78 ns |

Note: the use of `CFArrayGetValues` as suggested before (see https://github.com/xamarin/xamarin-macios/issues/12375)
would also apply here - but that needs a bit more fine-tuning (to offset
the extra allocation) so it will be handled by a future PR.

# Side Effect Trivia

Along with previous work this means that a _minimal_ app can now trim both `NSArray` and `NSNull` (managed code) and their need to be registered at startup.

```diff
--- a.cs	2021-08-12 08:18:15.000000000 -0400
+++ b.cs	2021-08-12 08:19:35.000000000 -0400
@@ -2111,6 +2111,11 @@
 		{
 			public static readonly IntPtr Handle = Dlfcn._dlopen("/usr/lib/libSystem.dylib", 0);
 		}
+
+		public static class CoreFoundation
+		{
+			public static readonly IntPtr Handle = Dlfcn._dlopen("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", 0);
+		}
 	}
 	public static class Dlfcn
 	{
@@ -2119,6 +2124,16 @@
 
 		[DllImport("/usr/lib/libSystem.dylib")]
 		public static extern IntPtr dlsym(IntPtr P_0, string P_1);
+
+		public static IntPtr GetIntPtr(IntPtr P_0, string P_1)
+		{
+			IntPtr intPtr = dlsym(P_0, P_1);
+			if (intPtr == IntPtr.Zero)
+			{
+				return IntPtr.Zero;
+			}
+			return Marshal.ReadIntPtr(intPtr);
+		}
 	}
 	internal static class ErrorHelper
 	{
@@ -3114,9 +3129,6 @@
 		public static extern void void_objc_msgSend(IntPtr P_0, IntPtr P_1);
 
 		[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")]
-		public static extern IntPtr IntPtr_objc_msgSend_nuint(IntPtr P_0, IntPtr P_1, nuint P_2);
-
-		[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")]
 		public static extern CGRect CGRect_objc_msgSend(IntPtr P_0, IntPtr P_1);
 
 		[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSendSuper")]
@@ -3590,54 +3602,6 @@
 			return stringBuilder.ToString();
 		}
 	}
-	[Register("NSArray", true)]
-	public sealed class NSArray : NSObject, INativeObject, IDisposable
-	{
-		private static readonly IntPtr class_ptr = Class.GetHandle("NSArray");
-
-		public sealed override IntPtr ClassHandle => class_ptr;
-
-		internal static nuint GetCount(IntPtr P_0)
-		{
-			return Messaging.nuint_objc_msgSend(P_0, Selector.GetHandle("count"));
-		}
-
-		internal static IntPtr GetAtIndex(IntPtr P_0, nuint P_1)
-		{
-			return Messaging.IntPtr_objc_msgSend_nuint(P_0, Selector.GetHandle("objectAtIndex:"), P_1);
-		}
-
-		public static T[] ArrayFromHandle<T>(IntPtr P_0) where T : class, INativeObject
-		{
-			if (P_0 == IntPtr.Zero)
-			{
-				return null;
-			}
-			nuint count = GetCount(P_0);
-			T[] array = new T[(ulong)count];
-			for (uint num = 0u; num < count; num++)
-			{
-				array[num] = UnsafeGetItem<T>(P_0, num);
-			}
-			return array;
-		}
-
-		private static T UnsafeGetItem<T>(IntPtr P_0, nuint P_1) where T : class, INativeObject
-		{
-			IntPtr atIndex = GetAtIndex(P_0, P_1);
-			if (atIndex == NSNull.Null.Handle)
-			{
-				return null;
-			}
-			return Runtime.GetINativeObject<T>(atIndex, false);
-		}
-
-		[EditorBrowsable(EditorBrowsableState.Advanced)]
-		protected internal NSArray(IntPtr P_0)
-			: base(P_0)
-		{
-		}
-	}
 	[DefaultMember("Item")]
 	[Register("NSDictionary", true)]
 	public sealed class NSDictionary : NSObject, IDictionary, ICollection<KeyValuePair<NSObject, NSObject>>, IEnumerable<KeyValuePair<NSObject, NSObject>>, INativeObject, IDisposable
@@ -3665,7 +3629,7 @@
 			{
 				using (new NSAutoreleasePool())
 				{
-					return NSArray.ArrayFromHandle<NSObject>(Messaging.IntPtr_objc_msgSend(base.Handle, Selector.GetHandle("allKeys")));
+					return CFArray.ArrayFromHandle<NSObject>(Messaging.IntPtr_objc_msgSend(base.Handle, Selector.GetHandle("allKeys")));
 				}
 			}
 		}
@@ -3717,43 +3681,6 @@
 			return Runtime.GetNSObject(Messaging.IntPtr_objc_msgSend_IntPtr(base.Handle, Selector.GetHandle("objectForKey:"), nonNullHandle));
 		}
 	}
-	[Register("NSNull", true)]
-	public sealed class NSNull : NSObject, INativeObject, IDisposable
-	{
-		private static NSNull _null;
-
-		private static readonly IntPtr class_ptr = Class.GetHandle("NSNull");
-
-		public static NSNull Null
-		{
-			get
-			{
-				if (_null == null)
-				{
-					_null = _Null;
-				}
-				return _null;
-			}
-		}
-
-		public sealed override IntPtr ClassHandle => class_ptr;
-
-		internal static NSNull _Null
-		{
-			[System.Runtime.CompilerServices.NullableContext(1)]
-			[Export("null")]
-			get
-			{
-				return Runtime.GetNSObject<NSNull>(Messaging.IntPtr_objc_msgSend(class_ptr, Selector.GetHandle("null")));
-			}
-		}
-
-		[EditorBrowsable(EditorBrowsableState.Advanced)]
-		protected internal NSNull(IntPtr P_0)
-			: base(P_0)
-		{
-		}
-	}
 	[Register("NSRunLoop", true)]
 	public sealed class NSRunLoop : NSObject
 	{
@@ -4702,26 +4629,11 @@
 			return (int)P_0.v;
 		}
 
-		public static implicit operator nuint(uint P_0)
-		{
-			return new nuint(P_0);
-		}
-
 		public static explicit operator nuint(ulong P_0)
 		{
 			return new nuint(P_0);
 		}
 
-		public static implicit operator ulong(nuint P_0)
-		{
-			return P_0.v;
-		}
-
-		public static bool operator <(nuint P_0, nuint P_1)
-		{
-			return P_0.v < P_1.v;
-		}
-
 		public int CompareTo(nuint P_0)
 		{
 			return v.CompareTo(P_0.v);
@@ -4867,6 +4779,8 @@
 {
 	public sealed class CFArray : NativeObject
 	{
+		internal static IntPtr CFNullHandle => Dlfcn.GetIntPtr(Libraries.CoreFoundation.Handle, "kCFNull");
+
 		internal CFArray(IntPtr P_0)
 			: base(P_0, false)
 		{
@@ -4897,6 +4811,31 @@
 			}
 			return array;
 		}
+
+		private static T? UnsafeGetItem<T>(IntPtr P_0, nint P_1) where T : class, INativeObject
+		{
+			IntPtr intPtr = CFArrayGetValueAtIndex(P_0, P_1);
+			if (intPtr == CFNullHandle)
+			{
+				return null;
+			}
+			return Runtime.GetINativeObject<T>(intPtr, false);
+		}
+
+		public static T?[]? ArrayFromHandle<T>(IntPtr P_0) where T : class, INativeObject
+		{
+			if (P_0 == IntPtr.Zero)
+			{
+				return null;
+			}
+			nint nint = CFArrayGetCount(P_0);
+			T[] array = new T[(long)nint];
+			for (nint nint2 = 0; nint2 < nint; ++nint2)
+			{
+				array[(long)nint2] = UnsafeGetItem<T>(P_0, nint2);
+			}
+			return array;
+		}
 	}
 	public struct CFRange
 	{
```
2021-08-12 14:19:25 -04:00
Rolf Bjarne Kvinge 987d8dff85
[dotnet] Fix exclusion of mono components. (#12421)
'_MonoRuntimePackPath' already contains a trailing slash, so adding another
one made two, and that was too much for MSBuild to realize that it was really
the same file as the one with only one slash in the path, and those files
weren't removed from the build correctly.
2021-08-12 17:15:08 +02:00
Peter Collins ddb699426a
[ci] Sign .NET 6 VS Hot Restart content (#12400)
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=5074495&view=logs&j=f8a716f9-5318-5935-19a4-149a64409b96&t=773a1aad-99f2-5f0b-eafa-0deb88171543
Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1366309
Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1366310

Commit 9dbf451d added files required to support Hot Restart in .NET 6
packages, however it did not update SignList.xml to also include these
new file additions.  This caused .nupkg signing issues:

    C:\a\_temp\artifact-signing\SignFiles.proj(66,5): error : Unknown assemblies:
    C:\a\_temp\artifact-signing\SignFiles.proj(66,5): error :     C:\a\_temp\artifact-signing\extracted\Microsoft.iOS.Windows.Sdk.15.0.100-ci.main.446\tools\msbuild\iOS\BouncyCastle.Crypto.dll;
    C:\a\_temp\artifact-signing\SignFiles.proj(66,5): error :     C:\a\_temp\artifact-signing\extracted\Microsoft.iOS.Windows.Sdk.15.0.100-ci.main.446\tools\msbuild\iOS\imobiledevice-x64\bz2.dll;
    C:\a\_temp\artifact-signing\SignFiles.proj(66,5): error :     C:\a\_temp\artifact-signing\extracted\Microsoft.iOS.Windows.Sdk.15.0.100-ci.main.446\tools\msbuild\iOS\imobiledevice-x64\getopt.dll;
    C:\a\_temp\artifact-signing\SignFiles.proj(66,5): error :     C:\a\_temp\artifact-signing\extracted\Microsoft.iOS.Windows.Sdk.15.0.100-ci.main.446\tools\msbuild\iOS\imobiledevice-x64\ideviceactivation.dll;
    ...

Fix signing by listing all new content that should be skipped or signed
with first/third party certs.

Additionally, content in nested .zip files also needs to be signed. I've
added a couple of targets to SignList.targets to unzip and rezip these
files before and after individual file signing runs.
2021-08-12 16:40:10 +02:00
Rolf Bjarne Kvinge ae41d77d5a
[msbuild] Show a message in the ParseBundlerArguments task if we run into an argument we don't understand. (#12412)
It makes typos much easier to find.
2021-08-12 15:03:24 +02:00
Rolf Bjarne Kvinge aee4cc0f0c
[msbuild] Promote '_PartialAppManifest' to a public item group ('PartialAppManifest'). Fixes #10646. (#12417)
* A couple of other changes to make sure we never overwrite the
  PartialAppManifest item group (as opposed to adding to it).
* Add tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/10646.
2021-08-12 15:03:11 +02:00
Rolf Bjarne Kvinge ef6793fbca
[src] Use [NoMacCatalyst] everywhere. (#12407) 2021-08-12 07:41:10 +02:00
Sebastien Pouliot 1c937ac39b
[tests][monotouch-test] Re-enable registrar test for conformsToProtocol for dotnet (#12411)
This works fine now. I'm fairly sure this was fixed when the the last
custom steps of the linker were ported for dotnet illink

Fix https://github.com/xamarin/xamarin-macios/issues/11540
2021-08-11 20:16:01 -04:00
Sebastien Pouliot 0a88e5964c
[tests][intro] Fix introspection when running on MacCatalyst 15 (macOS12) (#12403) 2021-08-11 20:05:13 -04:00
Sebastien Pouliot cc3b88c2ed
[tests][linker] Re-enable the metadata reducer test case for dotnet (#12404)
It's been enabled (on dotnet side) for a while, even in debug.

Fix https://github.com/xamarin/xamarin-macios/issues/9612
2021-08-11 14:52:35 -04:00
Rolf Bjarne Kvinge 2972e1b715
Fix some whitespace issues in various files. (#12399)
* Remove BOM
* Add EOL at end of file.
2021-08-11 10:06:46 +02:00
Rolf Bjarne Kvinge 46afe81149
[dotnet] Add support for 'dotnet publish'. Fixes #11807. (#12397)
* Add support for 'dotnet publish'.
* Add support for a 'PkgPackagePath' for macOS and Mac Catalyst, an MSBuild
  property to specify the resulting .pkg path, to reflect the existing
  'IpaPackagePath' (for iOS and tvOS).
* Fix MSBuild logic that uses 'IpaPackagePath'. Looks like nobody has ever
  used this...
* Add tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/11807.
2021-08-11 10:01:16 +02:00
Rolf Bjarne Kvinge 104ab12bdd
[dotnet/msbuild] Fix publishing user frameworks and dynamic libraries from binding projects. (#12396)
We extract frameworks from third-party libraries when running the linker, and
we need to store this information on disk and the reload it after the linker
has executed, and add it to the existing MSBuild variables that keep track of
the user frameworks and dynamic libraries that have to be copied to the app
bundle.

Fixes the framework-test tests.
2021-08-11 09:58:00 +02:00
Rolf Bjarne Kvinge 5b23ea83b1
[monotouch-test] Use unique file names to avoid issues when multiple proceseses of monotouch-test are running simultaneously. Fixes #xamarin/maccore@2461. (#12395)
Fixes https://github.com/xamarin/maccore/issues/2461.
2021-08-11 09:52:02 +02:00
Rolf Bjarne Kvinge 5e35f80677
[src] Define __MACOS__ for macOS builds. (#12385)
This also meant I had to remove Obsolete attributes when there's an existing
Obsoleted attribute.

For .NET we'll generate an Obsolete attribute from any Obsoleted attribute,
and if there already are any Obsolete attributes as well, then this happens:

    build/dotnet/macos/generated-sources/Intents/INCallCapability.g.cs(49,3): error CS0579: Duplicate 'Obsolete' attribute
    build/dotnet/macos/generated-sources/Intents/INCallCapabilityOptions.g.cs(50,3): error CS0579: Duplicate 'Obsolete' attribute
    build/dotnet/macos/generated-sources/Intents/INCallDestinationType.g.cs(50,3): error CS0579: Duplicate 'Obsolete' attribute
    build/dotnet/macos/generated-sources/Intents/INCallRecordTypeOptions.g.cs(50,3): error CS0579: Duplicate 'Obsolete' attribute
    [...]

So avoid this by removing any Obsolete attributes when there's also an
Obsoleted attribute.
2021-08-11 09:49:18 +02:00
Manuel de la Pena 0d5d94da41
[OSLog] Add support for xcode13 beta4. (#12392) 2021-08-10 23:12:16 -04:00
Sebastien Pouliot 32e1381ee1
[src] Ensure complete (error) coverage for nullability warnings (#12401)
Use the _recent_ [1] `nullable` to ensure we treat all nullable warnings
as errors. That list can (and has) change[d] over time...

Fix one case, `CVTime`, that was (only) a warning in our build.

Also fix `Makefile` so we are not giving the `warnaserror` for nullable
to the generator. It does not use them (different codes) and does not
accept string values (which breaks the build). IOW it's the generated
code that must be nullable-aware, not the input to the generator.

[1] https://github.com/dotnet/roslyn/issues/41605
2021-08-10 17:38:28 -04:00
Sebastien Pouliot a20d417bf7
[dotnet][linker] Enable the sealer optimization (#12009)
when (by default)
* the interpreter is not enabled (since new code might subclass or override the members analyzed at build time)
* building for release

Reverts c56b893b68
Fix https://github.com/xamarin/xamarin-macios/issues/9573

Notes

* Even if possible (in metadata) there is no point in setting `final` on
a method if we remove `virtual`. This match ILLink version of the sealer
and makes the same test pass on both.

* Don't apply optimization on non-AOT builds, e.g. simulators, since some
features (like XML serialization) checks for
`RuntimeFeature.IsDynamicCodeSupported` and that requires some types
to be subclassed thru SRE
2021-08-10 16:01:30 -04:00
Sebastien Pouliot 300fc28360
[msbuild] Set `UseSecureTimestamp` inside `_CodesignFrameworks` too (#12387)
That's needed for Xamarin.Mac and was _lost_ when the task was merged
between XI and XM.

Fixes https://github.com/xamarin/xamarin-macios/issues/11784
2021-08-10 10:39:08 -04:00
Manuel de la Pena 687b3b9d08
[SystemConfiguration] Add support for xcode13 beta4. (#12393) 2021-08-10 10:16:05 -04:00
Manuel de la Pena c5573db360
[OpenGL] Add support for xcode 13 beta4. (#12394) 2021-08-10 10:15:34 -04:00
Rolf Bjarne Kvinge 9273704267
[xtro] Ignore Obsoleted enums in EnumCheck. (#12390)
Treat [Obsoleted] enums as [Obsolete] enums: ignore them. This makes it
possible to remove a few ignored entries.
2021-08-10 13:40:25 +02:00
Rolf Bjarne Kvinge 7b286adb47
[tests] Add a .NET version of framework-test to our test list. (#12373) 2021-08-10 07:40:00 +02:00
Rolf Bjarne Kvinge 15ace257ab
[msbuild] Delete any Mono crash dump files in the root app bundle before codesigning. Fixes #12320. (#12332)
This is what happens:

1. Mono will write crash dumps in the current directory:
   57bfe47451/src/mono/mono/utils/mono-state.c (L302-L322)
2. The current directory is by default the root of the app bundle.
3. If there are any files in the root of the app bundle for macOS or Mac
   Catalyst, 'codesign' will fail ("unsealed contents present in the bundle
   root").

This leads to the following sequence of events:

1. App developer builds & runs a Mac Catalyst app.
2. The app crashes for some reason.
3. Mono creates a crash dump (in the root directory of the app bundle).
4. The app developer changes something in the project and tries again.
5. The build fails, because 'codesign' fails.

Avoid this by deleting any crash dump files from the root of the app bundle
before signing the app.
2021-08-10 07:39:00 +02:00
VS MobileTools Engineering Service 2 7dc6c9cffd
Localized file check-in by OneLocBuild Task (#12380) 2021-08-09 23:23:55 -04:00
Manuel de la Pena ae77aed7e8
[Security] Add Xcode 13 beta 4 support. (#12365) 2021-08-09 21:30:14 -04:00
Sebastien Pouliot 9307052231
[objcruntime] Enable nullable on `ErrorHelper` and `RuntimeException` (#12377)
also avoid intermediate/chained calls to help the linker eliminate
some methods
2021-08-09 10:36:56 -04:00
Sebastien Pouliot cffd57d681
[cecil] Update all package references to the latest 0.11.4 (#12379) 2021-08-09 10:18:16 -04:00
Rolf Bjarne Kvinge 6232edc9ed
[monotouch-test] Ignore ReadingListTest.DefaultReadingList. (#12383)
This test adds entries to the global reading list in Safari, and there's no
API for the test to clean up after itself, so the reading list becomes an
endless list of entries after a whlie.

Beside the fact that this is somewhat annoying for people who actually use
their reading lists, it can also can end up consuming a significant amount of
space on the hard drive, because Safari will download each site to be
available offline.
2021-08-09 14:51:44 +02:00
Rolf Bjarne Kvinge d7a4d894d8
[msbuild] Fix the inclusion of the mtouch errors in the Xamarin.MacDev.Tasks.Core assembly. (#12360)
Otherwise we'll end up showing a MissingManifestResourceException whenever we
try to show any of the mtouch errors from the msbuild targets.
2021-08-09 14:43:22 +02:00
Rolf Bjarne Kvinge baaa08eb00
[tests] Fix typo in error message. (#12370) 2021-08-09 09:49:51 +02:00
Rolf Bjarne Kvinge 4371133cf7
[dotnet] Remove workaround for private symbols for AOT. (#12334)
* [dotnet] Remove workaround for private symbols for AOT.

* [tools] Make Application.AotArguments a list of string.

This is just a simple refactoring to make Application.AotArguments a list of
strings instead of a comma-separated list of values.

* [tools] Only use direct-icalls when linking mono statically.

Ref: https://github.com/dotnet/runtime/issues/55000

* [mtouch] Fix aot arguments comparison.

* [tests] Adjust mtouch test according to mtouch changes.

* [tests] Add minimum OS version to the Mac Catalyst variation of the MySimpleApp test case.
2021-08-09 09:45:58 +02:00
Sebastien Pouliot ecad9d9667
[tests][intro] Fix Phase tests on macOS 12 and iOS devices (#12376)
It's a `Phase` vs `PHASE` lookup that make the tests checking for
fields fail.

```
FieldExists: 3 errors found in 6603 fields validated: PHASESpatialCategoryDirectPathTransmission, PHASESpatialCategoryEarlyReflections, PHASESpatialCategoryLateReverb
```
2021-08-06 16:28:04 -04:00
Manuel de la Pena 1330597435
[NearbyInteraction] Convert spaces to tabs. (#12364) 2021-08-06 15:18:19 -04:00
Rachel Kang e45969fb08
Merge pull request #12337 from rachelkang/xcode13.0-quicklook-b1-b2-b3-b4
[QuickLook] Update bindings for Xcode 13.0 beta 1,2,3,4
2021-08-06 12:27:08 -04:00
Sebastien Pouliot 22ccf2e81b
[generator] Use new `CFArray.StringArrayFromHandle` instead of the existing `NSArray` API (#12368)
This is another example that p/invokes are much faster than calling
selectors.

Beside the generator the manual bindings were updated to use the newer
API and the old one was decorated as `[Obsolete]`.

|                        Method |          name |                value |            Mean |           Error |        StdDev |
|------------------------------ |-------------- |--------------------- |----------------:|----------------:|--------------:|
| CFArray_StringArrayFromHandle |         empty |                   () |        123.9 ns |        68.92 ns |       3.78 ns |
| NSArray_StringArrayFromHandle |         empty |                   () |      1,422.6 ns |        25.83 ns |       1.42 ns |
| CFArray_StringArrayFromHandle |           few |    (  (...).") [108] |      1,885.2 ns |        46.37 ns |       2.54 ns |
| NSArray_StringArrayFromHandle |           few |    (  (...).") [108] |      8,530.0 ns |       594.40 ns |      32.58 ns |
| CFArray_StringArrayFromHandle | large_mutable |    ((...)) [8419330] | 15,821,101.0 ns | 4,803,631.19 ns | 263,303.23 ns |
| NSArray_StringArrayFromHandle | large_mutable |    ((...)) [8419330] | 22,823,871.9 ns | 6,589,380.43 ns | 361,186.18 ns |
| CFArray_StringArrayFromHandle |       mutable |   (   (...)9e") [54] |        867.4 ns |        59.23 ns |       3.25 ns |
| NSArray_StringArrayFromHandle |       mutable |   (   (...)9e") [54] |      4,939.6 ns |       203.28 ns |      11.14 ns |

note: `NSArray.StringArrayFromHandle` was already using (p/invoke-based)
`CFString.FromHandle` instead of (selector-based) `NSString.FromHandle`
to create the managed `string` instances inside the `string[]`.
2021-08-06 09:17:48 -04:00
Emanuel Fernandez Dell'Oca 78cc290613
[net6] Fixes LinkNativeCode task execution from Windows (#12367)
This is an improvement on how we detect if the file that is going to be copied to the Mac is coming from the output path or not. Copying files from the Windows output dir to the Mac will make the build fail.

There were two problems:
- The paths we were comparing could contain different path separators.
- The item we are trying to copy may be in a folder that is inside the output dir.

For example:
- OutputFile = `obj\Debug\net6.0-ios\iossimulator-x64\nativelibraries/Foo`
- Item to copy: `obj/Debug/net6.0-ios/iossimulator-x64/nativelibraries/aot-output/x86_64/System.Private.CoreLib.dll.o`
2021-08-06 10:45:09 +02:00