diff --git a/src/libraries/System.Private.CoreLib/src/Internal/Console.iOS.cs b/src/libraries/System.Private.CoreLib/src/Internal/Console.iOS.cs new file mode 100644 index 00000000000000..84e0bbdcea2cd7 --- /dev/null +++ b/src/libraries/System.Private.CoreLib/src/Internal/Console.iOS.cs @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Text; + +namespace Internal +{ + public static partial class Console + { + public static unsafe void Write(string s) + { + fixed (char* ptr = s) + { + Interop.Sys.Log((byte*)ptr, s.Length * 2); + } + } + public static partial class Error + { + public static unsafe void Write(string s) + { + fixed (char* ptr = s) + { + Interop.Sys.LogError((byte*)ptr, s.Length * 2); + } + } + } + } +} diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems index 7dbc1cb3f3deb5..8a9f56346a92d8 100644 --- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems +++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems @@ -2235,8 +2235,9 @@ Common\System\IO\PathInternal.Unix.cs - + + Common\Interop\Android\Interop.Logcat.cs