Default image not showing up for iPhone app

I ran into an issue last night trying to set up the default image for the app I am about to submit to the AppStore. I have learned the first thing to look at is the capitalization when adding files to an XCode project. But there were a few other things I needed to do to get this working.

So if you don't see your Default.png image showing up, try these steps:

1) First, make sure your "Default.png" is named exactly that ("default.png" will not work).

2) Second, make sure Default.png is in the root directory of your project.

3) Do a clean of your target.

4) Then build and your default image should show up.

I also noticed that running this in the simulator was not helpful because my app started very quickly and the default image only displayed for a second. So, make sure you give this a try on the device to see how long the default image really displays.

Good luck!

iPhone / Objective-C Code Examples (and .NET equivalents)

I have found myself reusing a lot of the same code throughout my apps. I thought I would publish some tips and code snippets to hopefully get you going on your next project. Here they are, in no particular order. I also tried to put a .NET equivalent for those of you who, like me, are coming from a long .NET background.

1) Use NSLog liberally to debug as you write your code. You can really do a lot with it. A few standard statements are for printing strings or numbers, and you can also print an Objective-C object. Here are the three I use most often:

NSLog(@"%@", aString); // prints any NSString, for example
NSLog(@"%d", anInt); // prints a signed int
NSLog(@"%f", aFloat); // prints a float

2) If you have a UITableView that you need to have updated, you can reload it with this command (assuming it is named "tableView"):

[self.tableView reloadData];

3) Need to iterate through a collection? Try this handy code snippet, which is similar to For Each in .NET languages:

for (id currentObject in allObjects) {
// do something here with currentObject

4) Here is how you can check to see if an object is certain type. This is a bit like using gettype or typeof in .NET to find a specific type:

if ([myObject isKindOfClass:[TheClassIAmLookingFor class]]) {

5) Here is how you cast an object in Objective-C, like using CType or DirectCast in .NET:

TypeToCastTo typeCastObject = (TypeToCastTo *)myObject;

6) I show alert pop-ups a lot in my apps. Here is a simple example for an alert launched when a button is clicked, and responded to to perform some action.

