Setting up Xcode for Cocoa Development with VisualStudio

The Elements compiler requires Xcode 5 or later to be installed for Cocoa development.

SDK Versions

Please note that in order for things to work out of the box, the version of Xcode you install needs to contain SDK versions supported/known by Elements in form of a folder with .fx files.

In most cases, Elements (in Visual Studio) and CrossBox will automatically determine the highest version of the iOS or OS X SDK supported by both Elements and the version of Xcode you have installed.

Any version of Elements will come with pre-built .fx files for the latest SDKs that were released at the time that version of Elements shipped, as well as support for some older SDKs. Please refer to the .fx Files topic for the current list.

Additional SDK versions might also be available from

Manual action will only be needed if you are working with a beta version of the iOS or OS X SDK (which are confidential and under NDA, so we cannot include prebuilt .fx files that would expose their content). Refer to the Importing new SDKs topic for more details on this.

Connecting to CrossBox

In addition to Xcode, you will also need to install CrossBox on your Mac, as explained in here.

When you create or open your first iOS or mac project in Visual Studio, you will be asked to connect to the CrossBox Server and guided through the process.

Working with Multiple Versions of Xcode

As an experienced Mac or iOS developer, and in particular at times when there is an ongoing beta for the next release of OS X or iOS, you may find that you want to work with multiple versions of Xcode on the same Mac. For example, you might want to use the shipping version of Xcode for your production app work, and switch to the latest beta of Xcode when playing around with the latest OS.

Xcode provides a built-in mechanism for that by having the concept of an "active" version. You can simply keep multiple copies of on your Mac (either in different folders or by naming them something like with an appended version number) and switch which version of Xcode is "selected" and will be seen by CrossBox, in two ways:

  • Inside Xcode itself, you can go to the Preference window, and in the Locations tab you can choose between all the different versions of Xcode found on your system to decide which one is "active" (this is regardless of which version of Xcode you are actually in to change this):

  • Alternatively, you can run sudo xcode-select --switch ''/path/to/'' in Terminal to switch the selected version of Xcode (where you'd replace /path/to/ with the actual path to the version of Xcode you want to use).

You can also use xcode-select --print-path in Terminal to find out what version of Xcode is currently selected. CrossBox uses this command line internally, so you can be assured that whatever the output is, it is what CrossBox will see, as well.