Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Why can't iOS be programmed on a Windows computer.

On the tutorial it says you can only program if you have a mac computer. Is there any way to program on a windows, because I would really like to program iOS.

Sorry, There are no programs for windows for programming iOS. You must own a mac.

4 Answers

There's an app for that check out MacinCloud

They describe their service as:

MacinCloud is a remote Mac rental service. PC, older Mac and Mobile users can use our service to access rented, Apple Manufactured Mac servers through the Internet.

I use the Oracle VM VirtualBox using Ubuntu on my Win7 computer. It does have an option to use the Mac OS X but you would obviously need the Mac OS X disc, for this to work. If all else fails, you could borrow a Mac from a good friend?

OS X VMs are only supported on Apple Hardware.

Hi James, Thanks for your support here at Treehouse. On the other hand, I'm a little confused about your reply? Are you stating the VirtualBox is only supported on Apple Hardware, or are you referring to something different? Because, it is possible to run the VirtualBox on a Windows computer, and easily run different operating systems including Mac OS X.

Mike Morales - If you take a look at the known limations page for Virtual Box, you will see it states

Mac OS X guests (Mac hosts only)

There are ways around this, people can those hackentoshes, but neither virtualbox nor Apple will provide any support with those configurations. So if someone tries to make a hackentosh VM it may some of the work, it may at other times.

It's not exactly the best platform on which to learn to be a iOS developer on.

James, Thanks for the insight about the known limitations. I do play around a lot with the VirtualBox using Ubuntu, and a few other flavors. Although it took me some time to figure out how to use the VirtualBox. Thank you, for the quick response, and your dedication to Treehouse!

Short answer: Because Apple wants you to buy more Apple gear.

John Locke - I like the way you explain the use of licensing agreements to create to vendor lock in :smile:

The answer to your question is not quite as simple as some people make it sound. Often, you will hear: "It is because Xcode only runs on Mac hosts" or "Because Apple doesn't let you program on other platforms" or something along those lines. The answer is far more complicated than that, it has to do more with system architecture.

Operating Systems do a good job of abstracting away a lot of hardware inconsistencies; things like data word sizes and endianness. Each system has it's own set of hardware which causes compatibility issues across different systems.

Compilers are designed to convert plain text into machine code, but only across a relatively narrow range of hardware, as different hardware operate using different instruction sets. It is similar to being a linguist with a finite set of fluent languages and everyone you talk to speaks a different language.

Simply put, even if you had all the source files and libraries, you can't compile a proper binary that an iOS device could execute; much like you can't take the source files from a Windows machine a compile a binary executable on a Mac without any virtualization.

Compilers are designed to convert plain text into machine code, but only across a relatively narrow range of hardware, as different hardware operate using different instruction sets.

I think you are over simplying a bit here and conflating processor architecture and compiler tool chains here

But I'm mostly a sysadmin, not a developer so all the talk about gcc toolchains mostly goes over my head.

You're right, my statement was an oversimplification; compiler tool chains are more complex and portable than what I described in my response. The point I am trying illustrate is that cross-platform compatibility issues concerning source compilation are often hardware-related because the binaries generated by compiler are only for a limited sub-set of system architectures. Source files compiled on one platform will not execute on another without modification, hence the need for tools like Make; it doesn't matter how portable the compiler is.