-(void)resetClicked:(id)sender withEvent: (UIEvent *) event {

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Reset" message:@"Are you sure you want to reset this puzzle?\nAll of your work will be lost!" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
[alert show];
[alert release];


- (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
// the user clicked the OK button
if (buttonIndex == 1)
// reset logic goes here



7) Split is a great function in .NET. Here is the Objective-C equivalent:

NSArray *arrayOfValues = [commaDelimitedListOfValues componentsSeparatedByString:@","];

More code snippets next time! Good luck!

Update your AdWhirl SDK to 1.2.7 (and Include the AddressBook Framework)

If you have not recently updated you AdWhirl SDK to 1.2.7, you may notice some big benefits if you do. I was seeing leaks before the upgrade, and a few random crashes. Both of these seem to be much improved, but also there seems to be a speed improvement as well.

There is one caveat--when I replaced my 1.2.5 SDK with the 1.2.7 SDK, I started getting all kinds of compiler errors. I sent a note to AdWhirl support (which responded really quickly--thanks!) and they said you need to include the AddressBook framework into your app because it is by AdMob. I did not see this anywhere in the documentation, and of course, I did not expect it simply going from 1.2.5 to the more recent version. It is a 10 second fix, but I wanted everyone to be aware.

Good luck!

My Favorite iPhone Development Books

OK, so the next most common question I am asked after blogs that I follow: what are good books that I can recommend. Here are some really popular ones right now. Books are a great way to get up to speed quickly. If you are getting started with iPhone development, this can shave weeks off your time to deliver a project.

Beginning iPhone 3 Development: Exploring the iPhone SDK

Are you a programmer looking for a new challenge? Does the thought of building your very own iPhone app make your heart race and your pulse quicken? If so, Beginning iPhone 3 Development: Exploring the iPhone SDK is just the book for you. Updated and revised for iPhone SDK 3, many of the discussions in the original book have been clarified to make some of the more complex topics easier to understand. In addition, all of the projects have been rebuilt from scratch using the SDK 3 templates.

Programming in Objective-C 2.0 (2nd Edition)

From the author of Programming in C, Programming in Objective-C 2.0 provides the new programmer a complete, step-by-step introduction to the Objective-C language. The book does not assume previous experience with either C or object-oriented programming languages, and it includes many detailed, practical examples of how to put Objective-C to use in your everyday programming needs.

iPhone SDK 3 Programming: Advanced Mobile Development for Apple iPhone and iPod touch (Wiley)

Apples iPhone is the hottest mobile device on the planet. More than one million iPhone 3G phones were sold in the first three days of release and millions more are sure to be in the hands of iPhone fans each year. Apples iPhone SDK has been updated and includes more than one thousand new APIs that developers will want to get their hands on.

How To Make An iPhone App

Do you want to start developing iPhone apps, but find the technology confusing? Here is the ALL-IN-ONE iPhone development resource that will give you everything to need to make an iPhone App!

iPhone App Secrets - Making Money With iPhone Apps

The mobile phone application market has exploded recently. Never before in history has it been so easy for you to tap into a ready made army of cash rich customers! Right now, there are around 20 million iPhone owners. These iPhone owners spend upwards of $50 million dollars every single month on new iPhone applications.

iPhone Blogs That I Follow

I get the question now and then about the blogs that I follow to keep up with what goes on in iPhone development. It seemed like a nice thing to provide links to this since all of these resources have been helpful to me. So, in no particular order, here are some great iPhone development resources. Enjoy!

  • iPhone Developer/Development Blogs | Travis Dunn - Imagine my surprise when the internet failed to produce a select list of iPhone development blogs more than 10 links wide. Well, I've beaten the internet at its own game and collected the links myself, like a neurotic SERP.

  • A More In Depth Look At The How To Make An iPhone App Book - ... where you should have no trouble figuring out how to use those libraries on your own. You can get more information on the How To Make An iPhone App homepage by clicking here. ©2009 iPhone Development Tutorials and Programming Tips. ...

  • creating a calander - iPhone Dev SDK Forum - I want to create a calendar. which is can be scrolled vertically and contains dates of the next seven weeks. I am new to iphone development therefore.

  • iPhone Game Development With Core Animation | iPhone Development ... - I've made quite a few posts about OpenGL ES, and the available game engines on the iPhone, and I'd like to iterate that you do not need to use OpenGL ES or.

  • FurdLog » Messing With Developer Infrastructure Conventions - By creating games and other programs for the iPhone, software developers hoped to find millions of new customers. But they didn't expect to feel muzzled. The software development kit that Apple Inc. distributed to programmers bound them ...

  • WordPress for iPhone + Source Code Available! < A Fool's Wisdom - Earlier this week my Automattic colleagues and Effigent released WordPress for iPhone and iPod Touch. Now, the source is also available and Trac is set up for reporting bugs and participating in development! ...

  • The iPhone App Store is Pure Genius - Apple's iPhone App Store allows third-parties to release software for the iPhone (built with an API provided by Apple) to all iPhone users. They can charge what they want for the app, and delivery and payment is managed beautifully within the iPhone interface through your iTunes account. By providing the medium (iPhone) and the delivery service (App Store), Apple has created a completely self-sustaining business model that generates passive income for them and increases demand for the product with each awesome release on the App Store.

  • Top 15 iPhone Web Development Resources - Here is a list of links to the best available iPhone development resources such as simulators, development plugins, wikis, and other JavaScript/HTML/Safari documentation. iPhoney – A free iPhone web simulator for designers. ...

  • How Much Is Too Much For An iPhone App? » Webomatica ... - Just tossing this out there, since I have come down with a case of iPhone app price sensitivity.