iOS or Mac?

Discussion in 'Mac Programming' started by smirk, Dec 16, 2010.

  1. smirk macrumors 6502a

    smirk

    Joined:
    Jul 18, 2002
    Location:
    Orange County, CA
    #1
    Hi, for a long time I've wanted to learn how to write software for the Mac. I've gotten Aaron's book (a couple times) and worked part way through it but ended up flaking out and stopping each time. Well, now I want to do it again. I was wondering, though, would it be better to learn Mac programming or iPhone/iPod programming? How similar are they? I don't have a special goal in mind, I just kind of want to learn it and see where it takes me. Is one more accessible than the other? The only thing I can think of that would weigh in iOS' favor is that iOS apps are usually smaller scale and single-purpose, while a Mac application is usually a larger endeavor. With that in mind, maybe learning iOS would be more rewarding.

    What do you guys think?
     
  2. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #2
    The biggest question you have to ask is what do you want to accomplish? Do you want to write a Mac app or do you want to write an app that will run on an iPhone/iPad/iPod.

    The main development environment for both iOS and Mac is exactly the same. It uses the same language and even many of the same core libraries. This means if you understand how to program for iOS or Mac, you will probably have very little problems programming for the other. If you write a method to determine the relationship x and y, you could use it universally on both an iPhone app and a Mac application.

    Honestly, if I were doing a desktop-only based application, I would probably use Java and not Objective C. While Objective C is specifically geared towards Mac development, I personally find Java to be a more rapid development platform, not to mention it's portable. Suddenly your application would not only run on Mac, but on Windows and Linux as well with few to no tweaks. Hell, eliminating the concept of pointers by the use of Java is often enough to make the difference between a failed weekend project and a future programmer, especially if you are novice when it comes to programming.

    If you really want to write an iPhone app though, definitely go for iOS/Mac development. I can't describe the incredible feeling you get the first time you fire up even a simple iOS app and load it on your device and have it work just like an app from the AppStore.
     
  3. chown33, Dec 16, 2010
    Last edited: Dec 18, 2010

    chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #3
    Running a program on an iOS device requires a signed executable[1]. You can only get a signing key by paying Apple $99/year[2]. Mac OS has no such restriction. You can run any program on any Mac without any fees at any time[3].

    There are also more languages that run on Mac OS: perl, python, ruby, java, applescript, bash, csh, automator, lisp, prolog, haskell, realbasic, chipmunk basic, and on and on and on. So Mac OS is both more accessible (no fees) and more versatile (more languages).

    The scale of the program isn't really relevant. There are some nice small-scale programs for Mac OS. They're just harder to find because the App Store is a big publicity megaphone. Also, a lot of smaller programs simply aren't margeted at all on Mac OS, because the developer doesn't want to take the trouble. They'd rather just give it away, or simply post it on an obscure blog or website (publicity again).

    Your problem isn't technical, so a technical answer isn't going to matter. The problem is discipline. All other issues are irrelevant if you can't stay on task and finish. If you think iOS will motivate you more, go for it. I wouldn't bet on it, though. You'll have a lot to learn just using the iOS simulator, before you run anything on a device.

    I think you should write 10 small Mac programs before attempting anything large. They can be simple; they can be games, utilities, or just little hacks like you might make in Automator. But you should write them.


    [1] Unless you jailbreak.
    [2] Unless you jailbreak.
    [3] Without a jailbreak.
     
  4. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #4
    I think this is the biggest thing that is often glossed over on questions like this.


    I have been programming for at least 20 years now, 10 professionally. I am easily proficient in half a dozen different languages and competent in half a dozen more. At the same the the handful of game or application ideas that I've had in that time frame have never materialized. There is just so much time and effort that is required to build even a simple and basic concept into a full fledged application.

    Not only must you be able to stay on task to finish the programming part of it, but you must have access to other assets or else you will lose interest. For example, you could design the most incredible game engine in the world, but if you are like me, unable to even draw a stick figure, it will be difficult to finish such a gaming project. If when it comes time to start plastering together textures and you have no textures, you will pretty quickly lose interest.
     
  5. smirk thread starter macrumors 6502a

    smirk

    Joined:
    Jul 18, 2002
    Location:
    Orange County, CA
    #5
    I couldn't agree more. I've been programming for 30 years, ~16 years professionally, but I don't have your breadth of knowledge. I can't draw worth a darn. After all these years I'm getting pretty bored with the platform I work on, and was hoping that if I really liked iOS/Mac OS development then maybe I'd change careers to one that develops for it. But chown33 is absolutely correct: it comes down to discipline. We all know how hard it is to come home after a full day of work, deal with family stuff, and then start learning a new skill. I definitely haven't been disciplined enough.
     
  6. Catfish_Man macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #6
    Various things about Mac development are nicer/easier: you can use garbage collection, you don't have to worry about code signing or provisioning profiles or any of that nonsense, you don't have to worry about simulator vs device differences, your performance tools can all run locally instead of having to go over the wire.

    iOS has a few perks of its own though; No NSCell for example.
     
  7. Sydde macrumors 68020

    Sydde

    Joined:
    Aug 17, 2009
    #7
    The way I understand it, iOS is almost identical to Mac OS X, except that the former uses a set of classes referred to as UIKit in place of the AppKit classes used by the latter. I would, therefore, start with the Mac, because it is much more accessible, and work with Cocoa until you become reasonably proficient. Write an app and build it up some. Then you can carry those skills over to iOS and see if that is what you want to do.
     
  8. (marc) macrumors 6502a

    (marc)

    Joined:
    Sep 15, 2010
    Location:
    the woods
    #8
    Let me point out once again that this is simply false. Visit Alex Whittemore's blog for more info.
     
  9. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #9
    I looked at that page and the only thing that might be relevant there involves jailbreaking. Is that what you're advocating? I think that's a big variable to introduce when you're just starting out. Want to show something off to someone on their device? Oh, they need to jailbreak their device, also.

    -Lee
     
  10. (marc) macrumors 6502a

    (marc)

    Joined:
    Sep 15, 2010
    Location:
    the woods
    #10
    Jailbreaking takes 5 minutes. Doing Apple's code signing BS takes ages. Jailbreaking is way easier. Personally, I'd rather have my friends jailbreak their devices to show them my apps rather than install my certificates on their devices.
     
  11. Peter Maurer macrumors member

    Joined:
    Oct 9, 2008
    #11
    That's actually one of the major points one could make in favor of starting with iOS: You have no choice but to learn the ins and outs of memory management there, and that's something every Mac or iOS developer should know off pat, IMHO.

    So if the OP chooses to start on the Mac, I'd recommend ignoring garbage collection at first. There's stuff you can't do with garbage collection even on the Mac, anyway.

    (BTW, here's another vote against jailbreaking. If you're going to develop for iOS, you might as well do it in a way that can theoretically result in products you can eventually sell on the app store.)
     
  12. (marc) macrumors 6502a

    (marc)

    Joined:
    Sep 15, 2010
    Location:
    the woods
    #12
    I wrote my app on a jailbroken device, without paying. When the app was finished, I bought the developer license, put my app in the store and got featured on the iTunes front page one week later. Are you and lee Apple employees or why do you want someone who's new to programming spend $99 right away :confused:
     
  13. chown33, Dec 18, 2010
    Last edited: Dec 18, 2010

    chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #13
    It's simply false that someone has to "spend $99 right away". You can learn to program for iOS without spending anything but time and diligence. In fact, I would encourage this before paying Apple's fee or jailbreaking, for the non-technical reasons I already outlined above.

    I don't know why you're making such a big deal about this. The $99 fee is simply one factor among many, and it's not even a factor until some time after one has already learned how to program. In other words, after learning how to program well enough to make an informed decision, one can decide at that time whether to jailbreak or not.

    And I edited my original reply to mention jailbreaking.
     
  14. (marc) macrumors 6502a

    (marc)

    Joined:
    Sep 15, 2010
    Location:
    the woods
    #14
    ... or you could just jailbreak your device and try it. There's absolutely no harm in it.
     
  15. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #15
    Some people may not want to do this. Pure and simple. While i jailbreak and I see no harm in it, it does make some major modifications to the underlying iOS system. This may not be something everybody is comfortable with.
     
  16. Peter Maurer macrumors member

    Joined:
    Oct 9, 2008
    #16
    Well, I played around with the Simulator for a while at first. But when I eventually wanted to test stuff on the actual device, I simply joined the program. And these days, the company retains an iOS developer account just in case, although we currently don't even have a product on the iOS app store.

    Anyway, I've always considered learning how to jailbreak, staying up to date with the currently most fashionable tools for that, actually doing the jailbreak, and making sure the jailbroken phone gets along with newly released iOS updates a time sink that outweighs spending $99 once a year by far in terms of time==money expenses.

    Here's a free tip for future discussions: Reasoning is usually more compelling than innuendo.
     
  17. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #17
    Less than 10% wreck the security (even the limited amount) that Apple provides for their iDevices. Not recommended by Apple. Limits your options for repairs and OS upgrades. Pay the $99 if you want to develop for it. Consider it part of the cost of fully using the device (being able to write apps for it). Ignore freeloaders.
     
  18. (marc) macrumors 6502a

    (marc)

    Joined:
    Sep 15, 2010
    Location:
    the woods
    #18
    OK, but for a teen $99 is quite a lot.

    The PDF exploit was fixed on jailbroken devices before Apple released their update. By saving SHSH blobs, you can actually restore to older firmwares that Apple doesn't let you. If you don't mess with baseband unlocking, hitting "Restore" in iTunes will erase all traces of a jailbreak. Next time, educate yourself before spreading lies :rolleyes:
     
  19. mr.iso macrumors member

    Joined:
    Dec 29, 2003
    #19
    I was in the same boat. Recently I decided that I wanted to write OS X and iOS apps and so I looked around on iTunes U and found this class:

    http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=395605774

    It is an AMAZING class. I've learned so much from it and it's free! So I would say watch the class I linked first, then at about class 7 start reading Aaron's book along side it. Aaron does some stuff in the book differently than the class does. For example, Aaron says he doesn't like dot notation, so he doesn't use it much. Also, the class doesn't go into key-value observing, but Aaron does. It really comes down to different ways of doing things in the end, but knowing all the options allows you to do things the way you want to. All in all, the development process for each OS is pretty similar, and if you do everything in MVC, a lot of your code will work on both platforms.

    Also, with the class, all the source code and slides are available online as well. He also does a demo and writes a program (or expands upon a previous one) in almost every class. So definitely check that out.

    -Chris
     
  20. smirk thread starter macrumors 6502a

    smirk

    Joined:
    Jul 18, 2002
    Location:
    Orange County, CA
    #20
    Hey everyone, thanks for your thoughts and advice. At this time I don't have a strong preference of one platform over the other, so I think I'll check out that podcast class and work my way through the book and see where that takes me. No knowledge is wasted, right?

    Thanks again!
     
  21. perrien macrumors newbie

    Joined:
    Apr 26, 2008
    #21
    One last observation. I've been Mac/iphone programming for a couple years now (purely as a hobby) and started on the Mac before iPhone.

    I find that with programming for the Mac, I spend a vast majority of the time actually working on the meat of the program and getting it working. Getting an interface is almost a simple after thought. Draw it out in IB, drag a few links and it's done.

    With the iPhone, 90% of my time is spent screwing around trying to get the interface working. Getting views to show up correctly, getting them to switch from one view to another, etc. The actual function of the program is easy, the interface is what's a pain in the rear.

    So MY suggestion would be to start with Mac programming and then move on to iPhone. But maybe it's because I started with Mac that it seems so much easier.
     
  22. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #22
    No lie. Let me see you do a restore after something corrodes your device's dock connector. I'm not paying for your mess.
     

Share This Page