diff --git a/modules/juce_core/native/juce_mac_SystemStats.mm b/modules/juce_core/native/juce_mac_SystemStats.mm index 4fc323d89e..885a45d8ed 100644 --- a/modules/juce_core/native/juce_mac_SystemStats.mm +++ b/modules/juce_core/native/juce_mac_SystemStats.mm @@ -159,11 +159,28 @@ String SystemStats::getDeviceDescription() #endif size_t size; + if (sysctlbyname (name, nullptr, &size, nullptr, 0) >= 0) { HeapBlock model (size); - if (sysctlbyname (name, model, &size, nullptr, 0) >= 0) - return model.get(); + + if (sysctlbyname (name, model, &size, nullptr, 0) >= 0) + { + String description (model.get()); + + #if JUCE_IOS + if (description == "x86_64") // running in the simulator + { + if (auto* userInfo = [[NSProcessInfo processInfo] environment]) + { + if (auto* simDeviceName = [userInfo objectForKey: @"SIMULATOR_DEVICE_NAME"]) + return nsStringToJuce (simDeviceName); + } + } + #endif + + return description; + } } return {};