Repository navigation
ci(ios): build against a generic simulator destination - #553
Open
MaximBelov wants to merge 1 commit into
Open
MaximBelov wants to merge 1 commit into
MaximBelov wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
The
build-iosjob fails on every run, and has done for a while — the latest run onmasterfails the same way. The build never starts:cordova-iospicks a concrete simulator and passes it as a name without an OS, soxcodebuildresolves the OS tolatest. The current runner image offers runtimes 26.2, 26.4.1 and 26.5; the device it picked wasiPhone 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-ioshonours a-destinationoverride frombuild.json(buildFlagMatchers.destination), so this asks for a generic simulator destination instead of a specific device: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 appliedlint,test-www-interface,build-iosandbuild-androidall pass.So this change alone is necessary but not sufficient to get the iOS job green.