Questions tagged «sskeychain»

20
SecItemAdd和SecItemCopyMatching返回错误代码-34018(errSecMissingEntitlement)
有时,当我从Xcode在设备上运行应用程序时,我会尝试访问钥匙串,但由于错误-34018而失败。这与任何已记录的钥匙串错误代码均不匹配,因此无法一致地复制。(可能是30%的时间,但我不清楚为什么会发生)。使调试此问题非常困难的原因是完全缺少文档。知道是什么原因造成的,以及如何解决?我正在使用Xcode 5并在设备上运行iOS 7.0.4。 这里有一个关于此的公开问题:https : //github.com/soffes/sskeychain/issues/52 编辑:为每个请求添加钥匙串访问代码 我正在使用该SSKeychain库与钥匙串接口。这是代码段。 #define SERVICE @"default" @implementation SSKeychain (EXT) + (void)setValue:(NSString *)value forKey:(NSString *)key { NSError *error = nil; BOOL success = NO; if (value) { success = [self setPassword:value forService:SERVICE account:key error:&error]; } else { success = [self deletePasswordForService:SERVICE account:key error:&error]; } NSAssert(success, @"Unable …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.