The Service should be a unique string for your App, possibly use the iOS Bundle Identifier as the Service or the name/URL of your Application or Web App or whatever you are setting the Password for. This should ideally be constant throughout your Application but there is no specific preference. I personally prefer to set it to the Web Service URL but that is my preference.
The account bit is in essence similar to a Username field on any application. That's so you can store multiple passwords for the same service but for different accounts. If you are working on an application which doesn't have a username field then you could set it to 'user' or something arbitrary but remains constant throughout the application and in future versions.
So if I am storing the password for joebloggs with password 'test' for the acme.com service, here is how I'd store it:
NSString *password = [SSKeychain setPassword:@"test" forService:@"acme.com" account:@"joebloggs"];
SSKeychain is so easy and fantastic to use. Definitely a good choice!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…