Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Before learning Xcode what programming languages do i need to learn and in what order? Please help! Please help! Please help!

I know a little bit of C++ programming. I have a Mac and my dream is to make one app of my own. Can someone please guide me in correct direction.

What programming languages do I need to learn, and in what order, before I jump on to Objective C++ in Xcode.

MacBook Pro with Retina display, OS X Yosemite (10.10.2)

Posted on Mar 24, 2015 5:57 AM

Reply
Question marked as Best reply

Posted on Mar 24, 2015 7:42 AM

The traditional choice is Objective-C using Apples Cocoa libraries.


Objective-C is basically C with some extensions.


So some basic understanding of C is useful.

Some Objective-C books cover both.


Most OS APIs (Cocoa among them) are used via Objective-C, but some require pure C, making it useful to have some understanding of C.


In the coming years we will most likely see a shift from Objective-C to Apples new programming language Swift. Note that Swift can be added gradually to an existing app by replacing existing Objective-C code or by using Swift for new code.


C++ that is also (mostly) an extension to C, and can be used from Objective-C as Objective-C++. Note that while some OS code is internally C++ based, it will always expose a C or Objective-C interface to the programmer, so while C++ can be used to make OSX/iOS apps its never required.


Summary: learn Objective-C, some C and the Cocoa libraries.

ps: You could also opt to learn Swift instead of Objective-C, but while this may appear attractive there are some drawbacks as the language is still a work in progress.

Expect more crashes and bugs in Xcode and expect some language features to be buggy or to change with later versions of Swift.

It will also be much harder to find sample code using Swift as Apples documentation, sites like Stackoverflow and discussion forums like this one, have until now been using Objective-C, so some basic understanding of Objective-C may be useful simply to be able to understand existing docs.

6 replies
Question marked as Best reply

Mar 24, 2015 7:42 AM in response to njdarjee

The traditional choice is Objective-C using Apples Cocoa libraries.


Objective-C is basically C with some extensions.


So some basic understanding of C is useful.

Some Objective-C books cover both.


Most OS APIs (Cocoa among them) are used via Objective-C, but some require pure C, making it useful to have some understanding of C.


In the coming years we will most likely see a shift from Objective-C to Apples new programming language Swift. Note that Swift can be added gradually to an existing app by replacing existing Objective-C code or by using Swift for new code.


C++ that is also (mostly) an extension to C, and can be used from Objective-C as Objective-C++. Note that while some OS code is internally C++ based, it will always expose a C or Objective-C interface to the programmer, so while C++ can be used to make OSX/iOS apps its never required.


Summary: learn Objective-C, some C and the Cocoa libraries.

ps: You could also opt to learn Swift instead of Objective-C, but while this may appear attractive there are some drawbacks as the language is still a work in progress.

Expect more crashes and bugs in Xcode and expect some language features to be buggy or to change with later versions of Swift.

It will also be much harder to find sample code using Swift as Apples documentation, sites like Stackoverflow and discussion forums like this one, have until now been using Objective-C, so some basic understanding of Objective-C may be useful simply to be able to understand existing docs.

Mar 24, 2015 9:38 AM in response to njdarjee

You have a few choices:

  • Start with C (which is the basis of both Objective-C and C++) and then continue on with Objective-C.
  • As some C features are not really commonly used in Objective-C (or C++) you could also opt for a course or book that covers the "useful" parts of C together with Objective-C.


Starting out with C++ (rather than C) has little benefit for writing OS X / iOS apps.


Objective-C and C++ are more or less C with some extra language constructs to support OO (Object Oriented) programming.

The way C++ does OO differs from Objective-C so C++ is not terribly helpful when trying to understand Objective-C. Also consider that Cocoa and other OS APIs are typically written in Objective-C and assume Objective-C OO features and concepts.


Using C++ (and Objective-C++ to integrate it into an app) is mainly useful if you want/need to use some kind of 3rd party library (e.g. a 3D game engine) or if you want to write high-performance code in a slightly more high-level language than plain C.

Mar 24, 2015 9:53 AM in response to hokanst

Thank you Sir. This is going to help me out to prepare my foundation.

Can I ask few question to close this thread: You really gave me a good advice which I am going to go for but how do you know all this.

1) Are you a programmer or software developer?

2) Have you done apps in Xcode?

3) Can you recommend me some books for C that can help me self teach C and lay a good foundation for Objective C.

I would be happy to read those three answers from you. Finally thanks for guiding me in the right direction. Really appreciate it a lot.

Mar 24, 2015 12:24 PM in response to njdarjee

1) Yes I work as a programmer/developer. I got my CS (Computer Science) degree here in Sweden back in 1992-98.


2) I've worked with Objective-C (for Mac apps) the last few years, but I have yet to release my own apps, so I have little practical experience in releasing and selling apps. Before this I've also done development for telecom hardware (configuration management software but not things like drivers) and web-frontend and server backend code for finance related services.


3) It's been a while since I've learned C so I don't really have any good recommendations. I've myself mostly learned C the hard way from reading "C A Reference Manual", which is a pretty horrible choice as the book is more of a language specification and not intended to teach C programming. Objective-C I've learnt form Apples various Objective-C manuals that can be found at https://developer.apple.com/ if you look around. These manuals are ok but not ideal for beginners.


I've occasionally seen "The C Programming Language" by Kernighan and Ritchie (the original creators of C) recommended but the book is rather old and doesn't follow modern best practices. I've heard good things about "Objective-C Programming: The Big Nerd Ranch Guide" (see http://www.bignerdranch.com/we-write/objective-c-programming/) by Hillegass and Ward, but haven't read it myself.

Before learning Xcode what programming languages do i need to learn and in what order? Please help! Please help! Please help!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.