Skip to content

Simple iPhone Keychain Code

Sci-Fi Hi-Fi: Weblog: Simple iPhone Keychain Code

It has a dead simple and hopefully self-explanatory interface, with only two methods.

[sourcecode lang=”cpp”]
+ (NSString *) getPasswordForUsername: (NSString *) username andServiceName: (NSString *) serviceName error: (NSError **) error;

+ (void) storeUsername: (NSString *) username andPassword: (NSString *) password forServiceName: (NSString *) serviceName updateExisting: (BOOL) updateExisting error: (NSError **) error;
[/sourcecode]