What I do is, for the background handling just implement the applicationDidEnterBackground and applicationWillEnterForeground on the main app delegate, which on pre iOS 4 will just be ignored.
If you are not using any specific functionality on iOS 4 then there are no disadvantages on targeting for 3.0
I personally can't see any good reason why a game has to support multitasking.
To be more clear, this is what I do (using old version of cocos2d, may be different on 0.99):
-(void) applicationWillResignActive:(UIApplication *)application {
if ([Shared isDebugging]) NSLog(@"applicationWillResignActive called");
// Incoming phone call...
[[Director sharedDirector] pause];
}
-(void) applicationDidBecomeActive:(UIApplication *)application {
if ([Shared isDebugging]) NSLog(@"applicationDidBecomeActive called");
// Phone call rejected...
[[Director sharedDirector] resume];
}
// Added to fix the "sgx error (background gpu access not permitted)" error
// Those two functions will be ignored in pre iOS 4
- (void)applicationDidEnterBackground:(UIApplication *)application
{
if ([Shared isDebugging]) NSLog(@"applicationDidEnterBackground called");
[[Director sharedDirector] stopAnimation];
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
if ([Shared isDebugging]) NSLog(@"applicationWillEnterForeground called");
[[Director sharedDirector] startAnimation];
}
// End fix
-(void) applicationWillTerminate:(UIApplication*)application {
// Application is ending...
if ([Shared isDebugging]) NSLog(@"applicationWillTerminate called");
[[Director sharedDirector] release];
//NSLog(@"applicationWillTerminate ended");
}