Skip to content

This is a simple implementation of iOS KeyChain, this is ONLY the SAMPLE for tools integration.

License

Notifications You must be signed in to change notification settings

CognitiveBuild/SimpleKeyChainObjectiveC

Repository files navigation

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.

About

This is a simple implementation of iOS KeyChain, this is ONLY the SAMPLE for tools integration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published