tags:

views:

51871

answers:

14

I've heard that you need to get a mac if you want to develop iphone apps. Is it true? Is it possible to develop iPhone Apps using Linux. If yes what do I need and where to download the necessary tools such as sdk?

+2  A: 

It seems to be true so far. The only SDK available from Apple only targets the MacOS environment. I've been upset about that, but I'm looking into buying a mac now, just to do iPhone development. I really dislike what they are doing, and I hope a good SDK come out for other environments, such as Linux and Windows.

Here's an article about their general ungoodness regarding the SDK

I think it's rather elitist for them to think only macos users are good enough to write programs for their phone, and the fact you need to buy a $100 license if you want to publish your stuff, really makes it more difficult for the hobbyist programmer. Though, if that's what you need to do, I'm planning on jumping through their hoops; I'd really like to get some stuff developed on my iPhone.

stephenbayer
As has been said before, I don't think it's elitism at fault here. XCode and all the rest of the development tools (with the exception of low-level items such as GCC) are written in Cocoa, as are all the iPhone frameworks. They'd need to port all this to other OSs first. That's no small task.
Brad Larson
And even if it is elitism, so what? Need I list other proprietary systems? It's common practice when a product line is first released.
Stephen Cox
Let me know when Microsoft release Visual Studio for Linux and Mac...
Stephen Darlington
Let me know when Microsoft release Visual Studio, Access, Frontpage, XNA, DirectX, Office (with all the features), Movie Maker, Visio, IIS or Exchange for Mac / Linux.
Brock Woolf
Let me know when Microsoft makes it against the EULA to run Visual Studio, Access, Frontpage, XNA, DirectX, Office, Movie Maker, Visio, IIS or Exchange in (Dar)Wine.
lfaraone
+2  A: 

The only way I know of doing development in Linux for the iPhone would be to install Vmware and work on getting OSX running in a virtual machine. With that said there are some "legal" concerns in doing that. It is reported that OSx Server can be virtualized but as far as the development story on that I don't know.

If you are truly serious, that's the what I'd investigate.

Good luck.

Keith Elder
I've tried the VMWare option and at least on my hardware (T5200 Core2, 2M ram), it's unusably slow. My friend had a similar experience.
Parand
Me too. Slow, slow, slow. You don't even want to try.
Nosredna
+31  A: 

The answer to this really depends on whether or not you want to develop apps that are then distributed through the iPhone store. If you don't, and don't mind developing for the "jailbroken" iPhone crowd - then it's possible to develop from Linux.

Check this chap's page for a comprehensive (if a little complex) guide on what to do :

http://www.saurik.com/id/4

GodEater
+3  A: 

Regarding the alternative toolchain, Saurik's site is useful but for latest firmware development he indicates building on the iPhone itself and stays clear of indicating that you may need to copy necessary iPhone firmware files to your Linux environment. It's not impossible, but just requires additional work, especially for signing the code (there are open alternative solutions out there as well).

Also, take a look at other guides (for the same toolchain) that approach it more methodically.

I'd suggest to still do the final build and code signing and packaging in XCode (which may mean borrowing someone's Mac) in case you run into problems when submitting the application to Apple. Using the alternative toolchain opens up (at least on the Mac) the possibility of using other IDEs other than XCode for developing the application and again resorting to XCode for the deploayment and testing with the simulator.

Of course ff you do get the code signing / certificate generation working from the command line outside of XCode then you can install a certificate on your actual iPhone and test there (installing the app via iTunes w/your certificate).

dljava
+1  A: 

You will never get your app approved by Apple if it is not developed using Xcode. Never. And if you do hack the SDK to develop on Linux and Apple finds out, don't be surprised when you are served. I am a member of the ADC and the iPhone developer program. Trust, Apple is VERY serious about this.

Don't take the risk, Buy a Macbook or Mac mini (yes a mini can run Xcode - though slowly - boost the RAM if you go with the mini). Also, while I've seen OSX hacked to run on VMware I've never seen anyone running Xcode on VM. So good luck. And I'd check the EULA before you go through the trouble.

PS: After reading the above, yes I agree If you do hack the SDK and develop on Linux at least do the final packaging on a Mac. And submit it via a Mac. Apple doesn't run through the code line by line so i doubt they'd catch that. But man, that's a lot of if's and work. Be fun to do though. :)

Stephen Cox
It's Xcode, not xCode.
Hunter
New minis are fine for the task. I think they are about $600 and you can use just about any mouse, keyboard, and monitor. Be sure to calibrate the monitor! XCode seems to run pretty well on my unexpanded mini.
Nosredna
+5  A: 

I went down exactly the same path...thought it looked like it would be errr.. fun to develop an iphone app. Xcode runs on OS X only, that's fair enough Apple aren't not obligated to invest effort into porting to linux/Windows, so I look at getting OS X but the EULA states that it is only allowed to be installed on an Apple-Labelled PC.

