How to make an Application?

Discussion in 'Mac Programming' started by JelvisChan, Jun 6, 2009.

  1. JelvisChan macrumors member

    Jan 9, 2009
    Hello everyone, hear me out:

    All of a sudden I had this interest to make an application for my machine, just like the ones standing in my Applications folder.

    Now, of course, I had this though - "Where do I start to do this?", which of course is unanswerable if you don't know what to do.

    I wanted to know where to start if you want to build a simple application on a Mac ( I have an intel iMac 08 2.4GHz ).

    Is there an application I must download to start this, or can I just start from scratch. It just has to be simple. Not complicated at all.

    Let's see whatcha got.
  2. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    At the top of the forum there is a link:
    How do I get started programming on the Mac (or iPhone)?

    It has information on XCode, and general guidance on how to get started.

    I don't know that you're going to be making much without some complication. Getting "Hello, World!" to display to the console with an NSLog message is easy... building a window in interface builder that says "Hello, World!" and having that be the main .nib/.xib that an otherwise empty program displays isn't too hard, either.

    Beyond that, if you've never programmed before there's going to be a long way to go before you're making things that rival what's in your Applications folder (other than, say, Textedit or Calculator, and even something at that level might take you a while).

    I don't mean to discourage you at all, and we're certainly happy to help, but programming isn't something you can casually pick up in an afternoon.

    Good luck!

  3. JelvisChan thread starter macrumors member

    Jan 9, 2009
    Haha, just to let you know, I am an EXTREMELY experienced programmer.

    I took 8 years in computer technology.
    I am just knew to mac and don't know how to start.

    Xcode seems to simple.
    Is there anything else?
  4. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    Sorry, didn't mean to presume. There was not mention of earlier programming experience in your post and we get plenty of folk through here that are brand new to programming.

    Sign up for a free ADC account so you have access to everything here:

    There's sample code, reference documentation, API docs, etc. there. The API docs are also available in XCode under help->documentation.

    Interface builder is an app that is complementary to XCode, where you can build your application windows, do the layout for your controls, etc. and connect these to methods in a controller class.

    Otherwise, there's plenty of cocoa and Objective-C examples and discussion out there, and the people here are pretty helpful.

  5. mpemburn macrumors member

    Jan 11, 2008
    Bel Air, MD USA
    Hi JelvisChan,

    As someone who trod the same path not very long ago (about two months), I can give you some hints. My first look at building a "Hello World" came from YouTube:

    Next, I followed the tutorial here:

    I've found the Apple documentation for the various object classes to be particularly useful. The easiest thing to do is to Google the class you're interested in (e.g., NSString, NSData, etc.) and follow the link to its Class Reference. Most provide links to sample code -- in many cases full application projects -- to illustrate how to use specific methods of the class or the class as a whole.

    Best of luck!

    -- Mark
  6. JelvisChan thread starter macrumors member

    Jan 9, 2009
    Thank you everyone for your quick and detailed effort to help me in my Programming Experience.

    I will take a look at all of your links and get on with my job.

  7. Thomas Harte macrumors 6502

    Nov 30, 2005
    What do you mean by Xcode seems too simple? If your problem is that you don't like the interface and you're an experienced programmer anyway, then you can always drop to the terminal. Xcode is based around GCC/etc, so everything you probably already know about makefiles will apply — albeit that you'll probably want to write a quick script to package as an application bundle and to generate an Info.plist that points to whatever [X/N]IB you intend to use as your main nib file and whatever should be your principal class.

    That all said, I really think Xcode + Interface Builder is the way to go. It's not any sort of programming-made-easy interface if that's what you're concerned about. All that stuff with placing controls in Interface Builder and wiring up actions and outlets isn't a construct, it's actually how Cocoa works internally. If you're coming from older frameworks like MFC then it may feel like a whole lot of code is being hidden from you, but that simply isn't the case — there isn't any code to write.

Share This Page