tags:

views:

72

answers:

1

Hi,

I have an app that always terminate, never goes to suspend mode.

I have other apps that go to suspend, the only difference that I can see between them are:

  • app that terminates: In the left popup menu of the main project window, no matter wich option I select, it start always with Device - 3.2 or Simulator 3.2, even If I choose myApp iPhone Simulator 4.0

  • the app that goes correctly to suspend mode, always has the Simulator 4.0 or Device 4.0

Both apps have the same project settings:

  • build for 4.0
  • target for 4.0

I haven't added the option Application does not run in background ...

Also the app in the iPhone 3Gs with 4.0.1 doesn't suspend, and other apps from mine go to suspended mode correctly.

Still no idea where the problem is ...

thanks,

r.

This code return YES:

UIDevice * device        = [ UIDevice currentDevice ];
BOOL backgroundSupported = NO;
  if( [ device respondsToSelector: @selector( isMultitaskingSupported ) ] )
    {
    NSLog(@"yes");      
}

edited:

This delegate fires:

- (void)applicationDidEnterBackground:(UIApplication *)application {

but also this one:

- (void)applicationWillTerminate:(UIApplication *)application {
A: 

ok, solved, the Target settings weren't updated correctly, now they do with Base to SKD 4.0, but it's strange, compiled with Target Base SKD to 3.2 and running in iOS 4.x your app will always terminate – mongeta

mongeta