iPhone Development Pitfalls

Published April 08, 2011
Advertisement
These are fresh in my mind, so I thought I'd put together a quick blog post:

  • Don't assume that because your app runs on an iPhone 1st generation that it runs on an iPhone 3G. The 1st gen is bound to iOS 3.1.3, and despite everything you might say about that, 3.1.3 hogs considerably less memory. A 3G running 4.3.1 can collapse pretty quickly.
  • The iOS devices in general have slow fill rates. This is especially pronounced with the iPad, where even clearing the screen can crop up on your profiler if you're unlucky.
  • Game Center requires a little finesse. Sometimes, through no fault of your own, Game Center will seem cleanly logged in but won't actually do anything. Before slamming your ahead against a wall wondering if it's your fault, it's a pretty good idea to try signing out & back into Game Center.
  • XCode 4 displays target membership to you differently - groups no longer have a sense of membership. This might alleviate confusion, but it makes changing the target membership of nested groups a bit of a pain. You have to watch this closely if you're maintaining two versions of your game (ie: iPhone + iPad), since if two files of the same name & path are included in a single target, the device will... pick one. Never the one you want. Sometimes the compiler warns you of this, but not always.
  • XCode 4 actually does a lot of little nitpicky things like remapping virtually every keyboard shortcut or removing some useful dialogs. It's worth spending some time to explore fully before jumping in, because it's significantly different than XCode 3.
  • Remember that accessing a nil object is not an error in Objective-C. It just does nothing.
  • Textures must be POT. PVR textures must be square. If you see a big white block, look there first.
  • Weak linking & library verification are extremely important, especially if you want to use Game Center. People are still using those old OS's that don't support framework X - more than you'd like to think.
I think I've dedicated enough posts to iPhone development, so I'm going to lay off it for a while.
1 likes 2 comments

Comments

rick_appleton
Thanks for the tips!
April 08, 2011 10:21 AM
Cromulent
Just a small correction. The latest version of iOS that the iPhone 3G can run is 4.2.1 not 4.3.1. Although it is pretty obvious now (there is no 4.3.1 at the time of writing) in the future it might confuse people.
April 13, 2011 12:35 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement