From b9865b2482777c6d1ad0bd26cfc68f276569bf87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Kn=C3=B6chel?= Date: Fri, 6 Nov 2026 21:31:07 +0100 Subject: [PATCH 1/2] fix: parse simulator runtime version from device-specific runtime ids Xcode 27.2 ships the iPhone Duo simulator in a dedicated runtime (com.apple.CoreSimulator.SimRuntime.iOS-27-2-iPhone19-4). Mapping that id to a version produced "27.2.iPhone19.4", which is not a valid semver and crashed the Titanium iOS build while sorting simulator versions (TypeError: Invalid Version: 27.2.iPhone19). Only the leading numeric segments are used now, so the runtime maps to 27.2 like the standard one. --- lib/xcode.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/xcode.js b/lib/xcode.js index 28cb109..5cda68c 100644 --- a/lib/xcode.js +++ b/lib/xcode.js @@ -433,9 +433,10 @@ exports.detect = function detect(options, callback) { // Map the platform and version from CoreSimulator string like: // - com.apple.CoreSimulator.SimRuntime.iOS-17-0 // - com.apple.CoreSimulator.SimRuntime.watchOS-10-0 + // - com.apple.CoreSimulator.SimRuntime.iOS-27-2-iPhone19-4 (iPhone Duo runtime -> 27.2) for (const key of Object.keys(devices)) { const [_, platform, rawVersion] = key.match(/\.SimRuntime\.(.*?)\-(.*)$/); - const version = rawVersion.replace(/-/g, '.'); + const version = (rawVersion.match(/^\d+(?:-\d+)*/) || [ rawVersion ])[0].replace(/-/g, '.'); const mapping = { name: `${platform} ${version}`, From a67127438c0338ccb23a28cc715e91fd92cac373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Kn=C3=B6chel?= Date: Fri, 6 Nov 2026 22:06:17 +0100 Subject: [PATCH 2/2] fix: map device-specific runtime ids to their numeric version in the Xcode simulator list too The simctl device list parser that fills xc.sims (shown by `ti info`) still produced 27.2.iPhone19.4 for the iPhone Duo runtime. --- lib/xcode.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/xcode.js b/lib/xcode.js index 5cda68c..7e84916 100644 --- a/lib/xcode.js +++ b/lib/xcode.js @@ -476,7 +476,8 @@ exports.detect = function detect(options, callback) { return next(err); } - var rtRegExp = /(iOS|watchOS)-(.+)$/; + // Device-specific runtimes such as iOS-27-2-iPhone19-4 (iPhone Duo) map to their numeric version, 27.2 + var rtRegExp = /(iOS|watchOS)-(\d+(?:-\d+)*)/; Object.keys(info.devices).forEach(function (rt) { var m = rt.match(rtRegExp); if (m) {