Learning to code on iOS - swift vs Objective C dilemna

12,862

I would advise learning Swift. It is proving to be popular, and there are some tutorials out already, such as this one (http://ios-blog.co.uk/tutorials/developing-ios-apps-using-swift-part-1/). Learning Objective-C will probably only be useful for a couple months, as Apple will probably push Swift as the main language. You can also get a good tutorial book by Apple on the iBooks store for free. Also, if you are a registered developer, you can get Xcode 6 and ios 8 now.

Share:
12,862
alexbcg
Author by

alexbcg

Updated on June 05, 2022

Comments

  • alexbcg
    alexbcg almost 2 years

    I have just finished a year of university and learnt how to write nice applications with C++, OpenGL and Qt.

    I was just about to start learning Objective C and Cocoa. This seemed optimal to develop iOS & Mac apps since Objective C was, like C++, a variant of C, Cocoa would allow me to make nice UIs and I could continue using my good OpenGL knowledge to do 3d graphics.

    However, Apple has recently announced that many things are changing. Most importantly, they have announced that there is a new language called "Swift", and that they are replacing (from what I understand) OpenGL with "Metal"

    My question is, taking into account the lack of good books/comprehensive tutorials (I had found a great one for Objective C and Cocoa).
    At this stage, should I wait for the release of XCode6 and iOS8 in fall, along with what I hope will be new books and tutorials on learning this new language and do something else in the meantime to avoid learning a defunct language, or should I learn Objective C anyway and then learn Swift when it comes out (and all these new things like Metal etc).

    Is it worth deepening my OpenGL understanding in light of all this new stuff being announced?

  • Myron Slaw
    Myron Slaw almost 10 years
    I think it'll be a bit longer than a couple months before obj-c is gone...
  • mginn
    mginn almost 10 years
    But for a new developer, it's probably not worth it
  • d2burke
    d2burke almost 10 years
    It'll be super helpful for young devs to know Obj-C so they can implement some older libraries, etc....but Swift is the future of iOS. I'm convinced that's why they're releasing it, to court new/young devs
  • guitarflow
    guitarflow almost 10 years
    I'm sure it's good to know the new language but which serious application can afford to only support the latest OS only? For iOS this might be ok mostly, for Mac I couldn't do that ... still have 10.6 users around ...
  • Arno van Lieshout
    Arno van Lieshout almost 10 years
    I have started implementing Swift in my app and I advice you to start with Objective C. For instance just try to make a Generic class in Swift while having it extend NSObject. Or implement a singleton. Also all the large companies have invested a lot in Objective C and all the tutorials are still in Objective C. The tutorial book from apple only focuses on the language not on for instance downloading some data in the background or sending a push notification.
  • Allen S
    Allen S over 9 years
    This question is only important to beginners. With that said if you had only one choice (which you don't), then Obj-C wins hands down. Swift is new and people like new stuff, but won't earn you interview points over Obj-C. And even if Obj-C went away years down the road (emphasis on IF) then you would already have a strong amount of experience with iOS dev that the question would have long since become irrelevant. No offense but I don't see how this is the accepted answer. Learning Swift is trivial to long time iOS devs and the assumption of Obj-C going away in a few months is flat out wrong.
  • mginn
    mginn over 8 years
    I guess it depends what you're into programming for. If you want to be hired by a company to work on their legacy code, then sure, Obj-C is great. But if you want to do independent hobby/amateur development, Swift is an excellent language, and worth learning.