PDA

View Full Version : Beginning iPhone development...How?




Soulstorm
Jan 9, 2009, 12:54 PM
A phone call was the reason for me wanting to start programming for the iPhone.

This is my background:
-- Much experience in C++ development.
-- Professional skills in Objective-C with Cocoa on OS X.
-- Some skills in OpenGL (the last thing I made was a .obj parser and modeler)

This is what I was requested:

That guy was looking for a programmer for iPhone. He told me that he wanted to make a 2D game for iPhone. He said that the game would be fairly simple, and just wanted someone to know how to program Cocoa for iPhone.

So, my problem is that I don't know what are the differences between iPhone and OS X in terms of application development. Even worse, I don't have an iPhone (although I know someone who does)!

My questions are:
-- Does Xcode provide a way to build applications for iPhone without having one?
-- Are there major differences between iPhone and OS X in terms of development?
-- Is there any way I will be able to do it even by reading a book?

EDIT



zmttoxics
Jan 9, 2009, 01:02 PM
Register an iPhone adc account and download the iPhone 2.2 sdk. Xcode 3.1.2 integrates with the sdk now (you can set the project to use the sdk etc). Then start reading. :D

dejo
Jan 9, 2009, 01:25 PM
My questions are:
-- Does Xcode provide a way to build applications for iPhone without having one?
-- Are there major differences between iPhone and OS X in terms of development?
-- Is there any way I will be able to do it even by reading a book?
-- Yes. There is an iPhone Simulator. But, to be honest, it's always good to perform testing on a real device as well.
-- Yes. Limited screen real-estate and memory being a couple of differences. But the basics are similar.
-- Yes. If you're industrious, you may not even need a book. There are plenty of tutorials and sample apps to get you started.

firewood
Jan 9, 2009, 01:25 PM
My questions are:
-- Does Xcode provide a way to build applications for iPhone without having one?
-- Are there major differences between iPhone and OS X in terms of development?
-- Is there any way I will be able to do it even by reading a book?


You can develop applications using only the iPhone SDK (XCode), without an iPhone or iPod Touch. However, if your application is at all performance critical in any way, note that the SDK Simulator can run up to 100X faster than a real iPhone, so you will have no idea if performance will blow up until you test on an actual device. Lots of animated 2D graphics can easily hit performance limitations.

The iPhone uses UIKit within a single fixed window instead of AppKit on a multi-window desktop, but the Cocoa concepts are similar.

There's tons of documentation on Apple's site, including some WWDC videos on UIKit for AppKit developers, targeted directly at a Mac developer such as yourself. None of the current iPhone development books are suitable for an experienced Mac/Cocoa/Obj-C developer IMO, unless you need a few tips and tricks that just happen to be included in the example code.

A current and experienced Mac Cocoa/Obj-C programmer should be able to pick up the API differences in a couple weeks. Learning the UI and performance tuning tricks, if needed, might take longer.


.

JLatte
Jan 9, 2009, 01:34 PM
A phone call was the reason for me wanting to start programming for the iPhone.

This is my background:
-- Much experience in C++ development.
-- Professional skills in Objective-C with Cocoa on OS X.
-- Some skills in OpenGL (the last thing I made was a .obj parser and modeler)

This is what I was requested:

That guy was looking for a programmer for iPhone. He told me that he wanted to make a 2D game for iPhone. He said that the game would be fairly simple, and just wanted someone to know how to program Cocoa for iPhone.

So, my problem is that I don't know what are the differences between iPhone and OS X in terms of application development. Even worse, I don't have an iPhone (although I know someone who does)!

My questions are:
-- Does Xcode provide a way to build applications for iPhone without having one?
-- Are there major differences between iPhone and OS X in terms of development?
-- Is there any way I will be able to do it even by reading a book?

EDIT

You should be much better off than someone that just knows C++/Java or nothing at all, because you've done objective-C professionally. I do C++ / C# / Java and I'm still jumping through hurdles trying to wrap my brain around particular objective-c concepts and syntax.

One thing to keep in mind about the simulator, by the way: The simulator is based off of your computer's processor speed and not the actual iPhone's processor speeds, so if you make a game, and it runs amazingly smooth on the simulator but not on an iPhone, well just take that into account.

I actually had very good success in understanding a lot of gray areas by skimming through Stanford's iPhone lecture slides. Stanford offered a course in iPhone programming, and someone posted the powerpoint slides to about 12 lectures or so online, all free. Do a google search for it, should be able to find them. Really great wealth of information. You could easily skip the first few lectures on objective-c, and just focus on building the apps. You could also get by reading the apple iphone documentation.

sanPietro98
Jan 9, 2009, 02:16 PM
If you don't have an iPhone and you don't want to pay for the monthly AT&T voice/data fees, you can buy an iPod Touch. Its not cheap, but it is cheaper than an iPhone and has no monthly bills.

Soulstorm
Jan 9, 2009, 06:20 PM
Thank you all for your answers. Another questions. What APIs are available on the iPhone for graphics development? Is there OpenGL? Am I stuck with it or I can add 3rd party frameworks such as SDL?

liptonlover
Jan 9, 2009, 07:24 PM
I'm no professional but my transition from desktop to iphone coding so far has been pretty seamless. The biggest meaningful difference was different classes to get used to. I explored the new classes as I went along, and found out what I could and couldn't do. Apple did a great job making it as close to mac desktop development as possible.

Soulstorm
Jan 15, 2009, 03:33 PM
Please delete this reply