From f8ed631531f3dc81f28673089b5a20fd85cf5c6b Mon Sep 17 00:00:00 2001
From: Raul Santos <raulsntos@gmail.com>
Date: Thu, 12 Oct 2023 14:30:55 +0200
Subject: [PATCH] Update the state of C#/.NET support as of 4.2 beta 1

---
 about/list_of_features.rst                    | 13 +++----
 .../step_by_step/scripting_languages.rst      |  8 ++---
 .../scripting/c_sharp/c_sharp_basics.rst      |  8 ++---
 tutorials/scripting/c_sharp/index.rst         | 34 +++++++++++++++----
 4 files changed, 43 insertions(+), 20 deletions(-)

diff --git a/about/list_of_features.rst b/about/list_of_features.rst
index 12b5b768189..bb52f9efb63 100644
--- a/about/list_of_features.rst
+++ b/about/list_of_features.rst
@@ -39,10 +39,10 @@ Godot aims to be as platform-independent as possible and can be
 
 .. note::
 
-    Projects written in C# using Godot 4 currently cannot be exported to iOS
-    and web platforms. To use C# on those platforms, consider Godot 3 instead.
-    Android platform support is available as of Godot 4.2, but is experimental
-    and :ref:`some limitations apply <doc_c_sharp_platforms>`.
+    Projects written in C# using Godot 4 currently cannot be exported to the
+    web platform. To use C# on that platform, consider Godot 3 instead.
+    Android and iOS platform support is available as of Godot 4.2, but is
+    experimental and :ref:`some limitations apply <doc_c_sharp_platforms>`.
 
 Editor
 ------
@@ -441,10 +441,11 @@ Scripting
    - Full support for the C# 10.0 syntax and features.
 
 - Supports Windows, Linux, and macOS. As of 4.2 experimental support for Android
-  is also available (requires a .NET 7.0 project).
+  and iOS is also available (requires a .NET 7.0 project for Android and 8.0 for iOS).
 
    - On the Android platform only some architectures are supported: ``arm64`` and ``x64``.
-   - iOS and web platforms are currently unsupported. To use C# on those platforms,
+   - On the iOS platform only some architectures are supported: ``arm64``.
+   - The web platform is currently unsupported. To use C# on that platform,
      consider Godot 3 instead.
 
 - Using an external editor is recommended to benefit from IDE functionality.
diff --git a/getting_started/step_by_step/scripting_languages.rst b/getting_started/step_by_step/scripting_languages.rst
index 11cbb531be2..4415b1a5cef 100644
--- a/getting_started/step_by_step/scripting_languages.rst
+++ b/getting_started/step_by_step/scripting_languages.rst
@@ -128,10 +128,10 @@ officially supported .NET option.
 
 .. attention::
 
-    Projects written in C# using Godot 4 currently cannot be exported to iOS
-    and web platforms. To use C# on those platforms, consider Godot 3 instead.
-    Android platform support is available as of Godot 4.2, but is experimental
-    and :ref:`some limitations apply <doc_c_sharp_platforms>`.
+    Projects written in C# using Godot 4 currently cannot be exported to the web
+    platform. To use C# on that platform, consider Godot 3 instead.
+    Android and iOS platform support is available as of Godot 4.2, but is
+    experimental and :ref:`some limitations apply <doc_c_sharp_platforms>`.
 
 C++ via GDExtension
 ~~~~~~~~~~~~~~~~~~~
diff --git a/tutorials/scripting/c_sharp/c_sharp_basics.rst b/tutorials/scripting/c_sharp/c_sharp_basics.rst
index 9586c7c6583..090d340cc64 100644
--- a/tutorials/scripting/c_sharp/c_sharp_basics.rst
+++ b/tutorials/scripting/c_sharp/c_sharp_basics.rst
@@ -18,10 +18,10 @@ it is implemented with .NET 6.0.
 
 .. attention::
 
-    Projects written in C# using Godot 4 currently cannot be exported to iOS
-    and web platforms. To use C# on those platforms, consider Godot 3 instead.
-    Android platform support is available as of Godot 4.2, but is experimental
-    and :ref:`some limitations apply <doc_c_sharp_platforms>`.
+    Projects written in C# using Godot 4 currently cannot be exported to the web
+    platform. To use C# on that platforms, consider Godot 3 instead.
+    Android and iOS platform support is available as of Godot 4.2, but is
+    experimental and :ref:`some limitations apply <doc_c_sharp_platforms>`.
 
 .. note::
 
diff --git a/tutorials/scripting/c_sharp/index.rst b/tutorials/scripting/c_sharp/index.rst
index c5cc4ff0260..b98d575b127 100644
--- a/tutorials/scripting/c_sharp/index.rst
+++ b/tutorials/scripting/c_sharp/index.rst
@@ -42,13 +42,35 @@ C# platform support
 -------------------
 
 As of Godot 4.2 projects written in C# support all desktop platforms (Windows, Linux,
-and macOS), as well as Android. Android support is currently experimental and has a few
-limitations.
+and macOS), as well as Android and iOS.
 
-- Projects targeting Android need to be created using .NET 7.0 or higher. This requires
-  modifying the `.csproj` file generated by Godot.
+Android support is currently experimental and has a few limitations.
+
+- Projects targeting Android need to target .NET 7.0 or higher. This requires
+  modifying the `.csproj` file generated by Godot for existing projects.
+  The following property is added to new projects created with 4.2 and can be
+  added to existing projects:
+
+  .. code-block:: xml
+
+    <TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
 
 - Only some Android architectures are supported: ``arm64`` and ``x64``.
 
-Currently, projects written in C# cannot be exported to iOS and web platforms. To use C#
-on those platforms, consider Godot 3 instead.
+iOS support is currently experimental and has a few limitations.
+
+- Projects targeting iOS need to target .NET 8.0 or higher. This requires
+  modifying the `.csproj` file generated by Godot for existing projects.
+  The following property is added to new projects created with 4.2 and can be
+  added to existing projects:
+
+  .. code-block:: xml
+
+    <TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
+
+- The official export templates for the iOS simulator only supports the ``x64`` architecture.
+
+- Exporting to iOS can only be done from a MacOS device.
+
+Currently, projects written in C# cannot be exported to the web platform. To use C#
+on that platform, consider Godot 3 instead.