Retailers spend a fortune each year promoting their brands in all sorts of venues, and now many are turning their sights to the creation of an iPhone app to bring brand awareness to the most popular smartphone in the world.

Clothing retailer Gap, for instance, is mulling an iPhone app to get people interested in its products. Gap teamed with Mobclix, an operator of a mobile ad exchange marketplace, to come up with a contest to find out what a good Gap-branded iPhone app might look like.

The contest attracted some 400 iPhone app developers—many from Mobclix’s network—who jumped at the opportunity to develop an app for a well-known brand, as well as have a shot at winning a $1,000 Gap certificate and $1,000 Mobclix advertising package. Developers, of course, also hoped that winning would lead to a little publicity and a chance to rise from the crowded iPhone app developer space.

After three months, Gap announced its winners earlier this week:

Intuapp’s “Gap” app took the grand prize ($1,000 Gap certificate and $1,000 Mobclix ad package), while Mobiteris’ “Dance Off” app came in second place ($500 Gap gift card, an iPhone 3GS and a $500 Mobclix ad package). Consumers were also allowed to vote in a People’s Choice portion of the contest, and they selected Infosys’ “GAP4Me” app (Gap jeans for a year, iPhone 3GS and a $500 Mobclix ad package).

The winning apps, however, are not available on the App Store—nor will they be anytime soon. “We do not have plans to use the winning app at this time,” Gap spokesperson Olivia Doyne wrote in email. Contestants were allowed to develop iPhone apps under a special Apple program for a select few iPhones for judges. Youtube videos showing each app are below.

Nevertheless, we can learn a few things about what makes a winning app, as well as why apps miss the cut. Here are five best practices for building a great iPhone app.

1. Give ’em a reason

Many apps that didn’t get chosen made the mistake of being too narrowly focused, says Bill Westerman, principal and CTO of Create with Context, a design and research firm, and one of the judges in the Gap contest. They might have had shopping functionality or coupons or a store locator, but not a good combination of these features.

The bottom line is that they relied too heavily on consumer loyalty to the brand to draw people into an iPhone app, which leads to the question: For some retailers, should there even be an app for that? Other brands have shown success. “Some brands can leverage an iPhone app well,” says Krishna Subramanian, founder of Mobclix. “This year eBay made over $400 million off their iPhone app, and the app hasn’t even been out the entire year.”

Brand loyalty alone rarely drives people to download an iPhone app that clutters their screen and uses up memory. As you’ll see, the winning apps didn’t just peddle Gap products; rather, they provided a range of fun features and activities, from games to music videos to a virtual dressing room. The Gap brand almost seemed secondary.

2. One of 100,000

Can you hear the dull buzz? It’s the din of 100,000 iPhone apps. Grand prize winner Intuapp’s Gap app broke from the crowd by turning up the music, Westerman says, “and had a good visual design that reflected the Gap brand.”

Gap’s television commercials and stores are filled with music, and so Intuapp’s Gap app greets users with streaming music, giving you the feeling that you’re in the store. The app also makes it easy to browse clothes and play fun games, including a guess-the-price game for clothes. A new coupon regularly pops up.

“It’s important for developers to remember that you have to make sure someone is going to come back to the app multiple times,” Westerman says.

But don’t take our word for it. Here’s a video of Intuapp’s Gap app:

3. Don’t go overboard

When creating an iPhone app, developers face a tough dilemma: how far to stray from Apple’s user-interface guidelines.

If you follow the UI guidelines precisely, you’ll end up with an app that every iPhone owner will know how to use although it will be a very generic app—a death knell in the crowded App Store. If you take the other extreme and move too far from the UI guidelines, then users will struggle with understanding how the app works.

Westerman says many apps in the Gap contest fell on both sides. “We saw a lot of conformity with the UI, while others were so far afield from the UI conventions,” he says. “The apps that really did well [in the contest] were the ones that weren’t exactly based on the guidelines but close enough that you didn’t have to sit there and try to figure it out.”

4. Make it about me

Consider the People’s Choice award winner, Infosys’ GAP4Me app, which provides a virtual dressing room. It uses a conventional UI feature of the iPod album cover flow. Instead of albums, though, users can easily slide through 30 or 40 shirts.

Best part about the app is that you can cut and paste clothes onto a picture of yourself (or anyone else) stored in the iPhone. You can try on different outfits, put clothes in a “trial pile,” and, later, select clothes to a cart and head to checkout.

“It’s a fun way of interacting with the clothes,” Westerman says. “It really touches on that basic human need of what this stuff looks like for me. It’s great to look at clothes online, but one of the things people always struggle with around e-commerce is figuring out how this particular product is relevant to me and my body or my lifestyle.”

Here’s a video that shows how GAP4Me works:

5. What’s my reward?

Another important element in a good retail iPhone app is a reward, usually in the form of a special discount, to give users for interacting with the app. A good rule of thumb: the greater the interaction, the greater the reward.

Second-place Mobiteris’ Dance Off app, for instance, asks a lot of its users. Gap television commercials are well-known for energetic people dancing and jumping around in Gap clothes. The message is that Gap is fun. Dance Off plays off of these commercials by letting users make videos of themselves dancing to similar music.

The Dance Off app lets users find the nearest Gap store to try on clothes at the store. The app enables the iPhone to shoot a video of the user in Gap clothing dancing to music, which can later be downloaded to Facebook. The app contains the best video of the week. “By seeing other people’s videos, it also gives you a reason to go back to the app,” Westerman says.

After you post a video, the app immediately gives you a coupon for effectively creating a little commercial for the Gap. Check out Dance Off: