Starting yesterday, our hosted azure build pipelines for our .NET MAUI iOS App began to break with the following error message
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk.net8.0_18.0/18.0.8314/tools/msbuild/iOS/Xamarin.Shared.targets(1867,3): error : Could not find a valid Xcode app bundle at '/Applications/Xcode_16.app'. Please verify that 'xcode-select -p' points to your Xcode installation. For more information see https://aka.ms/macios-missing-xcode. [/Users/runner/work/1/s/src/Mobile/xyz.csproj::TargetFramework=net8.0-ios]
Until this day, everything worked fine, and now occasionally (1 out of 10 tries) the build succeeds. Has anyone else experienced this or found a reliable fix/workaround? This is getting really frustrating.
We set the XCode version with this task:
- task: Bash@3
displayName: Set XCode Version
inputs:
targetType: "inline"
script: |
sudo xcode-select -switch "/Applications/Xcode_16.app/Contents/Developer"
2
Answers
Updating to macOS 15 resolved our problems, however, we had to update the certificate signing as well to work with macOS 15 and XCode 16.
Indeed it seems XCode 16 has been removed from macOS-14: https://github.com/actions/runner-images/issues/10703
In my case, I have updated my vmImage to macOS-15 and it works fine but unfortunately some people may have to rework their pipelines if they rely on macOS-14.