Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I understand why you can't develop OS X apps on a Linux computer, but is there a good technical reason why you can't develop iPhone and iPad apps on Linux? Why isn't it possible to compile iOS source code into an iOS executable and run it in an iOS simulator on Linux or install it on a development iOS device?

Is it just because the XCode IDE is a Cocoa application?

You can develop Android apps on any kind of platform, it seems. I don't see why the same can't be true of iOS.

share|improve this question
22  
I imagine the answer to this question, sadly, is going to be "no; Apple just said so". –  Jon Purdy Aug 5 '11 at 20:48
11  
question closed for "blasphemy" ;) –  thorsten müller Aug 5 '11 at 20:56
1  
On a side note, you can get "Mac Mini" machine. It is cheap not to mention it is really a fine machine. –  Chiron Aug 5 '11 at 22:47
2  
@The Legend of 1982: I misread fine machine as time machine, and experienced an instant of simultaneous boyish excitement and contempt of Apple. –  Jon Purdy Aug 6 '11 at 0:55
    
@Jon Purdy Well Apple offers "Time Machine" and "Time Capsule" :) –  Chiron Aug 6 '11 at 1:03

7 Answers 7

up vote 11 down vote accepted

Mac OS X can only contractually be run on Apple Hardware. iOS requires the Cocoa framework and to have access to a Mac to sign the keychain. While you can use Objective-C on Linux using the OpenStep libraries, you can't push the applications you develop to iOS due to the lack of the correct Cocoa API libraries and while you can push to a jailbroken device without keychaining with a full developer account, in order to sell said app or even to have the public download it, you have play by Apple's rules.

share|improve this answer
11  
"Mac OS X can only legally be run on Apple Hardware" -- I would be very surprised if that were true in any sane legal system. I know for a fact that it isn't true in Germany, because Microsoft tried to pull the same stunt, people ignored it, Microsoft sued, and lost. –  Jörg W Mittag Aug 5 '11 at 21:06
4  
I'll change it to "contractually" for more precision. –  World Engineer Aug 5 '11 at 21:21
3  
Violating the terms of the contract basically just strips you of support privileges. Apple wants to provide good customer service, and the simplest way to do that is to limit the space in which things can go wrong in the first place. If you're running their OS on non-Apple hardware, you're on your own. –  Jon Purdy Aug 5 '11 at 22:27
    
@JörgWMittag How did Microsoft tried to do that? I'm not aware Microsoft makes hardware in the first place at all. –  Nadir Sampaoli Sep 21 at 13:50
3  
@NadirSampaoli: In Germany, Microsoft sells Windows licenses very cheap to PC builders, so that they can bundle Windows with their PCs without increasing the cost too much compared to a PC without OS or with bundled Linux. The intent is that these licenses are pre-installed on the PCs. However, the PC builders realized that they could sell those licenses separately, with a huge profit compared to what they paid for them, but still much cheaper than Microsoft. Microsoft sued on the grounds that those licenses could only be used with the PCs from those builders, but lost. –  Jörg W Mittag Sep 21 at 19:51

There's no particular technical reason, but the developer tools Apple provides only run on Macs, and I don't see them being in any hurry to change that.

With regards to third party developer tools, Apple very publicly dislikes them, and given Apple's absolute veto power over what gets in the App Store, it's not a great idea to invest any significant development time in making/using them.

(One of the development tools - the iOS Simulator - is very strongly tied to MacOS X for sound technical reasons. AFAIK it's actually a thin wrapper between iOS and the very similar MacOS X APIs, which it would be infinitely harder to do on another OS. You'd have to start again from scratch and likely end up with something as dog slow and horrible as the Android emulator)

share|improve this answer

It depends on what you mean by "technical reason"

Strictly speaking I don't believe there's a technical reason that iOS Apps couldn't be developed on Linux. It would require some entity, be it Apple or a group of enterprising/talented hackers, to author a toolchain for it (compilers, maybe an IDE, something to get it on the phone).

So if by "technical reason" you mean "something special about the Macintosh that's impossible and couldn't possibly exist on another platform" then no, I don't believe there is. There's not some special chip on the Macintosh that is required for this, for example.

If by "technical reason" you mean "something preventing me from being able to do it today" then yes, the entire signed code bit doesn't exist on Linux and unless Apple ports it over then that's the ball game.

share|improve this answer

I think it should said you can develop for iOS on other platforms, you just can't build final applications on them.

It's been explained in the accepted answer why you can't build outside of OS X, but there are many development tools that allow you to write iOS apps on other platforms.

Some of the development tools that I've used that allow this :

  • Qt Framework (C++ and Qml): Applications can be written in Windows or Linux then the iOS application is built with XCode on OS X.

  • Unity3D (C#, UnityScript, and Boo): You can develop on Windows and to build an iOS on either platform you generate an XCode project. This also allows further integration with other Objective-C code.

  • Xamarin (C#): You can develop on Windows (and I believe Linux), and use an OS X machine as a build host.

  • Kivy (Python): Also Generates XCode Projects.

And you can find many more projects like these, especially once you start looking at hybrid and mobile web app frameworks like Appcelerator.

share|improve this answer

There is no technical reason at all that you wouldn't be able to develop ios applications on linux. In fact it already happens on windows in Delphi XE. There you can develop your ios apps totally in windows. The only thing in the end needed is that your apps need to be signed. This can only be done on a mac.

share|improve this answer

There is a technical reason that Xcode will not allow development of iOS apps on other systems.

iOS is similar in many ways to OS X. Many of the frameworks are identical or very close. The iOS Simulator makes use of that to provide a very fast testing environment. When Xcode compiles an app to run in the simulator, it creates x86 binaries which link against frameworks that mostly thunk down to OS X frameworks. You end up with a debug build that runs natively on your Mac, which has great performance.

If you look at Android, it creates platform independent apks which are then emulated in one Android emulator or another. This runs a virtual machine which runs the whole Android stack for you to debug. There are emulators which are faster than others, but all of them are much slower than the simulator. The benefit, though, is that they are cross-platform.

For Apple to allow iOS apps to be built on other systems, they would either need to port the frameworks to those OSes so they could write a simulator, or they would have to build an emulator. Either of those would be a chunk of work that would take time away from building new features.

share|improve this answer

While you cannot sign applications for iOS on Linux, and thus distribute them through the accepted methods, you can develop (with the same APIs) on Linux using Theos. This is the toolchain used by the jailbreak community to develop apps for iOS, and it is cross-platform. If your iOS device is jailbroken, I believe you'll be able to push the compiled application to your device via libimobiledevice, but someone may correct me if I'm wrong.

Some more information: http://iphonedevwiki.net/index.php/Theos

I plan to give this a go in the next day or so, and I'll provide updates.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.