Really naive questions about starting mac programming

Discussion in 'Mac Programming' started by jnbrand, May 19, 2010.

  1. jnbrand macrumors newbie

    Joined:
    May 19, 2010
    #1
    ... as in so naive I'm not sure if this is even the best place to ask them soif it isn't please accept my apologies in advance.

    I have an application which I have written which works on MS and Linux platforms. Now I want to try moving it onto a mac. I have zero experience with macs, never even touched one. So I'm not sure what hardware or software I would have available to try this. Now as far as I can see the minimum I could get away with is a mac mini, reuse an old VGA I've got around here by getting a mini DVI - VGA adapter and Cocoa and Object C should be available on the mac when I get it.

    Is that really all I need to start just a mini mac and a VGA adapter? No extra costs for compilers, wierd mac only compatible keyboards etc.?

    Ta.
     
  2. sammich macrumors 601

    sammich

    Joined:
    Sep 26, 2006
    Location:
    Sarcasmville.
    #2
    Yup, you're good to go. When Apple announced the Mac Mini they said it was a:

    BYOKMM...bring your own keyboard, mouse and monitor...machine.

    All you need to write apps is Xcode, which runs on OS X. And you're sweet.
     
  3. jnbrand thread starter macrumors newbie

    Joined:
    May 19, 2010
    #3
    Ta.

    and Xcode is ... ? A compiler for Object C? Where do I get that or is that already in the box (or a free download)

    If that is all I need and XCode is not an additiional cost it sounds like it's going to be cheaper in the end than the MS platform. (and I was always told Macs were the expensive option)
     
  4. sammich macrumors 601

    sammich

    Joined:
    Sep 26, 2006
    Location:
    Sarcasmville.
    #4
    All you need do is sign up for an Apple Dev account at http://developer.apple.com/ to get at XCode, and a huge library of developer docs/notes, for free. There is a paid for program that gives you dev video's technical support etc.

    XCode is a very powerful IDE package for developing OS X apps. Grab it, and have a look for yourself.

    EDIT: actually, I think it comes in the box lol. So definitely check it out.
     
  5. NickK1066 macrumors regular

    Joined:
    Jul 23, 2007
    #5
    I would advise to go for an Intel Mini. The reason is twofold a) the newer codebases require Intel and b) Parallels/VMware/virtualbox all use Intel virtualisation - nothing like running your window and linux alongside OSX.

    Yes Xcode comes on the OSX DVD, although it can be a little out of date compare to the later versions available through the developer.apple.com program.

    Upgrading to newer macs has an interesting option for developers - have the old machine as a compilation slave using the distributed build options in Xcode.

    I would look at Aaron's OSX programming stater book from the big nerd ranch as a starter into OSX/Objective-C.
     
  6. Thomas Harte macrumors 6502

    Joined:
    Nov 30, 2005
    #6
    Xcode Developer Tools are the standard GCC tools + LLVM derived tools + an IDE and a bunch of graphical profiling/debugging tools. Though even if you're a fan of makefiles, etc, Xcode + Interface Builder are still excellent ways to design and manage a project and will ensure applications are properly bundled.

    Since you're porting an existing application, note that the Objective-C and C/C++ can all mutually call one another and may coexist within the same source files. Generally speaking, when porting it's easiest to stick to Model-View-Controller, leave the view and controller stuff in Objective-C and call out to C/C++ for the model. Objective-C objects and C++ objects are not interchangeable due to substantial differences in runtime (static versus dynamic typing being the big one).
     
  7. subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #7
    I just wanted to add that you can use C or C++ as well, and you could use other editors like vim etc. But Xcode is very good for cocoa and obj-c imo since it has great integration with frameworks and documentation and so on. I would also look into possibilities to move part of the linux code over to the mac, if it's using 3rd party api's that are available on os x, which is not unlikely at all. All posix api's are of course available as a default.

    Edit: Good suggestions by Thomas in the second paragraph, re mvc and obj-c. It's probably easier to redo this with interface builder and obj-c for a controller class.
     
  8. notjustjay macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #8
    You can also install all of the usual Unix/Linux tools like gcc and build your app exactly the way you did in Linux. Was your app a text-only program or did it use graphics -- X/Motif, Qt perhaps? Those are available freely on Mac OS X as well.

    And yes, as another poater implied, Macs use the same USB mice, USB keyboards, webcams, flash drives, hard drives, etc. as everyone else does.
     

Share This Page