Writing code for the iPhone. How?

Discussion in 'iPhone/iPad Programming' started by MacDryCleaner, Mar 7, 2008.

  1. macrumors regular

    Joined:
    Jun 3, 2007
    #1
    Hi All -

    I want to write an iPhone app for my business (I'm a dry cleaner and I want to write something for in house inventory and for my delivery guys). The extent of my program writing is this:

    10 Print "Hello"
    20 Goto 10

    So, my question is: How does a moron like me learn how to write code for the iPhone? Is there a certain direction anybody could push me into to learn about writing code? How hard is it really? I write a lot of my own Filemaker Pro databases and some of them are quite complex ... is there even any comparison to writing code?

    Any help or suggestions would be appreciated.

    On a side note, is there a way for me to 'flag' particular discussion threads in this forum so I don't have to search around for them every time?

    Have a great day everyone.
     
  2. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #2
    See http://developer.apple.com/iphone/sdk1/

    You can subscribe to threads, go to Thread Tools>Subscribe to Thread.

    Probably, databases are pretty key in programming.
     
  3. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #3
    You need to learn Cocoa programming, it's what the iPhone uses, and what the Mac uses. But if you haven't done any "real" programming, learn Cocoa for the Mac first as it'll be easier, then once you feel comfortable with that start playing with the iPhone SDK.
     
  4. macrumors 6502

    Joined:
    Aug 4, 2006
    #4
    Hey Kainjow. I basically had the same question as him. After reading your response, why do you think learning Cocoa for Mac will be easier? I mean, wouldn't that be twice the work since one would first have to learn Cocoa for the Mac then go back and learn Cocoa for the iPhone? And second, I know where all the iPhone software documentation is (on the Apple site) but where is the Cocoa for Mac documentation. Thanks so much.
     
  5. macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #5
    and yes to flag threads if you go to the thread and then in the thread tools, at the top of th thread, in the blue bar there will be a drop down option to subscribe to the thread and it will appear in your user cp when changes in the thread occur
     
  6. macrumors member

    Joined:
    Jul 31, 2007
    #6
    Kainjow, didnt you write pod2go? I loved that app (before i got my iPhone).
     
  7. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #7
    Yes I did. The app is still alive, it's just under new management, but I'm still the developer :)
     
  8. macrumors 65816

    ChrisN

    Joined:
    Aug 27, 2007
    Location:
    Demarest, NJ
    #8
    I am also new and I want to know what should I learn first cocoa or C?

    Thanks,
    ChrisN
     
  9. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #9
    Objective-C.

    C is a different language.
     
  10. macrumors 68040

    Joined:
    Apr 22, 2005
    #10
    Cocoa is not a programming language, it is basically a set of frameworks that you use in your code. Trying to learn Cocoa without knowing how to program will be an exercise in frustration. You might as well start by learning C, since ultimately you will need to know Objective-C, which is a superset of C.
     
  11. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #11
    I wouldn't consider it a different language. Objective-C is a superset of C, so it supports all C features, but it has additional capabilities for working with objects.
     
  12. macrumors 6502

    Joined:
    Dec 29, 2007
    #12
    I'm in the same position, I'm trying to make an iphone app for my business. http://cocoadevcentral.com/ This website has helped me out so far (in the two days I've been using it). From what the keynote said the iphone uses basically the same language (cocoa) as the mac, except for the touch screen instead of keyboard less powerful etc.

    GL
     
  13. macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #13
    You'll be better off contracting this out to some clever kid of college age..

    Programming takes years to learn, or at least to learn properly.
     
  14. macrumors 6502a

    Joined:
    Mar 22, 2007
    Location:
    Scotland
    #14
    Hi,
    As the previous poster just said, this is not a trivial undertaking and you should either consider contracting the job out.

    However, this decision will depend on a number of factors, not least of which is how soon you need your application up and running. You need to balance the cost of not having the app for perhaps 12 months with the cost of contracting the job out to someone who could have it up and running in perhaps 1 month. Also consider if this is likely to be a one-off or if you expect to need further applications.

    If you can live with 12 months of learning to program and/or think you might develop more than one app or if you simply can't afford to pay someone to do the work for you then don't be deterred - give it a go! Set yourself some realistic milestones (perhaps the first being "Hello World!" on an iPhone screen...) and keep evaluating whether to continue or cut losses and get someone to do it for you. At the very least you will know what you are talking about if you do hire a programmer and will be in a better position to justify the cost/benefit of the project. Make sure you get the source code for the app if someone else writes it, ideally as the project progresses (maybe weekly in exchange for partial payment?) in case it all goes pear-shaped and you need to get someone else involved. There are likely to be a large number of people out there just now who see iPhone development as a way to make a living but may not have the experience to carry it off yet. I'm a software consultant working for an IT company in the UK and have a 25 years of programming experience including mobile device development mainly in Java, C/C++ and VB and I must say I am tempted to give freelance iPhone development a try. However, I would not take on a commercial project like this until I had invested a good 2 or 3 months of my own time in getting my skills up to speed. It is a good way for me to justify buying an iPhone though... ;)

    Good luck!
    Craig.
     
  15. macrumors member

    Joined:
    Dec 28, 2007
    #15
    Hello. I am in the same boat. I am working as a programmer, but I am working with mainframe and VB6, I know a little bit of C. Can anyone point me the good book that I might benefit from? Do I have to start with ObjC? Thanks.
     
  16. macrumors 6502

    Joined:
    Dec 29, 2007
    #16
    I'm not to cheap to pay someone to do it for me, but it is a very simple app I am trying to do and plan to do more in the future.
     
  17. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #17
    I'd suggest downloading the SDK and reading the documentation. Apple discusses exactly what you need to know to write iPhone applications.
     
  18. macrumors 6502a

    Joined:
    Mar 22, 2007
    Location:
    Scotland
    #18
    Speaking as someone who would love the answer to your question to be, "No" I'm afraid that the real answer is probably, "Yes". I don't want to learn ObjC as I have too many other languages rattling around in my head already but it seems from lurking around on these forums for a while now that ObjC & Cocoa is the best way to code for both the Mac and the iPhone. In fact it may be the only practical way to code for the iPhone at present although I'm not certain about that. I'd much rather use Java or Ruby and these are supported to some extent (eg. RubyCocoa, Java 5&6 and Sun Java for iPhone) but I still think that you will be up against it to compete with someone writing the same app in ObjC/Cocoa on either the Mac or the iPhone. If anyone disagrees I'd be delighted but also surprised...

    The good news is that I gather that ObjC is a steep learning curve initially while learning the slightly odd syntax but is supposed to be very productive and robust afterwards. If the Mac marketshare continues to climb it might be a worthwhile skill to invest in. I'm certainly thinking carefully about giving it a go.

    Cheers,
    Craig.
     
  19. macrumors member

    Joined:
    Dec 28, 2007
    #19
    Thanks, kainjow. I already downloaded SDK and all the videos, so I'll jump into it and try to learn. Also another question is computer configuration that I need to start working with SDK, etc. I have IBOOK G4, Mac OS X, 1.2 GHz,1.25Gb. Do you think it is enough (hopefully not - then I will have an excuse to upgrade:cool:)
     
  20. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #20
    The SDK is only supported on Intel based Macs. Yours is PowerPC based.
     
  21. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #21
    I don't know why people think Obj-C is so hard. If you know dot notation, you can pick up the bracket syntax easily.

    Example 1:
    Code:
    // C++/Java
    bear.eatFood();
    
    // Objective-C
    [bear eatFood];
    Example 2:
    Code:
    // C++/Java
    bear.attack(rabbit);
    
    // Objective-C
    [bear attack:rabbit];
    Easy, eh? :)
     
  22. macrumors 68040

    Joined:
    Mar 24, 2006
    Location:
    Nottingham, UK
    #22
    now you put it like that... yeah :)

    i'm primarily a html/javascript now doing c#.

    i managed to d/l the sdk but haven't had a chance to play around with it yet..

    i plan to use the video tutorials on apple as a starting point and take it from there..

     
  23. macrumors 68000

    tominated

    Joined:
    Jul 7, 2006
    Location:
    Queensland, Australia
    #23
    It's not that, it's all of the other stuff like the fact that declarations and stuff have to be in a certain area as an example.

    BTW: now that i think about it, that syntax looks a tad like what i saw of ruby a while back
     
  24. macrumors 65816

    MacDonaldsd

    Joined:
    Sep 8, 2005
    Location:
    London , UK
    #24
    I actually prefer Obj-c syntax, although its long winded it readable and understandable.

    I have only played with Java, but from my short time using it I found that you end up with brackets all over the place making it hard to read.
     
  25. macrumors 65816

    MacDonaldsd

    Joined:
    Sep 8, 2005
    Location:
    London , UK
    #25
    Ooooh plugged in iPhone and it says do you want to use this device for development. Shame you can't yet.
     

Share This Page