PDA

View Full Version : Learning iPhone Development




anjinha
Dec 4, 2008, 08:57 PM
I'm interested in learning about iPhone development. I don't know anything about programming but I'd really like to learn on my free time. The reason I'm interested is because I love everything related to the iPhone, I have a lot of ideas for apps that I'd like to make for myself and I love a challenge. Also have always been a bit fascinated by programming.

So what I need is to know where to start. Books, tutorials online, suggestions, whatever. Everything is welcome. :)



Blue Velvet
Dec 4, 2008, 08:59 PM
Moved this thread into the iPhone Programming (http://forums.macrumors.com/forumdisplay.php?f=135) forum. See the stickies and the linked Guides at the top of the forum for more info. ;)

anjinha
Dec 4, 2008, 09:04 PM
So I've been looking around a bit and I should first of all learn about programming in Objective-C? And then move to iPhone programming?

CocoaPuffs
Dec 4, 2008, 10:19 PM
So I've been looking around a bit and I should first of all learn about programming in Objective-C? And then move to iPhone programming?
Perhaps start off with Java, which is more documented and have simpler library to start.

You might be a good year or two away from able to write something decent on iPhone.

italiano40
Dec 4, 2008, 10:24 PM
learn Cocoa first since you want to write iphone apps you can't write iphone in java

CocoaPuffs
Dec 4, 2008, 10:25 PM
learn Cocoa first since you want to write iphone apps you can't write iphone in java
I don't think you know what you are talking about...

Cocoa is perhaps the last thing you should worry about if you want to become a proficient iPhone programmer from zero background.

anjinha
Dec 4, 2008, 10:35 PM
I don't mind if it takes a while for me to learn, I think it will be a nice challenge for me. :)

Do you have suggestions on good books to get me started?

CocoaPuffs
Dec 4, 2008, 10:37 PM
I don't mind if it takes a while for me to learn, I think it will be a nice challenge for me. :)

Do you have suggestions on good books to get me started?
Java is the way to go, it is becoming the standard language for introduction to programming.

You can check out http://see.stanford.edu/

chbeer
Dec 5, 2008, 01:42 AM
Java is absolutely !!WRONG!! for the iPhone! It's a nice language but it does not exist for the iPhone (besides some experimental stuff)!!

Read the introductory documentation on http://developer.apple.com/iphone and this book for a first contact to objective-c and cocoa:
Cocoa(R) Programming for Mac(R) OS X (3rd Edition) (Paperback) (http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/0321503619/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1228462807&sr=8-1)

For an intro to iPhone dev. read the documentations on dev.apple.com or a book like this:
The iPhone Developer's Cookbook: Building Applications with the iPhone SDK (Developer's Library) (Paperback) (http://www.amazon.com/iPhone-Developers-Cookbook-Building-Applications/dp/0321555457/ref=sr_1_2?ie=UTF8&s=books&qid=1228462877&sr=1-2). It's from Erica Sadun, who did a lot at the beginning of iPhone coding (before AppStore and the like existed). I didn't read it though...

anjinha
Dec 5, 2008, 01:55 AM
Java is absolutely !!WRONG!! for the iPhone! It's a nice language but it does not exist for the iPhone (besides some experimental stuff)!!

Read the introductory documentation on http://developer.apple.com/iphone and this book for a first contact to objective-c and cocoa:
Cocoa(R) Programming for Mac(R) OS X (3rd Edition) (Paperback) (http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/0321503619/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1228462807&sr=8-1)


Will that book be OK even if I know absolutely nothing about programing? From the description on the amazon page seems like I should have some C/C++ programming experience before reading that one. I'll probably get it anyway I was just wondering if that's the best one for me to start.

neil.b
Dec 5, 2008, 02:59 AM
Will that book be OK even if I know absolutely nothing about programing? From the description on the amazon page seems like I should have some C/C++ programming experience before reading that one. I'll probably get it anyway I was just wondering if that's the best one for me to start.

I'm currently working my way through the same book. Personally I don't think it's for beginners at all, though it is a great book.

I'm only a beginner myself though I have done programming in the past (assembly language, C/C++, and more recently ActionScript (2 & 3).

If you have no C knowledge you could do with starting there, then learn about Objective C. And also you need to understand OOP.

When I started playing around with the tools (Xcode etc), I thought it would be simpler to learn some Cocoa programming so I bought "Cocoa Programming For Dummies". I found it pretty useful (but basic) though the book is based on older versions of Xcode and Interface Builder. It helped demystify some of the concepts and procedures that are required to build an Xcode project, especially objects/outlets/actions stuff.

All IMHO of course :)

