Skip to content

fix(ci): dynamically discover iOS simulator instead of hardcoding device name#600

Merged
hggzm merged 2 commits intomainfrom
users/hggzm/fix/ios-ci-simulator-runtime
Mar 18, 2026
Merged

fix(ci): dynamically discover iOS simulator instead of hardcoding device name#600
hggzm merged 2 commits intomainfrom
users/hggzm/fix/ios-ci-simulator-runtime

Conversation

@hggzm
Copy link
Collaborator

@hggzm hggzm commented Mar 16, 2026

The macos-latest Azure DevOps runner image was updated (Xcode 16.4) and no longer has iPhone 16 simulator pre-installed, causing the iOS PR CI to fail with:

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

This has been a recurring issue — previously the simulator was changed from iPhone 15 Pro to iPhone 16 (commit bdd3e20).

Fix

Instead of hardcoding a device name that breaks every time the runner image updates, this PR adds a small discovery step that dynamically finds the first available iPhone simulator using xcrun simctl list devices available and passes it as a pipeline variable.

Changes:

  • ios-ci-template.yml: Add Discover available iOS Simulator script step, remove hardcoded sdk: iphonesimulator18.5 (use iphonesimulator), use destinationPlatformOption: custom with discovered simulator name
  • ios-build-template.yml: Same discovery step, same dynamic destination (was hardcoded to iPhone 12)

This permanently fixes the recurring "simulator not found" CI failures without requiring manual updates when Apple/Azure updates macOS runner images.

@hggzm hggzm force-pushed the users/hggzm/fix/ios-ci-simulator-runtime branch 3 times, most recently from 1054be0 to 555b934 Compare March 17, 2026 01:03
…silience

The Xcode@5 ADO task internally resolves simulator destinations and
fails (exit 70) when no matching simulator is found, even with
destinationPlatformOption: default. This has been a recurring issue
as macos-latest runner images get updated.

Fix: Replace Xcode@5 with direct xcodebuild script steps that:
- Dynamically discover available simulators via xcrun simctl
- Fall back to generic/platform=iOS Simulator if none found
- Match the approach used in the working GitHub Actions CI

Applied to both ios-ci-template.yml and ios-build-template.yml.
@hggzm hggzm force-pushed the users/hggzm/fix/ios-ci-simulator-runtime branch from 555b934 to ff8ed54 Compare March 17, 2026 02:06
@hggzm hggzm enabled auto-merge March 18, 2026 17:42
@hggzm hggzm merged commit af183df into main Mar 18, 2026
7 checks passed
hggzm added a commit that referenced this pull request Mar 18, 2026
The Gradle@3 ADO task runs gradlew build which includes assembleRelease.
The release packaging step (PackageAndroidArtifact IncrementalSplitterRunnable)
fails intermittently on shared macOS runners due to file locking race conditions.

Fix: Replace Gradle@3 with a direct script step that runs only
assembleDebug + testDebugUnitTest. This is sufficient for PR validation
(we only need to verify the code compiles and tests pass) and avoids the
flaky release packaging entirely.

Matches the approach used for the iOS CI fix (PR #600).
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.

3 participants