Skip to content

ci(ios): build against a generic simulator destination - #553

Open
MaximBelov wants to merge 1 commit into
silkimen:masterfrom
MaximBelov:fix/ios-simulator-destination
Open

MaximBelov wants to merge 1 commit into
silkimen:masterfrom
MaximBelov:fix/ios-simulator-destination

Conversation

@MaximBelov

@MaximBelov MaximBelov commented Aug 12, 2026 •

Copy link
Copy Markdown

The problem

The build-ios job fails on every run, and has done for a while — the latest run on master fails the same way. The build never starts:

xcodebuild: error: Unable to find a device matching the provided destination specifier:
        { platform:iOS Simulator, OS:latest, name:iPhone 16e }

cordova-ios picks a concrete simulator and passes it as a name without an OS, so xcodebuild resolves the OS to latest. The current runner image offers runtimes 26.2, 26.4.1 and 26.5; the device it picked was iPhone 16e, and that device exists only for 26.2. So the specifier cannot be satisfied even though the device is listed under "Available destinations".

Which device gets picked depends entirely on what the runner image ships, so this will keep breaking as images change — it is not a one-off.

The change

cordova-ios honours a -destination override from build.json (buildFlagMatchers.destination), so this asks for a generic simulator destination instead of a specific device:

"buildFlag": [ "-destination generic/platform=iOS Simulator" ]

That is also what cordova-ios 8 uses as its own default, so this follows where the platform is going rather than working around it. A generic destination is valid for build (it is only archiving that needs a concrete one).

It also drops -UseModernBuildSystem=0, which has been dead weight since the legacy build system was removed in Xcode 14.

Verified

Tried on a fork with the same workflow and runner image. The destination error is gone and the build proceeds to compiling sources — where it then hits a separate, genuine problem: error: Use of private header from outside its module: 'netinet6/in6.h' in the bundled AFNetworking copy, which the destination failure had been masking all along. That one is fixed in #554, and with both changes applied lint, test-www-interface, build-ios and build-android all pass.

So this change alone is necessary but not sufficient to get the iOS job green.

The iOS build job currently fails on every run with:

    xcodebuild: error: Unable to find a device matching the provided
    destination specifier: { platform:iOS Simulator, OS:latest, name:iPhone 16e }

cordova-ios picks a concrete simulator and passes it as name only, so
xcodebuild resolves the OS to latest. The runner image currently offers
runtimes 26.2, 26.4.1 and 26.5, the device picked was iPhone 16e, and that
device only exists for 26.2 — so the specifier cannot be satisfied. Which
device gets picked depends entirely on the runner image, so this will keep
breaking as images change.

Nothing is wrong with the project itself: the build never starts. Since
cordova-ios honours a -destination override from build.json, ask for a
generic simulator destination instead of a specific device. This is also
what cordova-ios 8 uses as its own default, so it follows the platform
rather than working around it.

Also drops -UseModernBuildSystem=0, which has been dead weight since the
legacy build system was removed in Xcode 14.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant