Skip to main content

Starting iPhone app development in Linux?


I've heard that you need to get a Mac if you want to develop iPhone apps. Is this true?



Is it possible to develop iPhone apps using Linux? If yes, what do I need and where do I download the necessary tools?


Source: Tips4allCCNA FINAL EXAM

Comments

  1. To provide a differing response, I'm running OS X 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.

    ReplyDelete
  2. 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

    ReplyDelete
  3. 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!!!

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

    ReplyDelete
  5. 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).

    ReplyDelete
  6. 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.

    ReplyDelete
  7. The only way I know of doing development in Linux for the iPhone would be to install Vmware and work on getting OS X running in a virtual machine. With that said there are some "legal" concerns in doing that. It is reported that OS X 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.

    ReplyDelete
  8. You might be able to write code on a Linux box that will eventually find itself on an iPhone or iPad, but ultimately you would need a Mac to test or deploy the code to the iPhone or to submit it to the App store. So ultimately you need a Mac, so you might as well do the work on the Mac too, with all the tools that Apple provide. There are alternatives to Xcode & Objective-C, such as Monotouch - but these utilize the Apple tools too.

    You can with some work run OS X in a VM on Linux. However I should point out that this will break the OSX license agreement, even if you buy the copy of OSX - as it is only licensed to run on Apple hardware.

    Sorry to give you this news - the ecosystem around the iPhone/iPad is very tightly controlled.

    EDIT: One major exception to this is writing a web app for the iPhone. There are some excellent web apps for the iPhone which are almost as good as user experience as a native app. However I did interpret your question to be about native app development. Web apps, although the user can create an icon for launching them - are still 'second class' citizens.

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

    ReplyDelete
  10. 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.

    ReplyDelete
  11. To a certain extent, yes, it is possible. You can type Objective-C code and set up your projects. You can even test the C and C++ parts of your code with gcc.

    What you cannot do:


    Use Interface Builder to set up your interface, as it's Mac-only. (Not required, but recommended.)
    Compile code that uses Apple's Cocoa classes - they don't exist on Linux.
    Test code in the Simulator - there isn't one for Linux.
    Compile code for real devices or for the App Store - all this requires tools that Apple only provides for OS X.

    ReplyDelete
  12. I would recommend getting a mac because the ios simulator is amazing for testing in the early stages of an app. But I do know of a small company we work with that develops using Unity so they don't need a load of macs. That way they only need one mac for the office and that's just to compile the final build. It also means it works on android but it really depends on what your building because it's a games engine. You may want to look into web apps using frameworks like Sencha Touch Mobile

    Unity: http://unity3d.com/
    Sencha Touch: http://www.sencha.com/products/touch/

    ReplyDelete
  13. 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 OS X 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. :)

    ReplyDelete
  14. You need to get mac for it. There are several tool chains available (like win-chain) that actually lets you write and build i Phone applications on windows. There are several associated tutorials to build the Objective C code on Windows. But there is a problem, the apps hence developed will work on Jail broken i Phones only.

    We’ve seen few hacks to get over that and make it to App Store, but as Apple keeps on updating SDKs, tool chains need regular updates. It’s a hassle to make it up all the time.If you want to get ready app you can also take help from arcapps its launches apps at a reasonable price.
    iphone app development

    ReplyDelete
  15. 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. :-)

    ReplyDelete
  16. I did an attempt to port cocos2d-iphone to GNUstep so that you can Develop game based on cocos2d. However for publishing you need a mac. https://github.com/ANindie/cocos2d-GNUstep.

    ReplyDelete
  17. There's a framework called Rhodes.

    The concept is based on Ruby on Rails and you develop your mobile app in Ruby and HTML, and you can write your code in a Linux environment. You can then create an account at Rhohub, where you add the code (through GitHub), and it allows you to compile it for iPhone, Blackberry, Android, Windows Mobile and Symbian, all off the same code. You don't have to code in Objective-C for iPhone, nor Java for Android, etc. It does the conversions for you. All you need to do is stick to the Rules for creating an iPhone application (or the Phone's you want to develop for) so it can be accepted at iTunes (or the equivalent market).

    This will allow you to add the app to iTunes as well.

    I have not found any emulators, however, which means that to test your app you need to put it on an iPhone, which is a mission.

    I am using this option as I want to create apps for all phones and I use Ruby on Rails already. If you just want to make an app for an iPhone, then invest in a Mac.

    Hope this helps.

    ReplyDelete
  18. On windows I recommend dragon fire SDK. For a small fee you can program in C++ and convert it to Objective-C.

    http://www.dragonfiresdk.com/

    ReplyDelete

Post a Comment

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex