I’m running Unreal 4.22.3 so not certain if the features were available in 4.18, but here are two methods you can use to detect if you’re running on one of the iPhone X devices.
In code call the following function.
const FString DefaultDeviceProfileName = FPlatformMisc::GetDefaultDeviceProfileName();
In Blueprint call the following function.
GetActiveDeviceProfileName
The appropriate string will be returned from the function, depending on the current device.
“IPhoneX”
“IPhoneXS”
“IPhoneXSMax”
“IPhoneXR”
See the IOSDeviceNames list in following file for details.
…\ue4\Engine\Source\Runtime\Core\Public\IOS\IOSPlatformMisc.h