Thursday
Aug272009

« Seven iPhone Development Rules of Thumb »

 I've been an Apple developer since it was called NeXT and found the following rules of thumb helpful when introducing new people to Apple development.

 1. Read the introductory documentation.  Build a simple application.  Read the documentation again.

The Apple development environment is very different from other application development environments. There is going to be some ramp up time. This isn't like learning .NET after you learned Java.

Expect to throw away your first couple of applications.

2. Don't buck the system.

This is a general theme in the Apple world. If you do things the Apple way, life is pretty easy. If you try to do things the MFC/.NET/Java way... it will be very hard.

Apple heavily uses the delegate pattern. Don't fight it. Apple's view of MVC is a little odd. Adapt.

3. If it seems hard, you're probably doing it wrong.

The Apple developer forums are full of people tracking down difficult problems that are solved by simply doing it in a slightly different way. Not all of these are cases of RTFM, sometimes it's just a trick that all the experienced developers know and you just need to ask.

If something seems harder than it should, head for Google or Bing sooner rather than later!

4. Respect "Apple doesn't want you to do this".

Apple makes customization of most things easy and customization of things it doesn't really want you mucking with very hard. This has been the case since Mac OS X was NeXTStep and cell phones were the size of a brick.

Apple has stringent rules on iPhone apps. Apple wants you to do things a certain way, so just go with the program. Or develop for Android/Blackberry/Pre.

5. Understand retain, copy, release and autorelease.

Really, really understand them. You need to know at a visceral level when to retain or copy, when to release and when to autorelease.

If you run into a retain/release imbalance, stop and think about it until you understand where you went wrong. Don't just start inserting retains and releases until the problem goes away. If you really think about these every time it won't be too long before you never create them again.

6. Learn the difference between should, will and did methods.

Create a simple delegate example and log when every method is called. Read the documentation before and after you think you understand how this all works.

7. Don't ignore warnings.

Warnings are often telling you that your code doesn't do what you think it is  doing. Or that things don't work the way you think they do.  

Reader Comments (7)

I'll second that bit on Don't Ignore Warnings. And I'll add that the version of Clang Static Analyzer included in Snow Leopard as "Build and Analyze" is crucial also. While Clang can be wrong, it usually is helpful, and it can point out parts of code you haven't thought much about lately even if it's actually not a problem its highlighting. (Unused variables, misnamed functions, etc.)
October 12, 2009 | Unregistered CommenterLouis St-Amour

The rapid proliferation of smartphones and social media redefined the very meaning of "internet marketing." iphone apps

Your article is pretty nice and I like it very much.But at the same time, I want to share something which is pretty nice too.That is cheap dvds and I just want you to enjoy watching dvds in your recreational time.
chuck season 4 dvd

November 11, 2011 | Unregistered Commenterchuck season 4 dvd

I really hublot swiss replica
enjoyed this post. You fake swiss tag heuer watches
describe this topic very well. I really enjoy replika omega de ville
reading your blog and I will definitely bookmark it! Keep up the interesting posts!replica omega constellation

November 11, 2011 | Unregistered Commenterswiss replica watches

During the festivals and special occasions, many stores offer discounts. So, you may get the designer coach purse of your choice at a reduced rate. So, don’t forget to step into the ugg bailey button tripletnearby stores. You may find something great at a nominal price.Every one has a favorite color. If you can find out a designer ugg boots clearance of the color you like, it will be great. Different colors also carry distinctive meanings. It will help you to ugg outlet store create positive energies around you.

Ethnic designs are becoming popular day by day. It may be out of the reach of your knowledge to specify the denotation of these arts. But it is widely accepted as a status symbol. So, don’t hesitate to possess one.Your interest should also play a major role while selecting the designer coach purses. Select as per your interest. For example,coach purse outlet if you have keen interest on nature, you can buy a piece that ugg boots sale resembles essence of nature.It should also match your dresses. Pay equal attention to this aspect also. You can easily find it out by having a look on both the dresses and the wallet.

Your designer coach purses outlet should match your personality. Please, carefully choose a ugg boots outle. You can also consult your friends or the storekeeper to find out the best one for you. If you keep in mind the following tips while buying a designer cheap coach purses, you will definitely get the value for your mind. You will also have the ugg classic tall sale mental satisfaction of possessing something great. You like to put on a coach outlet store online. Your shoes are also carefully chosen from the attractive range of a renowned brand. ugg classic tall are also widely accepted as an insignia of status. After all, you will pay from your ugg bailey button triplet sale for all of your other needs.

November 26, 2011 | Unregistered Commenterugg boots sale

The ugg bailey button triplet online purchase from your uggs online shop are steering to become probably the most reliable affordable ugg online, therefore the fantastic of individuals people affordable cheap ugg bailey button triplet boots onlinesale might be guaranteed and that we would likely not cheat the clients. Uggs purchase clearance boots who is just about the trend of manpower essential fashion products!Lately, the outside brand UGG Australia held a men's shoes in the multimedia component activities, those activities from the primary components include television, online digital, national print and outside media, show a number of males, but the selection some jackets, climbing clothing and add-ons displayed."UGG australia" is really a famous American brand ugg bailey button triplet sale , may be the world's most well-known make of ugg snow boots, this well-known magazines all the heavens used around the frequent photo we are able to observe that. Uggs during the cold months to ensure that we not just have the warmth it introduced us, but additionally within the hot summer time several weeks bring us discomfort, we good to savor the heat of cheap ugg bailey button triplet now!

J'ai sérieusement j'adore susceptibles de boutiques longchamp sac magasins. de temps à mes amies et que je rencontre lors de notre magasin de liquidation du quartier Longchamp et que nous investissons plusieurs heures dans le magasin. une seule fois, nous investissons toute la matinée au sein de la sortie de Longchamp et a visité ensuite le déjeuner et le montre à nouveau le soir à nouveau. Je reconnais que peut éventuellement para?tre absurde, mais j'ai sérieusement apprécier la marchandise ou l'entreprise qui met en avant longchamp sacs et que j'ai tellement agréables à l'aide de leurs sacs à main.Probablement le plus Longchamp Le Pliage. Il inclut tous les facteurs dans le seul besoin de la fa?on dont la dame demande à maintes reprises les gens formelle. Vous êtes capable de zone de son maquillage pour les retouches, vos secrets, certains changements, cellulaire avec d'autres petites choses que vous venez essentiellement pouvait pas résider en dehors.Obtention d'un sac à main sac longchamp se trouve dans l'une des entre probablement les facteurs les plus efficaces de la fa?on dont la dame pouvait achat offert que ce n'est pas fondamentalement con?u pour construire d'obtenir un accessoire. Il pourrait effectivement être un soucis tout à fait avantageux de garder sacs longchamp les gens sur le temps long formelle quand sacs volumineux pourrait ruiner tous vos vêtements.

December 12, 2011 | Unregistered Commenterlongchamp sacs

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>