anjinha
Dec 5, 2008, 03:04 AM
I'm currently working my way through the same book. Personally I don't think it's for beginners at all, though it is a great book.

I'm only a beginner myself though I have done programming in the past (assembly language, C/C++, and more recently ActionScript (2 & 3).

If you have no C knowledge you could do with starting there, then learn about Objective C. And also you need to understand OOP.

When I started playing around with the tools (Xcode etc), I thought it would be simpler to learn some Cocoa programming so I bought "Cocoa Programming For Dummies". I found it pretty useful (but basic) though the book is based on older versions of Xcode and Interface Builder. It helped demystify some of the concepts and procedures that are required to build an Xcode project, especially objects/outlets/actions stuff.

All IMHO of course :)

All opinions are really helpful, so thanks. :)

spinyanteater
Dec 5, 2008, 03:16 AM
Sorry to add to the confusion, but I am learning iPhone programming with almost no relevant programming background so I can speak from experience ;).

First, for the basics of Cocoa Programming work through the free pdf 'Become an Xcoder' from Cocoalab (www.cocoalab.com/?q=becomeanxcoder).

Then, for learning Objective-C you don't have much choice - it's Kochan's "Programming in Objective-C 2.0". Although the hard copy of this edition has not yet been published, the book is available as a pdf download from Safari Rough Cuts http://safari.informit.com/9780321605559 ).

The classic book to follow this with is Hillegass "Cocoa Programming for Mac OS X". This is what I am working through and there is no doubt that it an excellent book. But there is nothing in it about iPhone programming.

A book that I am expecting to be very good though I have only worked through the free preview chapter (my copy has only just arrived) is "Beginning iPhone Development" by Mark and Lamarche. This may be your best choice :).

Finally, don't get Erica Sadun's iPhone Cookbook! This is a collection of code snippets and is no good at all for beginners. I do have a copy and I have tried it so again I speak from experience.

Good luck!

Cromulent
Dec 5, 2008, 04:32 AM
Any book with "Cookbook" or "Effective" in the title is most likely aimed at those with a solid grasp of the language and related concepts.

Personally I would start with C then learn Objective-C then finally spend the time learning the Cocoa APIs.

Without a decent understanding of C concepts such as pointers and memory management are going to be much harder in Objective-C. I've seen so many newbies (actually seems to have started fairly recently) that do not know the difference between int *myInt and int myInt. Something that knowledge in C would remedy.

Plus with Objective-C being a strict superset of C your still learning applicable information for iPhone programming.

spinyanteater
Dec 5, 2008, 06:31 AM
Personally I would start with C ...
I appreciate that already knowing C is a huge bonus in learning Objective-C, but I just want to add that Kochan's book is specifically written for people who do not know C. He aims to teach Objective-C and the underlying C as an integrated language.

liptonlover
Dec 5, 2008, 08:01 AM
First, for the basics of Cocoa Programming work through the free pdf 'Become an Xcoder' from Cocoalab (www.cocoalab.com/?q=becomeanxcoder).

I absolutely agree. If anyone's read my posts in beginner threads before, I always recommend that tutorial, because it's the best of the best. The only thing is it's for desktop programming, not for the iphone. But I advise you start with the desktop anyways, because you'll find more tutorials and information, and because it's just plain easier, IMO. Becomeanxcoder assumes you don't know how to program, whatsoever. It will teach you enough C to get by, it will teach you the basics of objc and cocoa which is what you need for the iphone, and it will teach you how to use xcode and interface builder. One little problem; it's slightly outdated. There will be some differences in xcode that you will have to figure out. But it's not too hard, and absolutely worth it.

I said before becomeanxcoder teaches you enough C to get by, but I don't think that's enough. You should really know the language pretty well, even if you can't write a real app using it. It will help you in the future. So for that, I advise you go to www.cprogramming.com. There you'll find tutorials for C and C++ if you ever want to go there, and a ton of links for various things that you may or may not be interested in. It's all old stuff, but still perfectly relevant. You'll have to figure out how to start a C project in xcode, though, I don't remember how.

Good luck!
Nate

caveman_uk
Dec 5, 2008, 09:29 AM
I don't think you know what you are talking about...