That's what get's up my nose...could you imagine MS building MS pc components then stipulating to run Windows they must run on their pc components??? It's kinda like Sony Pictures making it illegal to play their dvd's on anything other than a Sony DVD player....this is outrageous!!!

ptutt
Bad analogy. You can run the iPhone on either Windows or OS X, so your argument doesn't hold. You just need OS X to develop for the iPhone. It is very common for a component to be able to develop for it on a single platform.
Martin Cote
it is not a bad analogy but it is limited (like any analogy) to my context. it holds one way... binding OS X to Mac but not Mac to OS X or IPhone for that matter. Think about it from a business perspective...if Apple force a consumer to buy a mac computer to run OS X...they already sold OS X and their hardware...they don't really care if you buy Windows as well, that's no dent in their market share of software or hardware. If you buy an IPhone you have already paid for the OS...it's just using the law to make Apple more profitable. I really wonder if it could be up held by law...
ptutt
"... It is very common for a component to be able to develop for it on a single platform."...agreed it is common, but it is not common to make it illegal to develop solutions on alternative software/hardware when that option is available...what other examples can you think of? The difference is between "able" and "legal".
ptutt
The fact that so many "outraged" developers want to develop for the iPhone shows the success of the iPhone development approach. To come in late and oust every other platform in 2 years is staggering ( http://arstechnica.com/apple/news/2009/02/report-gives-iphone-51-of-us-smartphone-ad-market.ars ). The SDK is directly responsible for that. Of course they would protect it with the EULA.
rpflo
So Apple "aren't not obligated to invest effort into porting to linux/Windows", but they should be obliged to investing effort and porting their OS and test every piece of x86 hardware that exists just so that you can run Mac OS X without buying their hardware??Apple is not a software company, they are a product company. Their product is the combination of hardware and software working together.As a consumer you have a choice and vote with your $$, just as I choose to vote with mine.
Bruce McLeod
@Bruce: Apple should not be obligated to invest effort into porting their OS (it's already ported) and test every piece of x86 hardware that exists (no OS manufacturer does this.)What they SHOULD do is to have a EULA that does not forbid the user to run their software on the hardware of their choice.What it would be NICE for them to do is not try and make it hard for people to use any old PC hardware.
Coxy
+24  A: 

To provide a differing response, I'm running OSX and XCode on a virtualised (VMware) machine on Linux. CPU is a Core2Quad (Q8800), and it is perfectly fast. I found a prebuilt VM online (I'll leave it to you to find) Xcode/iPhone development works perfectly, as does debugging via USB to the phone itself.

It actually surprised me a lot - but I've had no issues at all.

Chaos
So, using your approach, can you sign and distribute it on iTunes?
Ubersoldat
Yep - no problems. You're using XCode, the signing works fine, I've now got a production app on the store, submitted from the VM. I won't name it for obvious reasons.
Chaos
Also, google 'Xelabo'
Chaos
A: 

If you value your time, buy a Mac! I don't know enough about Linux development options to offer a viable solution, but it seems the proposed methods involve some pretty roundabout work. If you plan on seriously writing and selling iPhone apps, I think you could easily recoup the cost of a Mac Mini or Macbook. :-)

Ben Gotow
Now that there are something like 50,000 apps, it's not necessarily easy to make much. Salad days are perhaps gone.
Nosredna
+3  A: 

There's a project dedicated to solve this defect: http://code.google.com/p/iphone-dev

bohan
+2  A: 

Hello bohan,

Does this project overcome the problem that Stephen Cox presented?

"You will never get your app approved by Apple if it is not developed using Xcode. Never. And if you do hack the SDK to develop on Linux and Apple finds out"

Thanks

edup_pt
+1  A: 

Hi edup_pt, You're right non-jailbroken phones are limited to Apple's App store and Apple "has the right" to enforce whatever rule, it's totally nonfree territory. However while developing, one won't have to deal with Apple at all. You can use e.g. rsync to upload the code to the device and test it.

bohan
+1  A: 

You can use Tersus (open source), and it lets you export the app as an Xcode project.

Ofer Brandes
A: 

Lol though imagine if you couldn't interface with your ipod via PC, ipod wouldn't have ever existed It'd be too communistic of Windows to do that but it would have been hilarious in my eyes, but now that Apple has it's foot in the door, people would now surely choose apple over windows if windows denied them of such a thing.

A: 

There are NO legal concerns, as Apple's EULA is only meant to scare pussys. Their EULA is unconscionable as proven by fair use and sony v. connectix. If they dont approve your app, then their in a boatload of legal trouble....

I would check the open source section of apple, many of apple's apps are released open source...

shdwsclan