I want to save an object which might include sensitive data into the keychain. To achieve this i will convert this object into a NSData instance.
I'm a bit confused which attributes i need to use. Is it ok to use kSecClassGenericPassword as kSecClass even though it is not really a password? Furthermore i've set the kSecAttrAccount. I've read somewhere that i also need to add kSecAttrService. What implications can happen if i don't ?
Checkout SSKeychain on GitHub. It's a nice Open Source wrapper for the keychain that makes it super easy to use. If you want to understand more about how the keychain and the security on iOS/OS X work and you're registered to the Apple Developer Program, there are few WWDC session videos that you might check on developer.apple.com.