Support for iOS 4 multitasking, iPhone 4 Retina Display easy to add
June 21st, 2010
Daniel Eran Dilger
Updating existing App Store titles to support new features in Apple’s iOS 4, from multitasking to the higher resolution Retina Display of iPhone 4, are relative easy and straightforward to do, developers report.
Today’s new release of iOS 4 appears to be identical to the ‘golden master’ that Apple distributed at WWDC, apart from the omission of Game Center. That app is still a “developer preview” covered by Apple’s NDA, and will be publicly released later in the year, according to App Store developer Clement Padovani.
There’s a few potential hiccups related to updating to iOS 4 some users report, but these seem to be relatively minor irritations, such as instances of users not being able to send MMS messages, finding very low resolution versions of photos begin synced over from iPhoto libraries, and some issues with ActiveSync, which is used by Exchange and Google cloud sync.
Adding support for iOS 4 multitasking with Fast App Switching
Developers report fewer problems, apart from being able to get their updated apps approved. Verifying compatibility with iOS 4 over the 225,000 app library of the App Store is a formidable task, but a search of Apple’s iTunes.apple.com site shows over 1,000 apps that are already citing improvements related to iOS 4.
Scott Sykora, the lead developer of Tasker, a location based task management tool, has added support for Fast App Switching, Background Location, and the high resolution Retina Display, and is currently waiting for Apple to approve the new update.
Asked about what was involved, Sykora said, “I found the Fast App Switching to be one of the easiest things to get working in iOS4. All it requires is a re-compile against the new libraries and your app will freeze and unfreeze in the background. The extra work comes if you want to support it well. If you’re app has some memory that it can free up when its put in the background this is a very good idea as this will keep your app from getting killed completely during low memory situations.
”Also if you have network connections, use OpenGL or some specific shared assets there is some more work you need to do. So basically its an automatic feature when re-compiling but there is a big difference between just turning it on and executing it well. In my case my app didn’t use many of the shared resources that need extra work and it already handled many of the memory issues. It was ready to go out of the box though I’m sure its a feature I’ll be optimizing and testing more for future releases.“
Adding support for Background Location
”For Background Location updates this, again, was quite simple,“ Sykora said. ”You just need to set up a CLLocationManager object and tell it to start updating you on significant location changes. There is no extra thread you need to set up and if your app has been killed while in the background the system will re-open it and tell it of the new location.“
Background Location works differently depending on whether the user’s phone is plugged into power (such as driving in a car with a power adapter, in which case the system activates GPS) or idle in a pocket running on battery (when the system relies upon cellular towers for passive location updates). While sleeping without a power source, Background Location may send the app updates as far apart as every 30 minutes.
”This doesn’t give you very good resolution if you want to notify the user if they’re near something,“ Sykora explained. ”If the phone is plugged in the app is updated much more frequently. This limitation is there to save the user battery life and I’m sure Apple has tried to balance it as best they can. I just wish there was a way to specify a little more frequent updates if an app needs them but doesn’t want to go to full GPS mode.“
Adding support for with Local Notifications
Local Notifications ”are basically alerts and badge updates you can schedule in the app,“ as opposed to Push Notifications which originate on an external server. ”This was very easy to implement,“ Sykora notes, ”just setting the date and scheduling a notification. Its great because now you can have alarms and badge updates not require a server connection when you just want to schedule them for a specific time.“
Adding support for iPhone 4 Retina Display
Full resolution support for iPhone 4 is ”also quite easy if your artwork was created at a higher resolution or using vector artwork,“ Sykora said. ”Basically you just create images with the same filename as the current version with “@2x” added,“ such as email@example.com. ”They need to be exactly twice the dimensions but you don’t need to change your code at all. The standard bundle image loader automatically checks for a high res version when you’re loading the image.
“For OpenGL ES apps or apps that load images using custom libraries, they’ll probably need to do a check in the app for the screen scale and then load the appropriate artwork. Because of this a lot of games will probably take a lot more work to support the high res display.
”Overall, I’ve found the transition to iOS 4 to be very painless. I think a big reason for this is that I develop in Objective C and use the native frameworks whenever I can. Apple has done the work to support developers using their tools but if a developer is using a 3rd party abstraction layer their lives will get quite a bit more complicated. Maybe this is a moot point since most of those have been restricted in the new dev agreement anyway.“