BOXKeychainItemWrapper.m崩溃

时间:2015-10-13 07:37:28

标签: box-api box

App在方法中偶尔会突然崩溃 的 resetKeychainItem 在第210行:

NSAssert( junk == noErr || junk == errSecItemNotFound, @"Problem deleting current dictionary." );

有没有办法避免此次崩溃/有关此问题的任何更新?

方法:

- (void)resetKeychainItem
{
   @synchronized(self) {
      OSStatus junk = noErr;
      if (self.keychainItemData != nil)
      {
        NSMutableDictionary *tempDictionary = [self dictionaryToSecItemFormat:self.keychainItemData];
        junk = SecItemDelete((CFDictionaryRef)tempDictionary);

        NSAssert( junk == noErr || junk == errSecItemNotFound, @"Problem deleting current dictionary." );
        // Default data for keychain item.
        self.keychainItemData = [self defaultKeychainItemDataDictionaryWithIdentifier:self.identifier
                                                                          accessGroup:self.accessGroup];
      }
  }
}

1 个答案:

答案 0 :(得分:1)

我们将回答您在GitHub中提交的问题: https://github.com/box/box-ios-sdk/issues/117