25

Why can't Xcode be hacked to be able to run on Windows? Does Xcode have another programming methods?

Also, I heard that iPhone apps are made with Objective-C, so why is this not available in Windows?

Thanks

ssube
  • 47,010
  • 7
  • 103
  • 140
CodeOverload
  • 47,274
  • 54
  • 131
  • 219
  • 6
    @Nick: It might be.SO is (and should be) open to the greenest beginners. There remains the possibility that the poster simply doesn't know why random program X for the mac won't also run on a windows box. They *are* both subclasses of Computer, after all. – dmckee --- ex-moderator kitten Jan 14 '10 at 16:05
  • 4
    No windows developer/user would want such a mess. – LolaRun Nov 09 '10 at 16:34
  • 4
    Debatable. Xcode is a very nice dev environment to use. I have to use VS, Xcode and Eclipse and they are all great tools. Xcode however is far from a "mess". – ingh.am Dec 02 '10 at 22:42
  • 1
    @LolaRun Xcode is a pretty sweet IDE, once you get used to it's interface (which differs wildly from both Eclipse and Visual Studio). – Randolpho Jan 17 '12 at 16:07
  • 5
    The main reason is that apple wants you to buy one of their computers. – ThiefMaster Jul 25 '12 at 09:07
  • 4
    it is just called Visual Studio on Windows :-) –  Jan 14 '10 at 15:55

6 Answers6

77

Xcode is written in Objective-C and takes advantage of a number of OS X frameworks, so porting it to Windows would require porting all the frameworks on which Xcode relies. Furthermore, Xcode also uses a number of programming tools that would have to be ported to Windows as well (some of them already are, of course).

There are several reasons that Objective-C isn't readily available on Windows:

  1. Most development of Objective-C frameworks takes place on OS X, and a lot of the frameworks aren't open-source and thus can't be ported to Windows (they'd have to be rewritten).
  2. There are some open-source frameworks that could be used on Windows -- for example, OS X's AppKit and Foundation frameworks are (mostly) available as part of the GNUstep project -- but these frameworks aren't widely used or supported on Windows, and sometimes lack capabilities found in their OS X counterparts.

That said, GCC is available on Windows, and since GCC is an Objective-C compiler, you could compile Objective-C code on Windows if you had the right libraries available (or didn't use any third-party libraries). But Objective-C isn't terribly useful without supporting frameworks, and those are rare or nonexistent on Windows.

mipadi
  • 398,885
  • 90
  • 523
  • 479
  • 1
    Much more complete than my answer. Props to you. – dmckee --- ex-moderator kitten Jan 14 '10 at 16:00
  • 20
    +1 Great answer. Add to that the fact that Xcode is made by Apple, which has zero interest in making development on a Microsoft platform easier or more pleasant. One could similarly ask why Microsoft doesn't port Visual Studio to OS X or Linux. The smart thing is for each company to invest in their own platform and development ecosystem — the draw of Xcode and building iPhone apps are part of what makes switching to the Mac all the more appealing. :-) – Quinn Taylor Jan 14 '10 at 17:26
  • I don't agree it's smart. The primary reason most developers stick to developing for one OS is because companies like Apple refuse to offer cross-platform support for their development tools, which, ultimately, results in less productivity. Furthermore, requiring new-time developers to pay 99$ a year just to develop an app that may not even be successful anyway makes iOS development even more unattractive and is a ridiculous idea. –  Oct 19 '15 at 19:13
21

Same can be said why isn't there Visual Studio 2008 for OSX.

Yada
  • 30,349
  • 24
  • 103
  • 144
7

Xcode is a big application written to set of APIs not present on Windows. Porting it would be an enormous job, maintaining it would be a big job, and there are already popular IDEs on the Windows platform.

gcamp
  • 14,622
  • 4
  • 54
  • 85
dmckee --- ex-moderator kitten
  • 98,632
  • 24
  • 142
  • 234
0

Actually you can install Mac OS X on any Intel CPU based machine. It is legal as you own the orginal install DVD for the OS X system. After aquiring a copy of Virtualbox or VMWare (either is great, personally I prefer Virtualbox because the display settings are more customizable). Virtualbox allows setup on initial setup while VMWare requires an extra step to ensure compatibility. You can then find the steps online to setup a virtual copy of MacOS X.

After going through the steps to install the OS in the Virtual Machine, you can then go through the process to find XCode in the Apple App Store. From there, have at it. Start programming in XCode and have a good time. Since XCode has its own device emulator you have a built in platform for iOS testing. There may be times where it is a bit buggy but that is to be expected with ANY emulator for ANY system you run.

After you get everything installed and going, sit back and enjoy the programming ride. The only catch is if you want to post anything on the Apple App store and then you will have to deal with getting an Apple Dev License. Objective C can be a bit difficult at times but, at the same time, it can be very satisfying when you solve those programming problems (as with any programming language right ;-) )

Enjoy

PS... this VM install keeps up with all updates from the Apple App Store so keeping the system updated won't be a problem.

PSS... I will not condone anyone for where their source of software is but do keep in mind, setting up a VM with VMWare or Virtualbox and an install DVD is only legal IF you personally OWN the install DVD you created the install image from yourself!

0

The same reason you can't install Mac OS X on your PC: Apple chooses to make it available only to people who own their own brand of computers.

sdornan
  • 2,805
  • 2
  • 15
  • 7
  • MAC OSX is hacked, and can be installed on pc, so why XCODE ? – CodeOverload Jan 14 '10 at 15:53
  • 4
    Installing an OS on a PC is different than porting apps/frameworks to work on different architectures. You're not just comparing apples to oranges, you're comparing cherries to watermelons (in terms of the amount of work necessary... and maybe I'm understating the watermelons). – Adam V Jan 14 '10 at 16:00
  • atlast cherries & watermelons can be compared for sweetness :) – CodeOverload Jan 14 '10 at 16:03
  • 1
    You're comparing cherries to a good pair of pants. Both can be classified as "good" but for very different uses. – Taryn East Jul 24 '12 at 08:36
0

I guess that porting XCode would be close to very hard (if not impossible) but even if you were able to have a running XCode version under Windows, I guess that it won’t do what you really want it to do. I assume you want a complete iPhone SDK environment which is reliant on XCode and Interface Builder in a very tight way. That’d require the port of Cocoa Frameworks (among other things) that would be, now for real, impossible to port.

Truth is, as much as you will surely need Windows for Windows Phone development, you need a Macintosh computer for iPhone development.

On the other hand, Xcode as an IDE, is not the best in the world, so even if you managed to get Xcode and make it use, .NET (for example), I’d much rather use visual studio for that.

Martin Marconcini
  • 26,875
  • 19
  • 106
  • 144