3

I am checking:

[[UIDevice currentDevice] systemName]

in applicationDidEnterBackground. It is causing a EXC_BAD_ACCESS (SIGSEGV) signal. The stack trace shows that this is occurring internally in UIDevice, which is calling CFDictionaryGetValue.

Experimenting, calling:

CFDictionaryGetValue(NULL, "key");

results in the same error.

Any ideas? I have searched for documentation about accessing UIDevice while in the background and found nothing to indicate it should be a problem.

Thanks

1 Answers1

0

Calling (and logging) [[UIDevice currentDevice] systemName] in applicationDidEnterBackground: works fine in my test. CFDictionaryGetValue(NULL, "key") will always crash, and has nothing to do with the problem you've encountered.

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    NSString *systemName = [[UIDevice currentDevice] systemName];
    if ( systemName )
        NSLog(@"%@", systemName);
    else
        NSLog(@"null systemName");
}
escrafford
  • 2,373
  • 16
  • 19