x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

GetPlatform node returns "IOS" on tvOS

Steps to Duplicate:

  1. Create First Person Blueprint project, "Desktop/Console", "Max 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.

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();

Product Version: UE 4.14
Tags:
more ▼

asked Dec 02 '16 at 04:54 AM in Bug Reports

avatar image

CleanCut
2k 65 82 77

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

CleanCut,

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

more ▼

answered Dec 07 '16 at 09:07 PM

avatar image CleanCut Dec 07 '16 at 11:35 PM

Thank you!

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question