• entries
    25
  • comments
    39
  • views
    46164

iPhone Development Pitfalls

Sign in to follow this  

1151 views

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.
Sign in to follow this  


2 Comments


Recommended Comments

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.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now