AIRHelper: display a warning when no selected iOS simulator is found when building AIR for iOS app

Ideally, we'd always get a simulator name, but better to fail gracefully
This commit is contained in:
Josh Tynjala
2023-04-11 15:51:56 -07:00
parent 2e19898c28
commit 04b69a9cef

View File

@@ -206,7 +206,15 @@ class AIRHelper
if (targetPlatform == IOS && System.hostPlatform == MAC)
{
Sys.putEnv("AIR_IOS_SIMULATOR_DEVICE", XCodeHelper.getSimulatorName(project));
var simulatorName = XCodeHelper.getSimulatorName(project);
if (simulatorName == null)
{
Log.warn("Skipping AIR_IOS_SIMULATOR_DEVICE environment variable because default simulator not found");
}
else
{
Sys.putEnv("AIR_IOS_SIMULATOR_DEVICE", simulatorName);
}
}
System.runCommand(workingDirectory, project.defines.get("AIR_SDK") + "/bin/adt", args);