1

I can't find an image in Azure DevOps support macOS builds with Xcode 13.

Does anyone know how where to find or how to add such an image in Azure DevOps?

pkamb
  • 33,281
  • 23
  • 160
  • 191
RBZ
  • 2,034
  • 17
  • 34

2 Answers2

1

For Xode 13 and IOS 15 , you can try to use the Microsoft-Hosted Agent: macOS 11.

enter image description here

In the 9/17 update, Xcode13 has been added to macos11.

Refer to the release note: macOS 11 (20210917 update) and Macos 11 agent configuration

Kevin Lu-MSFT
  • 20,786
  • 3
  • 19
  • 28
  • I am using Pool: Azure Pipelines Image: macOS-11 Agent: Hosted Agent However, when I run the build the is clearly using '/Applications/Xcode_12.5.1.app'. Is there some parameter that will result in the image with XCode 13? – RBZ Sep 28 '21 at 14:05
  • It is also worth asking, @Kevin Lu-MSFT, are virtual environments shared between Azure DevOps and github.com? – RBZ Sep 28 '21 at 15:11
  • Yesterday it worked but today I get – Andrii Oct 07 '21 at 13:10
  • `(default target) (1) -> (_CompileToNative target) -> MTOUCH : warning MT0079: The recommended Xcode version for Xamarin.iOS 15.0.0 is Xcode 13.0 or later. The current Xcode version (found in /Applications/Xcode_12.5.1.app/Contents/Developer) is 12.5.1.` – Andrii Oct 07 '21 at 13:11
  • `MTOUCH : warning MT0109: The assembly 'System.Security.SecureString.dll' was loaded from a different path than the provided path (provided path: /Users/runner/.nuget/packages/system.security.securestring/4.3.0/runtimes/win/lib/netstandard1.3/System.Security.SecureString.dll, actual path: /Library/Frameworks/Xamarin.iOS.framework/Versions/15.0.0.6/lib/mono/Xamarin.iOS/Facades/System.Security.SecureString.dll).` – Andrii Oct 07 '21 at 13:12
  • `(default target) (1) -> (_CompileToNative target) -> MTOUCH : error MT0180: This version of Xamarin.iOS requires the iOS 15.0 SDK (shipped with Xcode 13.0). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only in your project's iOS Build Options > Linker Behavior (to try to avoid the new APIs).` – Andrii Oct 07 '21 at 13:12
  • Can any one help me with version update https://stackoverflow.com/questions/73540723/how-to-update-xcode-version-to-13-4-1-in-azure-pipeline – Sagar Aug 30 '22 at 10:36
1

According to this article you need to find the latest Mono and XCode version (listed here) and manually set them using

/bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 6_12_10"
/bin/bash -c "echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_13.0.app;sudo xcode-select --switch /Applications/Xcode_13.0.app/Contents/Developer"

Then build using

mono 
'/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/msbuild.dll' 
/p:Configuration=$(BuildConfiguration) 
/p:Platform=iPhone 
'<path to project>'
Andrii
  • 1,081
  • 1
  • 11
  • 24