Multitasking

Daniel Sperl on August 11, 2010

As you all know, one of the most important new features of iOS 4 is multitasking. I just found out that the scaffold and demo projects I provided with Sparrow 0.9 had problems with multitasking - and this might be similar in your existing Sparrow projects.

Fortunately, the fix is extremely simple. All you have to do is open your application delegate (ApplicationDelegate.m) and update the contents of the following methods:

- (void)applicationWillResignActive:(UIApplication *)application 
{    
    [sparrowView stop];
}

- (void)applicationDidBecomeActive:(UIApplication *)application 
{
    [sparrowView start];
}

That’s it! Now your app should support multitasking.

I updated the Sparrow download package, so that the demo and scaffold projects use this code, too. I also included a small update of the atlas generator, so if you are using it, you can fetch that, too.