0

Can't duplicate the crash on my devices, and I don't understand this entry in the crash log:

2015-11-27 13:43:34.361 LARSA[1453]: SecOSStatusWith error:[-25299] Error Domain=NSOSStatusErrorDomain Code=-25299 "duplicate item O,genp,38C76CFA,L,ak,K95FHDJ5ZD.studiosixdigital,0,acct,svce,gena,v_Data,20151127214334.356112Z,0066C90F" UserInfo={NSDescription=duplicate item O,genp,38C76CFA,L,ak,K95FHDJ5ZD.studiosixdigital,0,acct,svce,gena,v_Data,20151127214334.356112Z,0066C90F}

Seems to be a duplicate item of some kind, but where?

Andrew Smith
  • 2,919
  • 2
  • 22
  • 25
  • Did you set both kSecAttrAccount and kSecAttrService? http://useyourloaf.com/blog/keychain-duplicate-item-when-adding-password.html – Dare Dec 01 '15 at 20:21
  • Yes, and the odd thing is that the keychain code that I am running is shared by about a dozen apps, and only 2 of them are failing in review. The rest all passed. So I am suspecting some difference in the plist files or something. Just not sure if the "duplicated item" message has any meaning that might help me. – Andrew Smith Dec 01 '15 at 21:09
  • So it was really this line that related to the crash: Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:] – Andrew Smith Dec 01 '15 at 22:27

1 Answers1

0

So it was not the KeyChain at all, it was apparently some window that was not connected to a viewcontroller. This code fixed it in diFinishLaunchingWithOptions:

    NSArray *windows = [[UIApplication sharedApplication] windows];     // wow some crazy fix....
for(UIWindow *window in windows) {
    NSLog(@"window: %@",window.description);
    if(window.rootViewController == nil){
        UIViewController* vc = [[UIViewController alloc]initWithNibName:nil bundle:nil];
        window.rootViewController = vc;
    }
}

Which I found on this StackOverflow post:

Application windows are expected to have root view controllers

Community
  • 1
  • 1
Andrew Smith
  • 2,919
  • 2
  • 22
  • 25