Skip to content

Latest commit

 

History

History
41 lines (35 loc) · 1.66 KB

README.md

File metadata and controls

41 lines (35 loc) · 1.66 KB

Simple Keychain implementation of iOS Objetive-C

Language: Objective-C GitHub license Build Status codecov

Table of Contents

Setup

Copy generated SimpleKeyChainLibrary.framework into your Xcode project, place the code below where you need it:

// Define your account name of the KeyChain first, by default it is "ACCOUNT_KEY"
#define ACCOUNT_KEY @"ACCOUNT_KEY"
// Import header of the SimpleKeyChainLibrary framework
#import <SimpleKeyChainLibrary/SimpleKeyChainLibrary.h>

Usage

Store a string

// Store a string
[SimpleKeyChain setStringByKey:@"aKeyToBeUsed" value:@"aValueToBeStored"];

Retrieve a stored string by key

// Retrieve a stored string by key
NSString *storedValue = [SimpleKeyChain getStringByKey:@"aKeyToBeUsed"];

Remove a stored string by key

// Remove a stored string by key
BOOL aValueShouldBeTrue = [SimpleKeyChain removeStringByKey:@"aKeyToBeUsed"];

License

Copyright 2016 GCG GBS CTO Office under the Apache 2.0 license.