Steps to Duplicate:
- Create First Person Blueprint project, “Desktop/Console”, " Quality", “No Starter Content”
- Open the default level blueprint
- Add a “Get Platform Name”, hook it to “Print”, and hook execution up to BeginPlay.
- Import a development certificate and provision.
- Launch on AppleTV†
Observe the debug print report “IOS” Instead of “tvOS”.
† [If you can.][1]
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();