Requesting support for proper Unreal input detection when running on Mac (Designed for iPad)

Hi EPS Team,

On our game we’re working on Mac (Designed for iPad), which allows an iOS build to run on macOS without building a fully native Mac version. While testing our Unreal mobile app in this environment, we ran into a couple issues around platform detection and input handling, and we would like support in getting a fix.

01 - Platform Detection

When the app runs as Mac (Designed for iPad), Unreal and our codebase appear to interpret the environment strictly as iOS:

- `PLATFORM_IOS` → true

- `PLATFORM_MAC` → false

Because of this we currently can’t distinguish between iOS app running on MacOS via the compatibility layer. This prevents us from enabling Mac-specific logic (mouse behavior, cursor handling, input routing, etc.).

What we THINK may be needed

A reliable runtime way to detect “iOS app running on Mac” so we can propagate that signal into Unreal and our gameplay systems are able to properly detect the proper input.

After speaking with the Apple team we think adding support for `ProcessInfo.processInfo.isiOSAppOnMac` which lives on the iOS side would help.

The idea would be to detect this at runtime and expose the state into Unreal so the input is properly communicated to our gameplay systems.

02 - Input Detection

Our input logic relies on Unreal’s `CommonInputSubsystem: InputSubsystem->GetCurrentInputType()`

Most of our plugins and features use this to determine whether the game should operate in:

- Touch mode

- Mouse/keyboard mode

However, when running as Mac (Designed for iPad), the value always reports `ECommonInputType::Touch` even when the user is clearly using a mouse or trackpad. Our assumption is that Apple’s pointer → touch translation layer, combined with Unreal’s platform assumptions, is causing the engine to always treat the environment as touch.

Our ask for the EPS Team:

- Add support for iOS app to detect it is running on macOS via Mac (Designed for iPad)

- Add that information into Unreal so it properly communicates the input to our features and plugins

If our assumptions above are correct, the implementation would likely be:

- Detect iOS-on-Mac at runtime.

- Surface that state into Unreal appropriately.

- Adjust input handling so the game properly supports mouse/keyboard interactions when running in this environment.

[Attachment Removed]

Steps to Reproduce
Repro steps:

  • Build a mobile iOS app using RunUAT to make an iOS build
  • Open Xcode and confirm “General > Supported Destinations” supports Mac (Designed for iPad)
  • Using Xcode, at the top center, select your app target and set Mac (Designed for iPad) as the device
  • Hit the Xcode “Play” button to build and run the app

Notice that it improperly reports the Platform when running on Mac (Designed for iPad):

  • `PLATFORM_IOS` → true
  • `PLATFORM_MAC` → false

Also notice the Input itself is not reported correctly when running on Mac (Designed for iPad)

  • CommonInputSubsystem: InputSubsystem->GetCurrentInputType() -> Touch

[Attachment Removed]

Hi Alex,

You can reliably recognize that an iOS app is being run on Mac with NSProcessInfo iOSAppOnMac flag.

#if PLATFORM_IOS
#import <Foundation/Foundation.h>
#endif
...
#if PLATFORM_IOS
	bool iOSAppOnMac = [NSProcessInfo processInfo].iOSAppOnMac;
 
        ... propagate the state as needed
#endif

I’ll run your other comments by the team, however, I believe the PLATFORM_IOS is as expected as that is the target platform of the application.

Best regards.

[Attachment Removed]

Hi Stephane, Thank you for sharing that.

This may work for a one off solution, however, it would be best if this was directly communicated into Unreal so Unreal Engine itself could communicate the proper state to all our plugins and game features.

And yes I do think `PLATFORM_IOS` → true is correct, but I don’t think `PLATFORM_MAC` → false is correct.

You mentioned you’d run the other comments by your team. Any updates?

Best,

[Attachment Removed]

Hi Alex,

In your concernts about PLATFORM_IOS and PLATFORM_MAC, are you referring to the preprocessor definitions? In that case, only one of PLATFORM_IOS and PLATFORM_MAC can be defined at a time. PLATFORM_IOS pulls in code that needs to compile against against the iOS SDK while PLATFORM_MAC is for native Mac only apps built against the MacOS SDK. These are mutually exclusive.

As for default behaviour, the dev team is willing to look at a solution involving user settings for input behaviour that would allow overriding the default touch alternative based input that iPad apps have when run on Mac.

Best regards.

[Attachment Removed]

Hi Alex,

Just a quick follow up. Regarding iOS on Mac detection, this is provided at the engine level through FIOSPlatformMisc:: IsDesignedForIpadOnMacOS(). We are looking at defaulting input behaviour to KBM over touch under those conditions, however, we wanted to check in as to whether you had visibility whether the iOS input system as available on 5.7 provides the necessary functionality for your product. As there was significant rework of the input system itself post 5.7, we are hoping to establish whether those changes would need to be backported or not.

Best regards.

[Attachment Removed]