leo
leo

Reputation: 245

Objective c - anything like c?

Basically I want to try and develop a basic iPhone app. I have 2 - 3 years experience in Java, and am currently studying C now - have done pointers memory management, etc. but very briefly.

Is Objective C going to deviate too much from the C that I have learnt so far, so it will be like learning a brand new language? Or should I be able to use what I have learnt thus far?

Also, what is the best IDE to do this in, currently for c i use dev-c++ - i read that it is possible to develop i phone apps using objective c in this ide but was wondering if there wwere a better option available. Possiblly netbeans :D

Upvotes: 6

Views: 664

Answers (6)

mouviciel
mouviciel

Reputation: 67831

Everything that you learned about C is usable in Objective-C: Objective-C is a superset of C and any C program is correct Objective-C.

Moreover, everything that you know about Java is useful in Objective-C: most of the difference is syntactic sugar.

About IDE, the official way is Xcode on a Mac. It is free and is shipped with iPhone and iPad simulators.

Upvotes: 0

Diego Freniche
Diego Freniche

Reputation: 5414

I'm exactly in the same path: I learned (and used) C in the past, am using Java now and learning Objective-C.

To develop iPhone apps you must download the XCode IDE and iPhone SDK from http://developer.apple.com/iphone/program/

So you MUST HAVE a Mac to develop iPhone apps. There are a couple projects to compile from C# (http://monotouch.net/) and Java to iPhone's ObjC, but I don't recommend you this. Better get a Mac. An Intel Mac, by the way (XCode does not support now PowerPC Macs)

If you know how to develop in Java, you can apply all you knowledge in a different syntax. Yes, there are subtle differences, but start thinking like a "Java to ObjC translator" and you'll be able to develop your first apps.

Also I recommend the following book to start learning: Beginning iPhone 3 Development: Exploring the iPhone SDK

Upvotes: 1

Andrew McGregor
Andrew McGregor

Reputation: 34592

You have to build using XCode tools on a Mac. That doesn't mean you have to edit in XCode, but you're going to be using it to construct the build system, debug, and perhaps run your builds in it (although you can also do that using xcodebuild on the commmand line).

Upvotes: 0

Cruachan
Cruachan

Reputation: 15971

It's very close to C as really it just adds an OOPS layer over the top of normal C. As someone was very familiar with C but never used C++ extensively enough to feel totally at home with it I find I really quite like coding in it.

The syntax is a little odd compared to C++ which does take a bit of getting used to, but once over that hurdle then there's nothing much which will cause you any pain, and a lot of gain.

Of course most of the challenge is not actually learning Objective-C, but coming up to speed with the cocoa API

Upvotes: 2

Edd
Edd

Reputation: 3822

Objective-C is a strict superset of C, so anything that compiles under a C compiler will also compile in your Objective-C compiler.

Essentially Objective-C turns C into an OOP by adding small-talk style messaging to allow communication between objects.

To answer the additional part of your question, XCode is the Apple recomended IDE, and I beleive the only official way to build iPhone apps.

Upvotes: 3

dubbeat
dubbeat

Reputation: 7847

I believe it's very similar. Theres little new syntax really. I'd say you'd get a handle on it in a few days MAX based on your experience

Upvotes: 0

Related Questions