0
我想用SSKeychain來保存CFUUID。但有一次,我從SSKeychain得到CFUUID是零...我已經閱讀了關於github的doc,但仍然不知道它有什麼問題。等待救援的〜請~~爲什麼SSKeychain不起作用?
NSString *retrieveuuid = [SSKeychain passwordForService:@"com.game.userinfo "account:@"uuid"];
if (retrieveuuid == nil || [retrieveuuid isEqualToString:@""])
{
CFUUIDRef uuid = CFUUIDCreate(NULL);
assert(uuid != NULL);
CFStringRef uuidStr = CFUUIDCreateString(NULL, uuid);
retrieveuuid = [NSString stringWithFormat:@"%@", uuidStr];
[SSKeychain setPassword: retrieveuuid
forService:@"com.game.userinfo"account:@"uuid"];
}
對於那個愚蠢的錯誤感到羞恥...而Thx很多:) – lx614happy