Cocoa is perhaps the last thing you should worry about if you want to become a proficient iPhone programmer from zero background.
Well you won't program an iPhone without Cocoa. Personally I've been programming for twenty years and have never used Java - C, C++, assembler (Z80, 6502, x86), Cobol (unfortunately), Pascal, Basic (VB and others) and Cocoa/Objective-C - but not Java. I don't feel I'm missing anything for having missed it out.

FWIW, I have published Mac and iPhone apps that are making several hundreds of dollars a month.

firewood
Dec 5, 2008, 09:40 AM
If you already know a procedural language which had lots of books on it (Basic), a language with pointers and data types/structures (C), and a OOP language (C++, Smalltalk), you don't need to start with Java. But starting with it can save you from the previous 3. Obj-C seems nice, but there aren't dozens of beginner books on it to choose from. Learning Cocoa will likely just lead to a mess if you try to learn it before learning how to program and develop software IMHO.


.

CocoaPuffs
Dec 5, 2008, 12:00 PM
Umm...is this an example of the typical answers from this particular forum?

OP does not have any experience in programming and wish to eventually be able to program iPhone.

Java is an objective oriented language similar to Objective-C, but it is much more documented and have better resources and books available to learn. If you wish to learn programming that will lead you down the path to iPhone programming, Java is a great place to start.

As for comments that you don't need Java or care for Java, that's obviously not the point I am trying to make. If you think going from no programming experience and straight to Objective-C...good luck. Straight to Cocoa? Hah...I suggest you to borrow a book from library so you're not throwing money down the toilet. Any other language as starter? I would like to hear that input.

fenrus110
Dec 5, 2008, 12:35 PM
Java is absolutely !!WRONG!! for the iPhone! It's a nice language but it does not exist for the iPhone (besides some experimental stuff)!!

So what? A good programmer isn't deterred by the language. It is the fundamentals. And I think my strong Java background has been extremely useful in my learning of Objective-C. And many of the principles are very similar. OO, single class inheritance, interfaces. And other than knowing why you put * for objects, why you release things, and what header files are, I don't think my knowledge of C was that important to my learning. all that stuff would be covered in the basics of Objective-C anyways.

And as stated, Java is well documented. You can google search many things. good luck with that for Objective C.

firewood
Dec 5, 2008, 12:51 PM
Java is absolutely !!WRONG!! for the iPhone!

Correct! !!! However one must first learn how to program, before learning how to write software for the iPhone. Trying to do both is likely pure overload for anyone non-brilliant. And having learned more than one programming language is always better than knowing only one, IMO.

Last I checked, there were 3 decent books on Cocoa... and over 300 on Java. Which are you more likely to find a copy of in the library? ( Actually, I prefer Basic as a first programming language, but the books are so old, my local library has thrown most of them out! :-(
)

.

anjinha
Dec 5, 2008, 10:12 PM
Thank you so much for all the replies. :D

neil.b
Dec 6, 2008, 07:53 PM
Just gone through that Xcoder tutorial myself (I'd not heard of it before). Agree with the people that linked to it - it's good stuff.

alexbates
Dec 7, 2008, 09:35 PM
I am also very interested in iPhone developmen and in software programming overallt. I am a beginner and have not learned any code languages. Based on these comments, it looks like I should start off learning cocoa if I want to work with the iPhone. I also know that many applications on the Mac are written in cocoa, and soon in Snow Leopard, the Finder will also be written in cocoa.

Does cocoa seem like the right way to go? What software is good for writing in cocoa on the Mac? In particular, has anyone read any good books that teach beginners to write in code?

I have also made a survey for developers (the link below) in the computer class that I am taking at school. If you have the time, please take it to help me get some feedback.

CocoaPuffs
Dec 7, 2008, 10:58 PM
I am also very interested in iPhone developmen and in software programming overallt. I am a beginner and have not learned any code languages. Based on these comments, it looks like I should start off learning cocoa if I want to work with the iPhone. I also know that many applications on the Mac are written in cocoa, and soon in Snow Leopard, the Finder will also be written in cocoa.

Does cocoa seem like the right way to go? What software is good for writing in cocoa on the Mac? In particular, has anyone read any good books that teach beginners to write in code?

I have also made a survey for developers (the link below) in the computer class that I am taking at school. If you have the time, please take it to help me get some feedback.
Gosh, I guess people read only what they want to read. Good luck learning Cocoa.

4thRight
Oct 26, 2009, 02:39 PM
I also know that many applications on the Mac are written in cocoa, and soon in Snow Leopard, the Finder will also be written in cocoa.

Puffs, will Snow Leopard be a component with which I will need to articulate on the iPhone?