Skip to content

CI: todoapp-uno / ios-maccatalyst build fails - .NET for iOS/MacCatalyst 26.5 requires Xcode 26.5, macos-latest only has Xcode 16.4 #559

Description

@adrianhall

Summary

Surfaced on PR #557 (run 29146179948, job todoapp-uno / ios-maccatalyst). The todoapp-uno / ios-maccatalyst job fails in the Build Uno project (iOS TFM only) step with the same Xcode-version-mismatch error previously diagnosed in #529 for todoapp-avalonia / ios and todoapp-maui / ios:

/Users/runner/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.5/26.5.10284/targets/Xamarin.Shared.Sdk.targets(2570,3): error :
This version of .NET for iOS (26.5.10284) requires Xcode 26.5. The current version of Xcode is 16.4.
Either install Xcode 26.5, or use a different version of .NET for iOS. See https://aka.ms/xcode-requirement for more information.
[/Users/runner/work/Datasync/Datasync/samples/todoapp/TodoApp.Uno/TodoApp.Uno/TodoApp.Uno.csproj::TargetFramework=net10.0-ios]

Root cause

.github/workflows/build-samples-todoapp-uno.yml's ios-maccatalyst job still runs on floating macos-latest with no pinned Xcode version and no pinned iOS workload set:

  ios-maccatalyst:
    # iOS and Mac Catalyst builds both require Xcode, which is only available on macOS runners.
    runs-on: macos-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v7
      - name: Setup .NET
        uses: actions/setup-dotnet@v5
        with:
          dotnet-version: ${{ env.DOTNET_VERSION }}
      - name: Install iOS and Mac Catalyst workloads
        run: dotnet workload install ios maccatalyst
      - name: Restore Uno project (iOS TFM only)
        run: dotnet restore ${{ env.UnoProjectFile }} -p:TargetFramework=${{ env.iOSTargetFramework }}
      - name: Build Uno project (iOS TFM only)
        run: >
          dotnet build ${{ env.UnoProjectFile }}
          -f ${{ env.iOSTargetFramework }}
          --configuration ${{ env.DOTNET_CONFIGURATION }}
          --no-restore
      ...

dotnet workload install ios maccatalyst grabs whatever the latest Microsoft.iOS.Sdk.net10.0_* manifest advertises (currently 26.5, requiring Xcode 26.5), regardless of what Xcode version the macos-latest image actually ships (currently 16.4, per the same macos-15-arm64 image family diagnosed in #529).

This is the exact same class of failure as #529, which was fixed for todoapp-avalonia / ios and todoapp-maui / ios in #530 (merged 2026-07-10) by pinning the runner to macos-15, explicitly selecting an installed-but-non-default Xcode version via xcode-select, and pinning dotnet workload install ... --version <WorkloadSetVersion> to a workload set whose iOS/MacCatalyst SDK pack is compatible with that Xcode. .github/workflows/build-samples-todoapp-uno.yml existed before #530 (added in #511/#519, well before #530 merged) but wasn't included in that PR's scope, so the ios-maccatalyst job was missed and still floats on macos-latest with no pin.

Suggested fix

Apply the same pattern already used in build-samples-todoapp-avalonia.yml / build-samples-todoapp-maui.yml's ios jobs to the ios-maccatalyst job in build-samples-todoapp-uno.yml:

  1. Pin runs-on: macos-15 instead of macos-latest.
  2. Add a Select Xcode ${{ env.RequiredXcodeVersion }} step (sudo xcode-select -s /Applications/Xcode_${{ env.RequiredXcodeVersion }}.app) before Setup .NET, using the same RequiredXcodeVersion: '26.3' known to be installed (non-default) on the current macos-15 image.
  3. Pin WorkloadSetVersion: '10.0.107' and pass --version ${{ env.WorkloadSetVersion }} to dotnet workload install ios maccatalyst, matching the resolved Microsoft.iOS.Sdk.net10.0_26.2.10233 / Xcode 26.3 pairing used by the Avalonia/MAUI jobs.
  4. Keep both the iOS and Mac Catalyst restore/build steps in the single job as they are today, since both TFMs need the same pinned Xcode/workload set.

The exact pin values (macos-15, 26.3, 10.0.107) should be re-verified against whatever the current runner image/workload set state is at the time of the fix, in case they've drifted since #530.

To reproduce

Run the ios-maccatalyst job of .github/workflows/build-samples-todoapp-uno.yml on macos-latest as of the current runner image (Xcode 16.4 default). dotnet workload install ios maccatalyst pulls Microsoft.iOS.Sdk.net10.0_26.5 (26.5.10284), and building net10.0-ios fails with the Xcode-version-mismatch error above.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions