locked
How to set iOS SDK path for Visual Studio for Mac without IDE RRS feed

  • Question

  • User127552 posted

    We use Jenkins for our CI/CD pipeline and there are multiple Xcode versions installed on our Mac build servers

    Xamarin builds using MSBuild launches a particular xcode version using the path settings for the iOS SDK defined via the Visual Studio for Mac IDE. On my local machine I can login as Jenkins user, start the IDE and change the settings, but on our production CI/CD pipeline I'm not allowed to login using a graphical interface (command tool only)

    So I need to figure out how I can set the Xcode sdk path that MSBuild uses.

    Is there - a command line option that I can use with MSBuild to indicate which XCode SDK it needs to use? - or what configuration file is change when changing the Xcode SDK path using Visual Studio for Mac IDE?

    Thursday, June 14, 2018 1:24 PM

Answers

  • User127552 posted

    So, you can change the target Xcode SDK by changing the following file

    • /Users/…./Library/Preferences/Xamarin/Settings.plist

    and change the content for the key [AppleSdkRoot]

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, June 15, 2018 7:46 AM

All replies

  • User127552 posted

    So, you can change the target Xcode SDK by changing the following file

    • /Users/…./Library/Preferences/Xamarin/Settings.plist

    and change the content for the key [AppleSdkRoot]

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, June 15, 2018 7:46 AM
  • User315429 posted

    What about parallel build when two or more builds will work on jobs with different Xcode requirements?

    This should be definitely moved to msbuild param.

    Tuesday, March 19, 2019 8:43 AM
  • User389631 posted

    Xcode is easy. Go ahead and install multiple version of Xcode, for example /Applications/Xcode10.2.1.app and /Applications/Xcode11.1.app

    To use a specific version of Xcode, in your build script, before invoking msbuild, set DEVELOPERDIR to the associated app bundle, for example export DEVELOPERDIR=/Applications/Xcode_10.2.1.app

    My question is about having multiple versions of Mono MDK, .NET Core Runtime/SDK, and Xamarin.iOS and Xamarin.Android. What environment variables to set or msbuild properties to set to choose these? Of course for Android builds, we can set AndroidSdkDirectory and AndroidNdkDirectory msbuild properties. And I guess JAVA_HOME environment variable or I wonder what msbuild property to set for that?

    Thursday, October 10, 2019 4:16 AM
  • User360653 posted

    @Sk8rMarc said: Xcode is easy. Go ahead and install multiple version of Xcode, for example /Applications/Xcode10.2.1.app and /Applications/Xcode11.1.app

    To use a specific version of Xcode, in your build script, before invoking msbuild, set DEVELOPERDIR to the associated app bundle, for example export DEVELOPERDIR=/Applications/Xcode_10.2.1.app

    I wish this worked but it does not seem to. We have a lot of builds setting DEVELOPERDIR and msbuild does not seem to respect it. I'm going to investigate the plist file, maybe something in the plist file could be done to get it to respect DEVELOPERDIR.

    Monday, March 29, 2021 6:22 PM