GetPlatform node returns "IOS" on tvOS

Steps to Duplicate:

  1. Create First Person Blueprint project, “Desktop/Console”, " Quality", “No Starter Content”
  2. Open the default level blueprint
  3. Add a “Get Platform Name”, hook it to “Print”, and hook execution up to BeginPlay.
  4. Import a development certificate and provision.
  5. Launch on AppleTV†

Observe the debug print report “IOS” Instead of “tvOS”.

† [If you can.][1]

Valid Development Provision and Certificate ignored for tvOS [Workaround] - Platform & Builds - Epic Developer Community Forums

A quick skim would make it seem that something like the patch below would work, but I would guess that there’s some deeper complications.

diff --git a/Engine/Source/Runtime/Core/Public/IOS/IOSPlatformProperties.h b/Engine/Source/Runtime/Core/Public/IOS/IOSPlatformProperties.h
index def1a33..1641d03 100644
--- a/Engine/Source/Runtime/Core/Public/IOS/IOSPlatformProperties.h
+++ b/Engine/Source/Runtime/Core/Public/IOS/IOSPlatformProperties.h
@@ -25,12 +25,20 @@ struct FIOSPlatformProperties

     static FORCEINLINE const char* PlatformName( )
     {
+#if PLATFORM_TVOS
+        return "tvOS";
+#else
         return "IOS";
+#endif
     }

     static FORCEINLINE const char* IniPlatformName( )
     {
+#if PLATFORM_TVOS
+        return "tvOS";
+#else
         return "IOS";
+#endif
     }

     static FORCEINLINE bool IsGameOnly()
diff --git a/Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h b/Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h
index b725318..8823666 100644
--- a/Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h
+++ b/Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h
@@ -800,7 +800,7 @@ class ENGINE_API UGameplayStatics : public UBlueprintFunctionLibrary

     /**
      * Returns the string name of the current platform, to perform different behavior based on platform.
-     * (Platform names include Windows, Mac, IOS, Android, PS4, XboxOne, HTML5, Linux) */
+     * (Platform names include Windows, Mac, IOS, tvOS, Android, PS4, XboxOne, HTML5, Linux) */
     UFUNCTION(BlueprintCallable, Category="Game")
     static FString GetPlatformName();

,

Thanks for your report. [UE-39464][1] has been reported for this issue. If you have any additional questions or concerns, please let us know.

Unreal Engine Issues and Bug Tracker (UE-39464)

Thank you!