reidmain / FDKeychain

Save, load and delete items from the keychain with a single Objective-C message.
MIT License
119 stars 21 forks source link

Readme should be updated to reflect full (minimum) message signature #2

Closed trailblazr closed 10 years ago

trailblazr commented 10 years ago

Maybe modifying the code example to reveal that you could e.g. put in pretty common objects of e.g. NSDate (which implements NSCoding) and displaying the full message signature with error-handling would be helpful on the Readme.

#define kSECURE_DATE_KEY @"my_secure_date"
#define kSERVICE_KEY @"my_secure_app"
NSDate *myDate = [NSDate date];
NSError *error;
[FDKeychain saveItem:myDate forKey:kSECURE_DATE_KEY forService:kSERVICE_KEY error:&error];

just my 2 cents.

reidmain commented 10 years ago

Good call. I completely missed that the sample code doesn't show error handling. I'll make that change soon.

reidmain commented 10 years ago

I have updated the README file to use the the full message signatures.

trailblazr commented 10 years ago

Hey, thank you for this helpful piece of code, I use it in my apps and I like how easy it is to use. Thanks for the quick change to the Readme, it may help other developers which like to adopt your solution to the problem.

reidmain commented 10 years ago

My pleasure. I have also recently added documentation to the header file so that if you option click on a method in Xcode it should give you Apple like documentation.

You can also easily view this documentation at http://cocoadocs.org/docsets/FDKeychain