My iPhone 4 just arrived. Here are my initial thoughts.
The first thing you notice as soon as you turn on the iPhone 4 is the new display. It is absolutely gorgeous. Not only is the resolution so much higher, but the pixels are also much closer to the glass, which combined creates a stunning effect. Sometimes when you walk into an electronics store they have dummy versions of some gadgets which have a sticker on the front panel to show you what it would look like if you could turn it on. The iPhone 4 display looks like that with the image right at the surface and with the same resolution as print.
Any text rendered in your app will automagically be rendered in the higher resolution on the iPhone 4. But any graphics will be scaled up. The graphics don’t look nearly as bad as the 2x mode on the iPad, but you definitely notice the difference in sharpness. For example compare the icons of the built-in Apple apps with the surrounding icons that have not yet been optimized for the new display.
Speaking of icons: Here’s a nice overview of all the different icon sizes that you should be creating for your apps to take full advantage of the screen resolution of each device. There are more sizes on this list than you think…
Having upgraded from an old iPhone 3G as my daily device, the speed of the iPhone 4 seems blazing. Everything is faster including installing apps and backups. It’s very easy to get spoiled. But keep in mind that a majority of your customers don’t have the iPhone 4. My main development and testing device is still a first generation iPod Touch. And I’m not done with my performance tuning until it runs fast on that device.
Fast Task Switching
The world has demanded “multitasking” on the iPhone, and Apple’s marketing department has delivered. In all seriousness, the engineers have implemented a really good mechanism for quickly switching between apps. However, as a user I still find it confusing. This is mostly because apps behave inconsistently when you launch/resume.
To participate in fast task switching you need to recompile your code using the 4.0 SDK. WIthout recompiling, your app will behave just like it does today under iOS 3.x and earlier: the app fully exits and launches from scratch each time. (Yes, I know that old apps still show up in the task bar when you double-click the Home button. But that’s because the task bar is a list of recently launched apps, most of which are no longer resident in memory, and even fewer are actually running.)
But you shouldn’t stop with a simple recompile. The important, and difficult, part is to maintain and restore the application state. If your app happens to be still in memory when it’s relaunched, then the state of the app will be just like the user left it. This is what the user expects. But if your app has been terminated, perhaps because the OS needed to reclaim the memory, then it will be launched from scratch. In this case it’s your responsibility to completely restore the state. The user has no idea of what the OS is doing behind the scenes, so the behavior of your app should not vary between these two situations.