Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dannyar

macrumors 6502a
Original poster
Feb 2, 2007
653
402
This is for anyone who currently develops apps or is new to it. Im really intrigued with the idea of making my own apps and maybe starting a side business. Im not new to mac but new to programming and the sdk in general. How hard is it to pick up and learn using the apple tutorials if ive never programmed or used the sdk. Thanks.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
It's as hard as learning to program in general. Unless you can think logically, break problems down into individual steps and think in the abstractions required you don't stand a chance.

In some ways the iPhone platform is harder to program for that a desktop or server: you have a much more constrained memory space to work in requiring immaculate memory management and there is no garbage collection so you have to do it on your own.

I'd suggest trying to learn basic, pure C to start with as you will need a lot of the skills this teaches. If you can't get your head round that you're probably not going to get any of it.
 

fenrus110

macrumors regular
Mar 24, 2008
142
0
just cuz you are familiar with a mac means nothing if you have no experience programming. Programming is programming, environment shouldn't be a huge factor.

You will probably have a hard time. Remember that people go to university to learn this stuff and lots of people avoid taking these courses in university. You'd have to spend at least a year on the basics, if you are patient enough for that.
 

aztec31

macrumors newbie
Sep 15, 2008
9
0
Its difficult but not impossible. If you are interested in learning how to program you should take a intro to programming course at a local school in either C,C++, or Java. I don't program for a living and it didn't take me long to whip out a simple app but I have a comp. sci background.
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
*sigh* memories.... I started off in BASIC. It's a good place to start, but only if you're planning on sticking with it, which you're not. So avoid it at all costs.
Since you have no programming knowledge whatsoever, I always highly recommend the becomeanxcoder tutorial at http://www.cocoalab.com/. It's a tutorial for anyone new to programming in general... unfortunately it's slightly out of date but you should be able to figure out the few differences. It's certainly worth trying at least, that tutorial is the best I've ever seen.

Second, try http://www.cprogramming.com/. It's an old site, but still relevant. You can learn C, (the core of ObjC and C++) and C++ as well if you're interested. I'm not sure if you need this, I went through it before becomeanxcoder so I don't know how easy/hard it'd be to do without it but since becomeanxcoder covers the very beginning, I'd assume you don't NEED extensive C to do it. But despite that, it's very good to know C decently anyways.

Third, buy Cocoa Programming For Mac OS X, 3rd edition. I don't think it's the best book in the world, but it's the best up to date cocoa book. It tells how, not why which is a bummer but it's very useful anyways.

[Good] programming isn't something you can just pick up. You need to have/find out if you have a passion and a knack for it. And there's more to it for most people than just knowing how to write code that works. There's math, concepts that involve physics and AI, all sorts of things. (Assuming you don't just plan on writing a text editor or something boring :cool:)


I don't know if you'll find it useful, I probably don't work the same as other people, but here's how I've been learning since I moved to ObjC and Cocoa. But what I do and what works well for me is first I come up with a project, or find an interesting topic in Cocoa programming for mac os x. I then read the chapter in the book, and build a test program. (If you're smart, you'll have a folder filled with little tests for learning) If it was simple and easy to learn, which it usually isn't, I read in depth online, ask questions here and at the cocoa-dev mailing list, and fool around with numbers and stuff. And as I experiment and learn, I add to the program or think of things I don't know how to do to add. Then I figure out, through tutorials examples and questions, how to do that. And with that process I learn. So really the book is a reference and starting point for me.

Good luck! Nate
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,616
6,145
I don't think it's as hard as the other posters are saying. That's not to say it's easy. I went from having no knowledge of programming to making a basic game for the iPhone in about 3 months.

Knowing algebra II is useful. Variables and functions are used a lot. Books I used were...

