26

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.

Random42
  • 10,520
  • 10
  • 52
  • 65
dan
  • 2,273

7 Answers7

19

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.

19

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)

grahamparks
  • 2,109
8

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.

Tom Kidd
  • 817
4

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.

Selali Adobor
  • 649
  • 4
  • 14
1

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.

Alan Shutko
  • 1,430
0

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.

Pieter B
  • 13,310
0

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.

sammoore
  • 109