Skip to content

ci(codeql): use generic iOS Simulator destination for Swift analyze build#881

Open
joaodordio wants to merge 1 commit into
masterfrom
fix/codeql-swift-ios-simulator-destination
Open

ci(codeql): use generic iOS Simulator destination for Swift analyze build#881
joaodordio wants to merge 1 commit into
masterfrom
fix/codeql-swift-ios-simulator-destination

Conversation

@joaodordio

@joaodordio joaodordio commented Jun 30, 2026

Copy link
Copy Markdown
Member

🔹 JIRA Ticket(s) if any

N/A, CI hotfix.

✏️ Description

The Swift CodeQL analyze job (Build_Analyze_iOS_Example in .github/workflows/codeql.yml) runs on macos-15 with Xcode 16.4 and was building with:

-destination 'platform=iOS Simulator,name=iPhone 16'

Recent runner image revisions (e.g. macos-15-arm64 20260623.0190.1) ship without that named simulator preinstalled, so xcodebuild only sees the placeholder "Any iOS Simulator Device" destination and exits with code 70:

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

The requested device could not be found because no available devices matched the request.

Available destinations for the "ReactNativeSdkExample" scheme:
    { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
    { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }

This breaks CodeQL Swift analysis on every PR and on master.

Fix

Switch the destination to generic/platform=iOS Simulator. The build only needs to compile so the CodeQL Swift extractor can observe it, no booted device is required. The generic destination matches the always-available "Any iOS Simulator Device" placeholder, removes the dependency on which iPhone the runner image happens to ship, and is robust to future image bumps.

Test plan

  • CodeQL Advanced workflow's `Analyze (swift)` job goes green on this PR.
  • The xcodebuild step completes the build (not just the destination resolution).

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Lines Statements Branches Functions
Coverage: 68%
68.95% (522/757) 56.11% (202/360) 65.09% (166/255)

@qltysh

qltysh Bot commented Jun 30, 2026

Copy link
Copy Markdown

Qlty


⚠️ Comments skipped @joaodordio doesn't have a Qlty seat in Iterable.

Qlty doesn't post analysis or coverage comments for contributors without a seat. An authorized user can grant @joaodordio a seat from this pull request's page in Qlty.

…uild

The Swift CodeQL analyze job runs on macos-15 with Xcode 16.4 and used
`-destination 'platform=iOS Simulator,name=iPhone 16'`. Recent runner
image revisions (e.g. macos-15-arm64 20260623.0190.1) ship without that
named simulator preinstalled, so xcodebuild only sees the placeholder
"Any iOS Simulator Device" destination and exits with code 70.

The build only needs to compile so the CodeQL Swift extractor can
observe it, no booted device is required. Switching to
`generic/platform=iOS Simulator` matches the always-available
placeholder destination, removes the dependency on which iPhone the
runner image happens to ship, and keeps the build green across future
image bumps.
@joaodordio joaodordio force-pushed the fix/codeql-swift-ios-simulator-destination branch from a10ddbf to 742c551 Compare June 30, 2026 20:33
@joaodordio joaodordio requested a review from a team June 30, 2026 20:33
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