25

I noticed Xcode has released a (non-snapshot) xCode download for Ubuntu.

I looked for an article on how to install it and I couldnt find anything.

Can anyone advise how to do this?

JBraha
  • 113
  • 7
user6333114
  • 513
  • 2
  • 5
  • 7
  • 5
    That isn't XCode for Ubuntu, that's Swift for Ubuntu. The XCode link is just saying that Swift is a part of XCode. –  Jun 01 '16 at 23:21
  • 1
    Is Xcode available for ubuntu? – user6333114 Jun 01 '16 at 23:26
  • 3
    No http://stackoverflow.com/questions/2406151/can-you-run-xcode-in-linux – TheWanderer Jun 01 '16 at 23:27
  • Is there a way to buy/download a version of OS X El Capitan to run it in vmware? – user6333114 Jun 01 '16 at 23:30
  • 6
    Where to buy/download a version of OSX to run in a VM is a question for Apple, not Ubuntu. – dobey Jul 22 '16 at 17:50
  • My brother, from what I know, Apple does not allow/cater for iOS development on non-Macs. You might just find yourself in legal trouble. Some bloggers claim it's not possible to install Xcode on Ubuntu, but I personally did manage to install it. – NMukama Nov 07 '19 at 13:43

1 Answers1

20

To install Swift on Ubuntu, you are going to have install a component called clang:

Go to the terminal and type:

sudo apt-get install clang

If you installed the Swift toolchain on Linux to a directory other than the system root, you will need to run the following command, using the actual path of your Swift installation:

export PATH=/path/to/Swift/usr/bin:"${PATH}"

You can verify that you are running the expected version of Swift by entering the swift command and passing the --version flag:

swift --version
 Apple Swift version 2.2-dev (LLVM ..., Clang ..., Swift ...)

The -dev suffix on the version number is used to indicate that it’s a development build, not a released version.