2
votes

I am wondering how where I can keep both password and session token at once?

According to this tutorial:

http://yuttana.me/2013/08/05/ios-tips-using-keychain-to-store-password-access-token-on-ios-app/

I can keep password this way using key kSecValueData:

[keychainWrapper setObject:@"1a7b0b0bd363c9beef7f9214c3a67c5c" forKey:(__bridge id)(kSecValueData)];

But what key I should use to store session token?

1

1 Answers

3
votes
NSDictionary *dic = @{ @"password": password, @"session": session };
[keychainWrapper setObject:dic forKey:(__bridge id)(kSecValueData)];

you can init a new wrapper with other identifier to store your session, also.

I misunderstand this problem. I think you need store them in kSecValueData together.