The C Programming Language
(At it's most basic level, all Mac and iPhone programs are C.)

Learning Cocoa
(Yes, it's meant to teach how to make programs on the Mac, but most of the concepts can easily be translated to the iPhone.)

I also used the documentation that comes with the iPhone SDK quite a bit and when all else failed, I asked for help from the kind people on these forums. (Speaking of which...)
 

MyAwesomeBlog

macrumors newbie
Aug 30, 2007
14
0
I went from having no knowledge of programming to making a basic game for the iPhone in about 3 months

That's very encouraging to hear... I have a bit of experience with Perl/PHP... I'm hoping this will help me. I almost got a book on Cocoa tonight, but keep seeing recommendations for the C Programming Language books so I suppose I should start with that.
 

firewood

macrumors G3
Jul 29, 2003
8,141
1,384
Silicon Valley
There are people who learn to program by themselves with only the help of a book or two, and go on to start their own software companies. And there are people who take more than a couple semesters of college courses on programming before giving up and changing majors.

So...

...it depends.

Hit the books. Learn more than one language. Do lots of the exercises (or make up your own problems), and debug them till they really work and don't crash even with unexpected input.
 

85KB

macrumors newbie
Oct 22, 2008
12
0
Bay Area, CA
Hi All,

I'm a developer, I've studied game programming for 5 years, but all in C, C++ and DirectX and a little bit of OpenGL.

I've decided to program some applications and games for the iPhone, so I bought a book called Learning Cocoa Programming for Mac OSX 3rd Edition and rached the 10th Chapter.

Currently I'm getting bored a bit so I was thinking if it's possible to start with an iPhone book or documentation so I can start programming on the iPhone directly and stop the readings about Mac OSX.

So what do you think?
Is it possible?
Is there any book/online documentation that starts from scratch and can guide me to program such apps directly on the iPhone?
Or I have to read the whole MacOSX book then start with the iPhone?

And how about the Apple's Online documentation for the iPhone OS?
Is is easy to learn iPhone OS by reading it?

Thanks guys and sorry for asking so much questions :D
 

SnowLeopard2008

macrumors 604
Jul 4, 2008
6,772
18
Silicon Valley
Hey, I'm 15 and I can program simple stuff in C++. So if I can do it, so can you. iPhone programming isn't all that complex, just plan the whole app out. Start out simple and try it out on the iPhone Simulator. The GUI is simple if you use the Interface Builder app.
 

mathcolo

macrumors 6502a
Sep 14, 2008
860
16
Boston
Hey, I'm 15 and I can program simple stuff in C++. So if I can do it, so can you. iPhone programming isn't all that complex, just plan the whole app out. Start out simple and try it out on the iPhone Simulator. The GUI is simple if you use the Interface Builder app.

Yeah. OP: He's right. Even me, being a young-adult, can do iPhone programming.;)
 

nacho4d

macrumors newbie
Jul 13, 2008
23
0
Is a matter of sense

If you have it, programming shouldn't take you that long.
But I recommend you to start from C language, (a university book would be great)
Then OOP theory. ( more books )
Later, Objective-C language (reading apples documentation is a good idea)
And after that Cocoa Apps and Iphone apps. ( apples documentation is great, but sometimes a good book gets you directly to the point)
As my japanese friends would say : GANBATTE!
(do your best!)

Cheers,
Ignacio
 

SpookyStudio

macrumors newbie
Oct 9, 2008
7
0
I wrote my app in about month but im after 3 years of c++ coding.
I've started from learning objC but i had OOP basics so it was quite easy.
imho you should start from OOP then objC and OpenGL if you need
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
You should probably start with mac programming, because there's a lot more material and it's VERY easy to move to the iphone from there once you've learned enough.
 

85KB

macrumors newbie
Oct 22, 2008
12
0
Bay Area, CA
Thank you all for your replies, I found a book named:
"iPhone Open Application Development"

Do you recommend me to start reading in it? Or read through the Apple's iPhone OS Programming Guide?

Thanks!
KB
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Thank you all for your replies, I found a book named:
"iPhone Open Application Development"

Do you recommend me to start reading in it?

That book is for using the open-source toolchain targetting jailbroken phones. I'd not recommend using it if you intend using the official SDK...
 

firewood

macrumors G3
Jul 29, 2003
8,141
1,384
Silicon Valley
"iPhone Open Application Development"

Do you recommend me to start reading in it?

This book uses many obsolete and/or disallowed API's. However it does show the general flavor of using Obj-C and Cocoa, so if you can get a copy cheap or free, it might be good to help give you the general pattern, if not the correct details, of iPhone development.


.
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
I bought the book from pragprog, and lets just say it needs work. It looks like it'll be great when finished, but at least half the chapters in it are just placeholders right now, nothing in them (All of the blanks are in the back of the book right now). And the view controller chapter which was just added, is disappointing. But they clearly say it's a beta book, so it'll all probably be cleared up soon. The good thing is it's up to date, being a beta book so it has pictures of the latest xcode so you don't need to figure out differences in yours and theirs.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,616
6,145
Yeah, I stopped the learning cocoa book when I got to the multi-window environment chapter... I'll be sure to go back and read it if I ever plan on making a multi-window program but seeing as I absolutely despise multi-window applications (tabs are far better for multi-document handling, the inspector should be attached directly to the window, error messages should come down on sheets... applications with multiple windows are a nightmare (especially those with disappearing windows... the inspector is terrible... I'll try copying something from the inspector and as soon as I click off it's gone...) I'll be sure that any program I ever make will fit into 1 window... if it doesn't fit, you're designing your program wrong.

[/rant (sorry,)]

After I got through the first few chapters of the learning cocoa book I stopped reading that and instead just started making applications for the iPhone. No other books needed... the XCode documentation for each of the standard objects is all I need... (OK, fine, I have an OpenGL book too.) All you really need to know is how Objective-C is organized and what Cocoa Touch includes (which the XCode documentation can teach.)
 

85KB

macrumors newbie
Oct 22, 2008
12
0
Bay Area, CA
Yeah I've just noticed that it's targeted to Jailbroken iPhones, etc...
And thanks for confirming that!

So I guess I'll figure out what is the [iPhone SDK Development by Bill Dudney, Chris Adamson, Marcel Molina] about if I find it confusing, I'll then stick with the [iPhone OS Programming Guide by Apple].

KB
 

85KB

macrumors newbie
Oct 22, 2008
12
0
Bay Area, CA
Yeah, I stopped the learning cocoa book when I got to the multi-window environment chapter... I'll be sure to go back and read it if I ever plan on making a multi-window program but seeing as I absolutely despise multi-window applications (tabs are far better for multi-document handling, the inspector should be attached directly to the window, error messages should come down on sheets... applications with multiple windows are a nightmare (especially those with disappearing windows... the inspector is terrible... I'll try copying something from the inspector and as soon as I click off it's gone...) I'll be sure that any program I ever make will fit into 1 window... if it doesn't fit, you're designing your program wrong.

[/rant (sorry,)]

After I got through the first few chapters of the learning cocoa book I stopped reading that and instead just started making applications for the iPhone. No other books needed... the XCode documentation for each of the standard objects is all I need... (OK, fine, I have an OpenGL book too.) All you really need to know is how Objective-C is organized and what Cocoa Touch includes (which the XCode documentation can teach.)

What do you mean by XCode documentation? Is it the documentation for every sample (code sample) or the XCode guide?

KB
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,616
6,145
What do you mean by XCode documentation? Is it the documentation for every sample (code sample) or the XCode guide?

KB

I mean... open XCode, go into the help menu, select "Documentation"... search for whatever object/method/function you want to know more about.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.