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"
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.