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.

6
  • 30
    I imagine the answer to this question, sadly, is going to be "no; Apple just said so".
    – Jon Purdy
    Aug 5, 2011 at 20:48
  • 12
    question closed for "blasphemy" ;) Aug 5, 2011 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, 2011 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, 2011 at 0:55
  • @Jon Purdy Well Apple offers "Time Machine" and "Time Capsule" :)
    – Chiron
    Aug 6, 2011 at 1:03

7 Answers 7

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.

11
  • 21
    "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. Aug 5, 2011 at 21:06
  • 4
    I'll change it to "contractually" for more precision.
    – user28988
    Aug 5, 2011 at 21:21
  • 4
    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, 2011 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. Sep 21, 2014 at 13:50
  • 4
    @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. Sep 21, 2014 at 19:51
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)

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.

1
  • Others are saying that there's this chain of dependancy that goes like: xcodebuild & codesigning, which require 👉 apple libs, which can only be installed on 👉 MacOSx, which only installs itself on 👉 a machine whose bios Apple manufactured. So with all thisyou could use a virtual machine. but then the spirit of the OP question was testing if for example we could dnf install some stuff.
    – airtonix
    Jan 22, 2022 at 8:45
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.

1
  • Sure, but will your app look like it's been developed with the proper consideration for that platform? or will it look like something an IOS developer just click "build for android" without even looking to see if any of UX flows translated well to the android paradigms?
    – airtonix
    Jan 22, 2022 at 8:47
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.

1
  • This is something no other answer illuminated and it's a pretty big blocker for those looking to build quality apps that feel like they belong on the target platform.
    – airtonix
    Jan 22, 2022 at 8:49
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.

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.

2
  • 1
    Updates please! Oct 28, 2015 at 15:11
  • eight years later and no update... sounds like a resounding success?
    – airtonix
    Jan 22, 2022 at 8:47

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