From 7986b2f2afe24da1895530fc232a4526d668a4c8 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 28 Jul 2021 09:12:22 +0200 Subject: [PATCH] [dotnet] Globalization works for Mac Catalyst now. Fixes #11392. (#12247) Fixes https://github.com/xamarin/xamarin-macios/issues/11392. --- dotnet/targets/Xamarin.Shared.Sdk.targets | 3 +-- tests/EmbeddedResources/ResourcesTest.cs | 2 -- tests/linker/ios/link all/CalendarTest.cs | 3 --- tests/linker/ios/link sdk/CalendarTest.cs | 3 --- tests/linker/ios/link sdk/LinkSdkRegressionTest.cs | 3 --- tests/linker/ios/link sdk/LocaleTest.cs | 6 ------ tests/monotouch-test/Foundation/LocaleTest.cs | 3 --- tools/linker/MonoTouch.Tuner/ListExportedSymbols.cs | 7 ------- 8 files changed, 1 insertion(+), 29 deletions(-) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index d355cd90fb..fa932da132 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -128,8 +128,7 @@ false false false - - true + false false true true diff --git a/tests/EmbeddedResources/ResourcesTest.cs b/tests/EmbeddedResources/ResourcesTest.cs index 24527d8525..1a0cb7fc6f 100644 --- a/tests/EmbeddedResources/ResourcesTest.cs +++ b/tests/EmbeddedResources/ResourcesTest.cs @@ -41,7 +41,6 @@ namespace EmbeddedResources { var manager = new ResourceManager ("EmbeddedResources.Welcome", typeof(ResourcesTest).Assembly); #endif -#if !(NET && __MACCATALYST__) // https://github.com/xamarin/xamarin-macios/issues/11392 Assert.AreEqual ("Welcome", manager.GetString ("String1", new CultureInfo ("en")), "en"); Assert.AreEqual ("G'day", manager.GetString ("String1", new CultureInfo ("en-AU")), "en-AU"); Assert.AreEqual ("Willkommen", manager.GetString ("String1", new CultureInfo ("de")), "de"); @@ -49,7 +48,6 @@ namespace EmbeddedResources { Assert.AreEqual ("Bienvenido", manager.GetString ("String1", new CultureInfo ("es")), "es"); Assert.AreEqual ("Bienvenido", manager.GetString ("String1", new CultureInfo ("es-AR")), "es-AR"); Assert.AreEqual ("Bienvenido", manager.GetString ("String1", new CultureInfo ("es-ES")), "es-ES"); -#endif } } } \ No newline at end of file diff --git a/tests/linker/ios/link all/CalendarTest.cs b/tests/linker/ios/link all/CalendarTest.cs index 9a49494ff1..60943eef58 100644 --- a/tests/linker/ios/link all/CalendarTest.cs +++ b/tests/linker/ios/link all/CalendarTest.cs @@ -10,9 +10,6 @@ namespace LinkAll.Calendars { [TestFixture] // we want the tests to be available because we use the linker [Preserve (AllMembers = true)] -#if NET && __MACCATALYST__ - [Ignore ("No globalization data yet for Mac Catalyst - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif public class CalendarTest { // application *MUST* be build with I18N.MidEast and I18N.Other (Thai) diff --git a/tests/linker/ios/link sdk/CalendarTest.cs b/tests/linker/ios/link sdk/CalendarTest.cs index c6bf0d17f4..bc9e67bf85 100644 --- a/tests/linker/ios/link sdk/CalendarTest.cs +++ b/tests/linker/ios/link sdk/CalendarTest.cs @@ -10,9 +10,6 @@ namespace LinkSdk.Calendars { [TestFixture] // we want the tests to be available because we use the linker [Preserve (AllMembers = true)] -#if NET && __MACCATALYST__ - [Ignore ("No globalization data yet for Mac Catalyst - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif public class CalendarTest { // application must *NOT* be build with I18N.MidEast and I18N.Other (Thai) diff --git a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs index eb09d5f792..cdfd6871b9 100644 --- a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs +++ b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs @@ -468,9 +468,6 @@ namespace LinkSdk { #endif // !__WATCHOS__ && !__MACCATALYST__ [Test] -#if NET && __MACCATALYST__ - [Ignore ("No globalization data yet for Mac Catalyst - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif public void XElement_3137 () { CultureInfo current = Thread.CurrentThread.CurrentCulture; diff --git a/tests/linker/ios/link sdk/LocaleTest.cs b/tests/linker/ios/link sdk/LocaleTest.cs index b566c5a509..a1a6e9d0ec 100644 --- a/tests/linker/ios/link sdk/LocaleTest.cs +++ b/tests/linker/ios/link sdk/LocaleTest.cs @@ -14,9 +14,6 @@ namespace LinkSdk { [Test] [SetCulture ("cs-CZ")] -#if NET && __MACCATALYST__ - [Ignore ("No globalization data yet for Mac Catalyst - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif public void CzechDictComparer () { DictComparer (); @@ -24,9 +21,6 @@ namespace LinkSdk { [Test] [SetCulture ("en-US")] -#if NET && __MACCATALYST__ - [Ignore ("No globalization data yet for Mac Catalyst - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif public void EnglishDictComparer () { DictComparer (); diff --git a/tests/monotouch-test/Foundation/LocaleTest.cs b/tests/monotouch-test/Foundation/LocaleTest.cs index bc9fd07b58..b3a11a3798 100644 --- a/tests/monotouch-test/Foundation/LocaleTest.cs +++ b/tests/monotouch-test/Foundation/LocaleTest.cs @@ -38,9 +38,6 @@ namespace MonoTouchFixtures.Foundation { Assert.That (NSLocale.FromLocaleIdentifier (ident).Identifier, Is.EqualTo (ident), "FromLocaleIdentifier"); } -#if NET && __MACCATALYST__ - [Ignore ("No globalization for Mac Catalyst yet - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif [Test] public void InitRegionInfo () { diff --git a/tools/linker/MonoTouch.Tuner/ListExportedSymbols.cs b/tools/linker/MonoTouch.Tuner/ListExportedSymbols.cs index d01071a85c..986e5aef66 100644 --- a/tools/linker/MonoTouch.Tuner/ListExportedSymbols.cs +++ b/tools/linker/MonoTouch.Tuner/ListExportedSymbols.cs @@ -168,13 +168,6 @@ namespace Xamarin.Linker.Steps case "libSystem.Globalization.Native": case "System.Globalization.Native": -#if NET - // https://github.com/xamarin/xamarin-macios/issues/11392 - if (DerivedLinkContext.App.Platform == ApplePlatform.MacCatalyst) { - Driver.Log (4, "Did not add native reference to {0} in {1} referenced by {2} in {3}.", pinfo.EntryPoint, pinfo.Module.Name, method.FullName, method.Module.Name); - break; - } -#endif addPInvokeSymbol = true; break;