Repository navigation
fix: parse simulator runtime version from device-specific runtime ids - #263
Conversation
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.
|
@cb1kenobi @m1ga Quick fix to properly support the newer runtimes! |
m1ga
left a comment
There was a problem hiding this comment.
The fix is correct, only one smaller note to clean up ti info:
The gap is a second parser in the same file that the PR did not touch. At lib/xcode.js:479 the expression /(iOS|watchOS)-(.+)$/ reads the simctl device list keys and pushes m[2].replace(/-/g, '.') into xc.sims. With the Duo runtime installed that list still contains 27.2.iPhone19.4 next to 27.2. I checked the Titanium SDK: the build command collects those values into a set that it never reads, so this does not crash a build. But ti info prints the list under "iOS Simulators", so users will see the odd 27.2.iPhone19.4 entry there. The same numeric-prefix extraction applied to that block would make the output consistent, and the existing dest.indexOf(ver) check already deduplicates the resulting 27.2.
…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.
Xcode 27.2 ships the iPhone Duo simulator in its own runtime,
com.apple.CoreSimulator.SimRuntime.iOS-27-2-iPhone19-4. ioslib mapped that id to version27.2.iPhone19.4, which breaks the semver sort in the Titanium iOS build as soon as the runtime is installed, for every simulator build:Only the leading numeric segments of the runtime id are used now, so the Duo runtime maps to
27.2and its simulators are grouped with the regular iOS 27.2 ones. Verified with Titanium SDK 14.0.0:ti build -p ios --device-id <iPhone Duo UDID>selects the Duo simulator as iOS 27.2.