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

11036 Коммитов

Автор SHA1 Сообщение Дата
TJ Lambert 4fd6faf780
Changing Cron Job (#12032)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2021-06-28 17:51:42 -04:00
TJ Lambert 32402490b6
[GameController] Updates for Xcode13 beta1 (#12014)
* Initial changes for xcode13 GameController beta1

* syntax and name change

* name change and adding async

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2021-06-28 10:37:42 -05:00
TJ Lambert a134a75f9e
[Localization] Change the Input value (#12029)
* changing the isCreatePrSelected input

* remove the variable representation

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2021-06-28 10:36:36 -05:00
Rolf Bjarne Kvinge 870ffa0117
[dotnet] Use TargetDir instead of OutputPath for resolving assembly output directory. (#12021)
OutputPath is relative to the project directory, so it doesn't work when the
current directory isn't the same as the project directory.

TargetDir is an absolute directory.

Ref: #11994 / 096c75f425 (same for Mac Catalyst).
2021-06-28 14:05:09 +02:00
dotnet-maestro[bot] 761566f583
[main] Update dependencies from dotnet/installer (#11852)
* Update dependencies from https://github.com/dotnet/installer build 20210606.2

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.6.21306.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21304.2 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.6.21313.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21304.2 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.6.21315.23

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21304.2 (parent: Microsoft.Dotnet.Sdk.Internal

* Fix custom step order

In response to https://github.com/mono/linker/pull/2082

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.7.21320.4

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21317.4 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.7.21321.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21317.4 (parent: Microsoft.Dotnet.Sdk.Internal

* Remove unnecessary workaround.

* [dotnet] Update our code to get the path to the AOT compiler. Fixes #11905.

* [dotnet] Remove another workaround for runtime packs doing the wrong thing.

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.7.21322.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21321.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.7.21322.8

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21321.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.7.21323.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21321.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.7.21323.11

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21321.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.7.21324.6

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21321.1 (parent: Microsoft.Dotnet.Sdk.Internal

* [dotnet] Install the microsoft-net-runtime-maccatalyst workload as well.

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.7.21325.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21321.1 (parent: Microsoft.Dotnet.Sdk.Internal

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

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21280.2 -> To Version 6.0.100-preview.7.21326.4

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21277.2 -> To Version 6.0.100-preview.6.21322.1 (parent: Microsoft.Dotnet.Sdk.Internal

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Sven Boemer <sbomer@gmail.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-06-28 13:58:33 +02:00
TJ Lambert b1e8b29fd6
Adding enums (#12010)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2021-06-25 10:33:39 -05:00
Rolf Bjarne Kvinge d8ee4d202e
[src] Remove the internal NSObject.SetAsProxy, and call the NSObject.IsDirectBinding setter directly. (#12020)
NSObject.SetAsProxy is only available for macOS, so this makes the generated
code behave (and actually work) on all platforms.
2021-06-25 16:55:41 +02:00
Rolf Bjarne Kvinge fe1b2386bd
[dotnet] Fix launching macOS and Mac Catalyst apps with arguments. (#12019)
When we're using 'open' to launch apps, we need to use '--args ...' to pass any additional argument to the app, because otherwise 'open' will try to open those arguments as if they were files:

```
$ open "/Applications/Sublime Text.app" helloworld
The file /Users/rolf/test/helloworld does not exist.
```

(and doesn't launch Sublime Text).

while this works:

```
$ open "/Applications/Sublime Text.app" --args helloworld
```

in that it opens Sublime Text.

It's also possible to not append any other arguments, so this:

```
$ open "/Applications/Sublime Text.app" --args
```

while it looks weird, it works just fine.

Ref: https://github.com/dotnet/sdk/issues/18437
2021-06-25 16:53:13 +02:00
Jonathan Peppers 69698bea36
[dotnet] use copyOnly for .png files in templates (#12016)
Context: https://github.com/dotnet/templating/issues/3325
Context: https://github.com/dotnet/templating/wiki/Reference-for-template.json#content-manipulation

In current .NET 6 Preview 6 builds, there is an issue if a template
includes a binary file larger than ~8kb, it seems to get truncated when
`dotnet new` extracts the template.

A workaround is to use the `copyOnly` feature for binary files. Really,
we should be doing this anyway, because otherwise the templating system
considers replacing *text* in these binary files. It improves
performance to do this and would hopefully prevent a future bug of
random bytes getting replaced.
2021-06-25 08:18:56 +02:00
Rolf Bjarne Kvinge 4914136930
[tools/tests] Fix units in logging message. (#12005) 2021-06-24 08:39:22 +02:00
TJ Lambert 7130a5a0b1
initial changes for Xcode13 UniformTypeIdentifiers Beta1 (#12008)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2021-06-23 16:27:51 -05:00
TJ Lambert c4d5433a63
[VideoSubscriberAccount] Updates for Xcode13 Beta 1 (#11977)
* initial changes

* removing maccatalyst from the sources

* adding issue link

* getting closer, I think

* adding ignore

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2021-06-23 12:55:08 -05:00
Manuel de la Pena 1f84aaa9b4
[CoreSpotlight] Add Xcode13 beta1 support. (#11986) 2021-06-23 11:45:40 -04:00
Sebastien Pouliot 7b934c811c
[objcruntime] Refactor `Dlfcn.dlopen` to ease linking (#12002)
* Skip extraneous logic for generated entries where we know the full path is available
  * Update generator to use the internal `_dlopen` that skips the checks
  * This removes the code below (diff) for a simple application

* Use the linker substitution files to remove the warning on release builds
  * If `dlopen` is used then `WarnOnce` method becomes a empty stub and
  * field `warningShown` is also removed

```diff
--- a.cs	2021-06-22 20:59:25.000000000 -0400
+++ b.cs	2021-06-22 20:59:28.000000000 -0400
@@ -2023,44 +2023,14 @@
 	{
 		public static class System
 		{
-			public static readonly IntPtr Handle = Dlfcn.dlopen("/usr/lib/libSystem.dylib", 0);
+			public static readonly IntPtr Handle = Dlfcn._dlopen("/usr/lib/libSystem.dylib", 0);
 		}
 	}
 	public static class Dlfcn
 	{
-		private static bool warningShown;
-
 		[DllImport("/usr/lib/libSystem.dylib", EntryPoint = "dlopen")]
 		internal static extern IntPtr _dlopen(string P_0, int P_1);

-		public static IntPtr dlopen(string P_0, int P_1)
-		{
-			return dlopen(P_0, P_1, true);
-		}
-
-		internal static IntPtr dlopen(string P_0, int P_1, bool P_2)
-		{
-			IntPtr intPtr = _dlopen(P_0, P_1);
-			if (intPtr != IntPtr.Zero)
-			{
-				return intPtr;
-			}
-			if (P_0.IndexOf('/') == -1)
-			{
-				if (!warningShown && P_2)
-				{
-					Runtime.NSLog("You are using dlopen without a full path, retrying by prepending /usr/lib");
-					warningShown = true;
-				}
-				intPtr = _dlopen("/usr/lib/" + P_0, P_1);
-				if (intPtr != IntPtr.Zero)
-				{
-					return intPtr;
-				}
-			}
-			return IntPtr.Zero;
-		}
-
 		[DllImport("/usr/lib/libSystem.dylib")]
 		public static extern IntPtr dlsym(IntPtr P_0, string P_1);
 	}
```

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
2021-06-23 09:13:42 -04:00
Yusuke Yamada 096c75f425
[dotnet] Normalize run target assembly path on the Run target for Mac Catalyst (#11994)
* [dotnet] Normalize run target assembly path on the Run target for Mac Catalyst

* Use TargetPath instead of OutputPath for resolving assembly output directory
2021-06-23 14:40:28 +02:00
Manuel de la Pena d11852e02c
[CoreVideo] Add support for Xcode13 beta 1. (#11997)
Added new APIs from Xcode13, add missing ones that have been added in
catalyst and enabled nullable in the manual code.
2021-06-22 21:52:07 -04:00
TJ Lambert 6898920c72
[PDFKit] Updating Xcode13 Beta 1 (#11987)
* Initial changes xcode13 PDFKit beta 1

* adding to PdfDocumentWriteOptionKeys

* adding availability

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2021-06-22 10:58:32 -05:00
Manuel de la Pena 0e07b989bd
[CoreText] Add support for Xcode13 beta1. (#11993) 2021-06-22 11:50:56 -04:00
TJ Lambert 621aaef776
[PhotosUI] Xcode13 PhotosUI beta1 (#11945)
* initial changes for Xcode13 PhotosUI beta1

* fixing syntax and types

* forgot this header

* removing advice and adding unavailable MacCatalyst

* adding ignore file to pass xtro

* adding async

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2021-06-22 09:32:31 -05:00
Rolf Bjarne Kvinge 5417f2e338
[dotnet] Only limit the default inclusion items with a condition on 'EnableDefault<Platform>Items'. Fixes #11990. (#11991)
* This is the way Android does it:
  15b40af7d6/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props (L23)
* Makes it easier for the default inclusion logic to be used by
  Xamarin.Legacy.Sdk (as explained in the fixed issue).

Fixes https://github.com/xamarin/xamarin-macios/issues/11990.
2021-06-22 15:52:50 +02:00
Manuel de la Pena 6ce5f80cb7
[CI] Fix typo (#11995)
Lets make my 1000 commit a typos fix!
2021-06-21 17:24:43 -04:00
Manuel de la Pena cafea99339
Bump VSMac to use the stable release. (#11992) 2021-06-21 16:36:38 -04:00
Manuel de la Pena c778e6be3b
[CoreLocationUI] Add new framework for Xcode13 beta1. (#11979) 2021-06-21 12:10:13 -04:00
Rolf Bjarne Kvinge 6b78a86849
Bump min watchOS simulator to 6.0. (#11981)
* Bump min watchOS simulator to 6.0.

Fixes https://github.com/xamarin/maccore/issues/2454.

* Try to keep using the iOS 12 simulator for watchOS 8.0

* [introspection] Fix running on watchOS 6.0.

* [AVFoundation] Adjust availability of AVPlayerWaitingDuringInterstitialEventReason.
2021-06-21 07:42:58 +02:00
Manuel de la Pena 4bc32a94ec
[CoreLocation] Add xcode13 beta 1 support. (#11965) 2021-06-18 14:05:43 -04:00
Manuel de la Pena 8d2d06b843
[CFNetwork] Add Xcode13 beta 1 support. (#11966) 2021-06-18 14:04:37 -04:00
Sebastien Pouliot 3590070f6b
Revert "[tests] Preserve a required method in System.Private.CoreLib to work around a bug in .NET 6. (#10426)" (#11974)
This reverts commit 29727d6a8d.

https://github.com/dotnet/runtime/issues/46908 was fixed and the other part of the workaround was removed in PR#11958
2021-06-18 13:10:48 -04:00
Rolf Bjarne Kvinge aaf8d70573
[tests] Add/fix makefiles for .NET projects (#11982)
Add and fix makefiles for .NET test projects to make them easy to test from
the command line.
2021-06-18 18:26:33 +02:00
Sebastien Pouliot 785bbbe481
[tests][dotnet] Clear packages before building test apps (#11978)
to make sure the latest locally build nuget are used

Also document `make strip-dotnet` as a time-saver to analyze the binary
assemblies produced for dotnet
2021-06-18 09:33:08 -04:00
Sebastien Pouliot 91e47f2eef
[corefoundation] Enable nullability on `CFString` and `NativeObject` (#11980)
then fix the impact this had on existing nullable-aware code,
including the generator

Also
* Hide `CFObject` empty (of public members) for future profiles
* Fix `CFString.ToString ()` to never return `null`
2021-06-18 09:18:57 -04:00
Rolf Bjarne Kvinge 5275220e71
[CI] Sign *.nupkg too. Fixes #11952. (#11976)
This required reordering operations a bit, so that we can sign before publishing.

Fixes https://github.com/xamarin/xamarin-macios/issues/11952.
2021-06-18 09:08:34 +02:00
Sebastien Pouliot b4dcee199b
Revert "[tests][monotouch-test] Ignore NSTimeZoneTest / All_28300 on dotnet as it hangs" (#11975)
This reverts commit 5fdd4e2dec.
2021-06-17 20:53:26 -04:00
Sebastien Pouliot abca8f1aec
[uikit] Simplify and fix (NRE) in `UIApplication` (#11964)
* `#enable nullable`

and add null-check for potentially `null` `args` parameter on `Main`
methods(s).

* Avoiding calls chaining

There were 4 `Main` overloads, 3 of them needed for the most simple app.
There's now only one needed.

* Obsolete the overload with `string` parameters

It's not type safe. It also makes it harder for the linker to mark the
app delegate type.

* Avoid creating `NSString` instances inside `Main` methods

`CFString` are cheaper, no initialization, simpler calling convention.
This also remove any trace of `NSString` in very simple apps, see below:

```diff
--- a.cs	2021-06-16 21:41:04.000000000 -0400
+++ b.cs	2021-06-16 21:41:06.000000000 -0400
@@ -3025,9 +3025,6 @@
 		public static extern nuint nuint_objc_msgSendSuper(IntPtr P_0, IntPtr P_1);

 		[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")]
-		public static extern IntPtr IntPtr_objc_msgSend_IntPtr_IntPtr(IntPtr P_0, IntPtr P_1, IntPtr P_2, IntPtr P_3);
-
-		[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")]
 		[return: MarshalAs(UnmanagedType.I1)]
 		public static extern bool bool_objc_msgSend_IntPtr(IntPtr P_0, IntPtr P_1, IntPtr P_2);

@@ -3045,9 +3042,6 @@
 		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 long Int64_objc_msgSend_IntPtr(IntPtr P_0, IntPtr P_1, IntPtr 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")]
@@ -3129,30 +3123,14 @@
 			}
 		}

-		public static void Main(string[] P_0, string P_1, string P_2)
-		{
-			IntPtr intPtr = NSString.CreateNative(P_1);
-			IntPtr intPtr2 = NSString.CreateNative(P_2);
-			try
-			{
-				Main(P_0, intPtr, intPtr2);
-			}
-			finally
-			{
-				NSString.ReleaseNative(intPtr2);
-				NSString.ReleaseNative(intPtr);
-			}
-		}
-
 		public static void Main(string[] P_0, Type P_1, Type P_2)
 		{
-			Main(P_0, (P_1 == null) ? null : new Class(P_1).Name, (P_2 == null) ? null : new Class(P_2).Name);
-		}
-
-		private static void Main(string[] P_0, IntPtr P_1, IntPtr P_2)
-		{
+			IntPtr intPtr = (P_1 == null) ? IntPtr.Zero : CFString.CreateNative(new Class(P_1).Name);
+			IntPtr intPtr2 = (P_2 == null) ? IntPtr.Zero : CFString.CreateNative(new Class(P_2).Name);
 			Initialize();
-			UIApplicationMain(P_0.Length, P_0, P_1, P_2);
+			UIApplicationMain((P_0 != null) ? P_0.Length : 0, P_0, intPtr, intPtr2);
+			CFString.ReleaseNative(intPtr2);
+			CFString.ReleaseNative(intPtr);
 		}

 		protected internal UIApplication(IntPtr P_0)
@@ -3731,161 +3709,6 @@
 		{
 		}
 	}
-	[DefaultMember("Item")]
-	[Register("NSString", true)]
-	public class NSString : NSObject, IComparable<NSString>, INativeObject, IDisposable
-	{
-		public static readonly NSString Empty = new NSString(string.Empty);
-
-		private static readonly IntPtr class_ptr = Class.GetHandle("NSString");
-
-		public override IntPtr ClassHandle => class_ptr;
-
-		public int CompareTo(NSString P_0)
-		{
-			return (int)Compare(P_0);
-		}
-
-		private unsafe static IntPtr CreateWithCharacters(IntPtr P_0, string P_1, int P_2, int P_3, bool P_4 = false)
-		{
-			IntPtr intPtr;
-			if (P_1 == null)
-			{
-				intPtr = (IntPtr)(void*)null;
-			}
-			else
-			{
-				pinnableReference = ref P_1.GetPinnableReference();
-				intPtr = (IntPtr)(&pinnableReference);
-			}
-			IntPtr intPtr2 = (IntPtr)(void*)((long)intPtr + (long)(IntPtr)(void*)((long)P_2 * 2L));
-			P_0 = Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr(P_0, Selector.GetHandle("initWithCharacters:length:"), intPtr2, (IntPtr)P_3);
-			if (P_4)
-			{
-				NSObject.DangerousAutorelease(P_0);
-			}
-			return P_0;
-		}
-
-		public static IntPtr CreateNative(string P_0)
-		{
-			return CreateNative(P_0, false);
-		}
-
-		public static IntPtr CreateNative(string P_0, bool P_1)
-		{
-			if (P_0 == null)
-			{
-				return IntPtr.Zero;
-			}
-			return CreateNative(P_0, 0, P_0.Length, P_1);
-		}
-
-		public static IntPtr CreateNative(string P_0, int P_1, int P_2, bool P_3)
-		{
-			if (P_0 == null)
-			{
-				return IntPtr.Zero;
-			}
-			if (P_1 < 0 || P_1 > P_0.Length)
-			{
-				throw new ArgumentOutOfRangeException("start");
-			}
-			if (P_2 < 0 || P_1 > P_0.Length - P_2)
-			{
-				throw new ArgumentOutOfRangeException("length");
-			}
-			return CreateWithCharacters(Messaging.IntPtr_objc_msgSend(class_ptr, Selector.GetHandle("alloc")), P_0, P_1, P_2, P_3);
-		}
-
-		public static void ReleaseNative(IntPtr P_0)
-		{
-			NSObject.DangerousRelease(P_0);
-		}
-
-		public NSString(string P_0)
-		{
-			if (P_0 == null)
-			{
-				throw new ArgumentNullException("str");
-			}
-			base.Handle = CreateWithCharacters(base.Handle, P_0, 0, P_0.Length);
-		}
-
-		public override string ToString()
-		{
-			return FromHandle(base.Handle);
-		}
-
-		public static string FromHandle(IntPtr P_0)
-		{
-			return FromHandle(P_0, false);
-		}
-
-		public static string FromHandle(IntPtr P_0, bool P_1)
-		{
-			if (P_0 == IntPtr.Zero)
-			{
-				return null;
-			}
-			try
-			{
-				return Marshal.PtrToStringAuto(Messaging.IntPtr_objc_msgSend(P_0, Selector.GetHandle("UTF8String")));
-			}
-			finally
-			{
-				if (P_1)
-				{
-					NSObject.DangerousRelease(P_0);
-				}
-			}
-		}
-
-		public static bool Equals(NSString P_0, NSString P_1)
-		{
-			if (P_0 == P_1)
-			{
-				return true;
-			}
-			if (P_0 == null || P_1 == null)
-			{
-				return false;
-			}
-			if (P_0.Handle == P_1.Handle)
-			{
-				return true;
-			}
-			return P_0.IsEqualTo(P_1.Handle);
-		}
-
-		public override bool Equals(object P_0)
-		{
-			return Equals(this, P_0 as NSString);
-		}
-
-		public override int GetHashCode()
-		{
-			return base.GetHashCode();
-		}
-
-		protected internal NSString(IntPtr P_0)
-			: base(P_0)
-		{
-		}
-
-		[Export("compare:")]
-		public virtual NSComparisonResult Compare(NSString P_0)
-		{
-			IntPtr nonNullHandle = NativeObjectExtensions.GetNonNullHandle(P_0, "aString");
-			_ = 8;
-			return (NSComparisonResult)Messaging.Int64_objc_msgSend_IntPtr(base.Handle, Selector.GetHandle("compare:"), nonNullHandle);
-		}
-
-		public bool IsEqualTo(IntPtr P_0)
-		{
-			return Messaging.bool_objc_msgSend_IntPtr(base.Handle, Selector.GetHandle("isEqualToString:"), P_0);
-		}
-	}
 	[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property)]
 	public class ExportAttribute : Attribute
 	{
@@ -4388,19 +4211,6 @@
 			return false;
 		}

-		internal static void DangerousRelease(IntPtr P_0)
-		{
-			if (!(P_0 == IntPtr.Zero))
-			{
-				Messaging.void_objc_msgSend(P_0, Selector.GetHandle("release"));
-			}
-		}
-
-		internal static void DangerousAutorelease(IntPtr P_0)
-		{
-			Messaging.void_objc_msgSend(P_0, Selector.GetHandle("autorelease"));
-		}
-
 		public NSObject DangerousRetain()
 		{
 			Messaging.void_objc_msgSend(handle, Selector.GetHandle("retain"));
@@ -4647,13 +4457,6 @@
 			is_wrapper = P_1;
 		}
 	}
-	[Native]
-	public enum NSComparisonResult : long
-	{
-		Ascending = -1L,
-		Same,
-		Descending
-	}
 	[Register("NSException", true)]
 	public class NSException : NSObject, INativeObject, IDisposable
 	{
```
2021-06-17 17:13:06 -04:00
Manuel de la Pena 85ce924296
[CoreHaptics] Add support for Xcode13 beta1. (#11963) 2021-06-17 15:15:07 -04:00
Manuel de la Pena 0ecf405464
[CoreMotion] Add Xcode13 beta1 support. (#11968) 2021-06-17 15:08:27 -04:00
Rolf Bjarne Kvinge 8766976b49
Remove the option of disabling the windows-specific part of the .NET build. (#11971)
* Having .NET enabled with the windows-specific parts disabled is not a
  scenario tested on CI (where we've always enabled both). This means it's
  prone to bitrotting.
* It's another configuration to keep track of and make work locally.
* It doesn't work right now anyway.

So just always enable the windows-specific parts of the .NET build, if the
.NET build is enabled.
2021-06-17 19:55:55 +02:00
Rolf Bjarne Kvinge 0c1c1a7bff
[tools] Fix quoting quotes in StringUtils.QuoteForProcess. (#11949)
* [tools] Fix quoting quotes in StringUtils.QuoteForProcess.

Previously quoting a string with a quote:

    a"b

would result in:

    "a\"""b"

There are way too many quotes there.

We'll now get:

    "a\"b"

which is correct.

* Add unit test.
2021-06-17 18:23:59 +02:00
Manuel de la Pena 242b8895c9
[CoreML] Add support for Xcode13 beta 1. (#11967) 2021-06-17 11:03:34 -04:00
Manuel de la Pena fc46335c32
[CI] Use the same status as the tests so that we do not have pending stauses. (#11969) 2021-06-17 10:59:56 -04:00
Rolf Bjarne Kvinge 32a62c0030
[msbuild] Treat extension-less files as static libraries when linking native code. Fixes #11954. (#11959)
Fixes https://github.com/xamarin/xamarin-macios/issues/11954.
2021-06-17 15:58:43 +02:00
Rolf Bjarne Kvinge 9278ee1610
[monotouch-tests] Use a LinkDescription item to specify extra linker description files (#11948)
* It's easier to fix up the path to the linker description in xharness when
  cloning project files. This way maybe we'll be able to remove the [hardcoded
  logic in xharness][1] to handle ${ProjectDir}.
* .NET doesn't understand the ${ProjectDir} syntax, so this makes it possible
  to build these projects from the command line.

[1]: b2297d610d/src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/ProjectFileExtensions.cs (L1268)
2021-06-17 09:02:21 +02:00
Manuel de la Pena aed792397c
[CloudKit] Add support for Xcode13 beta1. (#11961) 2021-06-16 21:26:56 -04:00
Manuel de la Pena b2cb149d2d
[Contacts] Add support for Xcode13 beta1. (#11962) 2021-06-16 21:26:26 -04:00
Sebastien Pouliot f5896c1414
[dotnet] Change default http handler to NSUrlSessionHandler (#11956)
Also allow `SocketsHttpHandler` on dotnet
2021-06-16 19:50:09 -04:00
Sebastien Pouliot 643cb41436
[tests][intro] Fix failures when executed on iOS 15 beta1 devices (#11960) 2021-06-16 19:49:00 -04:00
Sebastien Pouliot c5170b1331
[dotnet][tests] Remove workaround for dotnet/runtime #46908 (#11958) 2021-06-16 19:47:42 -04:00
Sebastien Pouliot e19591f47b
[tests][generator] Remove references to iAd.framework types (#11953)
TL&DR: They were removed from headers so we can't use them for our tests.

Long Story:

To avoid app being rejected the selectors must be removed from the app.
This means the removal of the `[Export]` and `[Bind]` attributes inside
the platform assemblies. That, in turn, makes the binding generator
unable to create bindings for those types.

If some 3rd party bindings extended those types then they also need to
remove them (they will not be able to submit with the symbols anyway).
Stubs can be used, whether or not binary compatibility is provided for
the 3rd party bindings consumers.

Fix https://github.com/xamarin/xamarin-macios/issues/11947
2021-06-16 14:58:45 -04:00
Sebastien Pouliot 0649960dc3
Use `CFString` instead of `NSString` to get a handle from a (.net) `System.String` (#11946)
This is possible because both types are toll-free bridged [0].

How ?

* Renamed `CFString.LowLevelCreate` to `CreateNative` so it match `NSString` API
* Make it public so it can be used for generated/3rd party bindings
* Added a _safe_ `CFString.ReleaseNative` matching `NSString` API
* Update generator to use the new API (instead of the NSString version)
* Update manual bindings (using older API) to use the new API (few in PrintCore)

Why ?

It's no secret that p/invoke (C) are faster than calling a selector
(ObjC). In most cases we do not have a choice what to call... but in a
few, but commonly used, cases we can pick the fastest call.

In this case the difference is larger than the previous case [1] since there's
two call (create and release) involved.

|                 Method |          name |                value |        Mean |       Error |    StdDev |
|----------------------- |-------------- |--------------------- |------------:|------------:|----------:|
| NSString_CreateRelease |         empty |                      |  4,936.1 ns |   349.08 ns |  19.13 ns |
| CFString_CreateRelease |         empty |                      |    243.1 ns |    10.30 ns |   0.56 ns |
| NSString_CreateRelease |   long_string | ????(...)???? [4096] |  8,270.3 ns |   837.09 ns |  45.88 ns |
| CFString_CreateRelease |   long_string | ????(...)???? [4096] |  3,212.4 ns |   213.73 ns |  11.72 ns |
| NSString_CreateRelease |   short_7bits |              Bonjour |  4,858.5 ns | 1,671.67 ns |  91.63 ns |
| CFString_CreateRelease |   short_7bits |              Bonjour |    242.5 ns |    18.36 ns |   1.01 ns |
| NSString_CreateRelease |  short_accent |               Québec |  4,990.1 ns |   343.96 ns |  18.85 ns |
| CFString_CreateRelease |  short_accent |               Québec |    377.6 ns |    15.96 ns |   0.87 ns |
| NSString_CreateRelease |   short_emoji | I'm f(...)ight. [23] |  5,080.2 ns |   794.29 ns |  43.54 ns |
| CFString_CreateRelease |   short_emoji | I'm f(...)ight. [23] |    391.2 ns |     8.60 ns |   0.47 ns |
| NSString_CreateRelease | short_unicode |                汉语 漢語 |  4,980.4 ns |   272.41 ns |  14.93 ns |
| CFString_CreateRelease | short_unicode |                汉语 漢語 |    376.4 ns |    15.98 ns |   0.88 ns |

Also simplified/updated previous tests as suggested in [1].

|                 Method |          name |                value |        Mean |       Error |    StdDev |
|----------------------- |-------------- |--------------------- |------------:|------------:|----------:|
|    NSString_FromString |         empty |      140735350713040 |  2,252.2 ns |   591.63 ns |  32.43 ns |
|    CFString_FromString |         empty |      140735350713040 |    408.4 ns |    47.56 ns |   2.61 ns |
|    NSString_FromString |   long_string |      140295885995872 | 14,887.2 ns |   183.67 ns |  10.07 ns |
|    CFString_FromString |   long_string |      140295885995872 |  7,418.7 ns | 1,844.42 ns | 101.10 ns |
|    NSString_FromString |   short_7bits |  1292713981587835779 |  2,259.8 ns |   210.17 ns |  11.52 ns |
|    CFString_FromString |   short_7bits |  1292713981587835779 |    453.0 ns |   122.77 ns |   6.73 ns |
|    NSString_FromString |  short_accent |      140295885995776 |  2,448.2 ns |    97.43 ns |   5.34 ns |
|    CFString_FromString |  short_accent |      140295885995776 |    256.8 ns |    75.81 ns |   4.16 ns |
|    NSString_FromString |   short_emoji |      140296423669120 |  2,531.6 ns |   199.02 ns |  10.91 ns |
|    CFString_FromString |   short_emoji |      140296423669120 |    259.0 ns |    21.32 ns |   1.17 ns |
|    NSString_FromString | short_unicode |      140295885992304 |  2,426.2 ns |   339.06 ns |  18.58 ns |
|    CFString_FromString | short_unicode |      140295885992304 |    260.6 ns |    97.03 ns |   5.32 ns |

[1] https://github.com/xamarin/xamarin-macios/pull/11809
2021-06-16 14:11:38 -04:00
Sebastien Pouliot 974aad0a26
[tests][link sdk] Re-enable test for Ping for dotnet (#11951)
ref: https://github.com/dotnet/runtime/issues/41355

Unlike what we have today for legacy support for Ping was added in
https://github.com/dotnet/runtime/pull/52240
2021-06-16 14:03:36 -04:00
Manuel de la Pena 0029ffa29d
[Classkit] Add support for Xcode13 beta1. (#11942) 2021-06-16 11:21:21 -04:00