Sponsors

 

Tuesday, December 9, 2008

Digging into iPhone Programming: Some Books to Check Out

With Apple's NDA out in force. It was very frustrating to find any information outside of Apple's online documentation on developing software for the iPhone. You want to take classes? Sorry! Apple is great at having all sorts of classes on various Apple software at their stores. Not for programming the iPhone though. What about classes offered by someone else? Sorry! Websites? Books? Buzzzzzz! No dice. Thankfully the super-restrictive NDA has been lifted (of course if you follow iPhone programming development you already know that)!

There are three books that I have had my nose stuck in of late. Let's take a high-level look at each:

Programming in Objective-C
Initially, I got this book pre-NDA. I mean, Objective-C is not just a language for programming on the iPhone or the iPod Touch. It's been around for years. It is the main programming language Apple uses for their apps that run on the Mac.

Considering I had never programmed in Objective-C before much less heard of the language in the first place, this seemed like a good book for me to get.

Turns out this is a pretty good book. It won't actually show you development on an iPhone, but it will teach you Objective-C. It assumes zero knowledge of the language (which is good because that is where I was at)! It allowed me to start to get used to Objective-C's strange syntax of square brackets, declaring object references with asterisks, an initial foray into delegates and more. Don't know Objective-C? Get this book!

Once the NDA was lifted, the following two books became available for purchase:

Beginning iPhone Development: Exploring the iPhone SDK
Of the three books mentioned here, this book is my favorite and the one I have been spending most of my time with. It has spent allot of time with me going to and from work on the train. I've been reading it after dinner. I've been sitting with it and my Mac Book trying stuff out in XCode. It has been my evening reading before going to sleep. It's really a good book.

There are some things I wish were covered in more detail. I wish there was more info on tab view controllers and just more conceptual information on view controllers period. I find it hard to visualize some of the view controller/view relationships.

That being said, the book is chock full of detailed examples. The authors take you step-by-step through each example in a very thorough manner. I love the cheerful banter of the language. It's just fun reading this book! The layout of the book, the illustrations, are well done. I just want to pick it up to look at it. Does that mean I'm a geek? :P

One thing I would mention though, if you never programmed in Objective-C before, this book is not enough. There are syntax things going on that you'll be saying, "what is that for?" Best to get Programming in Objective-C to go along with it.



The iPhone Developer's Cookbook
I actually got this book before Beginning iPhone Development. It is instructional and can help you learn how to program the iPhone, but, just has the title implies it's more of a cookbook type of book. That is, it has "recipes" on how to code different things on the iPhone.

The section on view controllers was helpful to go along with what was said in the Beginning iPhone Development book. It didn't complete the picture for me though.

One thing I like about this book is the recipes included for functionality that does not necessarily show up in Apple's documentation. Like do you want your app to use that cool feature known as Cover Flow? This book has a recipe on how to do it.

Again, if you don't know Objective-C, you best get a book like Programming in Objective-C to go along with it.

Final Thoughts on These Books
If you're looking for information on how to use the Program Portal after paying your $99, you won't find much here. What you will find is a lot of good programming information to kick-start you into the world of iPhone/iPod Touch software development.

Monday, December 8, 2008

Deploying Apps on my Phone From XCode


Let's see.

  • I made sure that I had the latest version of iTunes.
  • I made sure that I had the latest iPhone SDK.
  • I started a new project (in case some of my project properties were screwed up).
  • I carefully plugged in my bundle identifier.

Finally, though I'm not 100% sure exactly why, I can do a build on an iPhone project in XCode and get it to successfully deploy on my iPhone.

This is a banner day for me. This stopped working ages ago and I had been hammering away at the problem on and off with no success. It was very discouraging to say the least.

Well yesterday, that problem came to an end!

Thursday, December 4, 2008

Blog Updates


The side bar had not been updated for months and some of the links either didn't work, or took you places that honestly do not currently have anything to do with the iPhone. So, I spent some time cleaning them up. The links on the side then should be up to date!

Wednesday, December 3, 2008

App Store Issues

The App Store on the iPhone is a great feature! At the touch of a button you have access to hundreds, no thousands of different applications that you can download and run on your iPhone.

I've noticed that Apple has been improving the App Store of late:

- Multiple screen shots.
- Icons on top level lists of randomly selected apps.
- A Report Problem button.

And more subtle visual changes that make this tool look even classier.

But I've been noticing one problem for awhile. Looking at the screen shot up above, can you tell what it is?

The app Disney Fairies Fly! appears more than once in the list. In this case they appear just a couple rows away. I saw quite a few apps during this sitting that were listed more than once.

It would sure be nice if Apple fixed this. I'm not going to whine too much though, the App Store is a brilliant idea and it is getting better as time goes along. What do you think?

Monday, December 1, 2008

Creating Screen Shots on your iPhone

Below are some sample screen shots I did on my iPhone.
You can click on it to see it in more detail:
So, how do you do screen shots on your iPhone or your iPod Touch? The hard way is to attach your iPhone to your Mac, fire up XCode, open the Organizer window and use the screen shot tab. The problems with this method are obvious:
  • You can only do this with a Mac.
  • Your iPhone/iPod Touch has to be tethered to your computer.
  • You have to load XCode and bring up the Oganizer window.

The Better Way
A nice nifty feature that I found out about for my iPhone to do a screen shot (a little bird told me that this feature was available starting in iPhone OS 2.2):

  • Navigate on your iPhone/iPod Touch to a screen you want to create a screen shot of.
  • Hold down the Wake/Sleep button on the top of your iPhone.
  • While holding down the Wake/Sleep button, press the Home button (just below the screen) and release both buttons.
  • The screen will flash white, and, if the phone is not in silent mode, you will hear an SLR camera type noise.
  • Any screen shots you took this way will now be in your iPhone Photo Album! Just go into the Photo Album app like you normally would, and go to the end of your photos!

Using Those Photos

You may be completely satisfied with just looking at your screen shot handiwork inside of the iPhone Photo Album. But I think I can make a good guess this is not the case. Chances are you will want to add these pics to documentation, a web site, maybe even a blog (like I am doing right now).

If you sync up your phone on a Mac when you dock, the photos will be synced into iPhoto and then you can go from there. But another quicker way that needs no connecting and no Mac is to email the photo to yourself.

Get into the Photo Album app on your iPhone and bring up the desired screen shot.
  • In the lower left hand corner will be a button for sending emails. Tap it!
  • You will see your screen look like something to the left. Tap the Email Photo button.
  • You will see an email be generated with the screen shot in it.
  • Make sure that the from and to email addresses are there and accurate. And Send!

Finally, on your computer, open the email and save the picture attachment to your hard drive. You may want to tweek it in a graphics program such as Photoshop.

Now you can:

  • Add the screen shot to a document such as a Word document.
  • Upload it and add it to a blog post (like I'm doing here).
  • Upload it to your web server, etc.

In Closing
Finally, I leave you with one funny side effect of doing screen shots like this:

If you are browsing those screen shots in the Photo Album, you just might get confused and forget that you are in the photo album and try pressing "buttons" and wonder why they don't work! This can be good for pulling some pratical jokes on your friends!

Back Again. For Now...

The iPhone Obsessed blog is back up and running. I can't really go into the reasons that I'm not covering it on Chomer.com right now. But, basically, it is a pragamatic choice. I want to blog about the iPhone, and I have this blog already set up, so here we are!

I will be blogging about anything iPhone/iPod Touch with an emphasis on Apps and app development.

Welcome back to iPhone Obsessed!