草庐IT

NSZeroData

全部标签

ios - 由于未捕获的异常 'NSInvalidArgumentException',Keychain Wrapper 终止应用程序,原因 : '-[_NSZeroData _fastCharacterContents]

我正在使用此处找到的钥匙串(keychain)包装器:https://gist.github.com/1170641像这样:.h:#import"KeychainItemWrapper.h"KeychainItemWrapper*keychainItem;.m:keychainItem=[[KeychainItemWrapperalloc]initWithIdentifier:@"login"accessGroup:nil];NSString*password=[keychainItemobjectForKey:(__bridgeid)kSecValueData];NSString*u

ios - KeychainItemWrapper 返回 NSZeroData?

我使用Apple的KeychainItemWrapper将密码存储在钥匙串(keychain)上。在某些时候,如果我尝试使用获取尚未设置的密码KeychainItemWrapper*keychain=[[KeychainItemWrapperalloc]initWithIdentifier:identifieraccessGroup:nil];NSString*password=[keychainobjectForKey:kSecValueData];在调试器上返回带有此标识的密码password=(_NSZeroData*)classname=_NSZeroData如果我让代码继续运