ABCDataStore Class Reference

Inherits from NSObject
Declared in ABCDataStore.h

Overview

The ABCDataStore object implements the Airbitz auto-encrypted, auto-backed up, and auto synchronized Edge Security data storage. ABCDataStore is end-to-end encrypted with no access to the data by Airbitz, other users, or developers. Data is encrypted

Data is saved as key/value pairs in named folders. Usage is as simple as calling dataWrite to write data to this ABCDataStore using a unique folderID. Then calling dataRead to read back the data.

Note: Data written using the same folderID and same key may generate conflicts when multiple devices write to the same DataStore. In such a case, automatic conflict resolution will chose the most likely newer update to the data. Writing to different folderIDs or keys will not cause conflicts.

ABCDataStore will automatically backup all data and synchronize between all user’s devices as long as the devices are online. If devices are offline, the data will sync as soon as the device comes back online

– dataWrite:withKey:withValue:

Writes a key value pair into the data store.

- (NSError *)dataWrite:(NSString *)folder withKey:(NSString *)key withValue:(NSString *)value

Parameters

folder

NSString* folder name to write data

key

NSString* key of data

value

NSString* value of data to write

Return Value

NSError* Error object. Nil if success

Discussion

Writes a key value pair into the data store.

Declared In

ABCDataStore.h

– dataRead:withKey:data:

Reads a key value pair from the data store.

- (NSError *)dataRead:(NSString *)folder withKey:(NSString *)key data:(NSMutableString *)data

Parameters

folder

NSString* folder name to read data

key

NSString* key of data

data

Initialized & allocated NSMutableString* to receive data

Return Value

NSError* Error object. Nil if success

Discussion

Reads a key value pair from the data store.

Declared In

ABCDataStore.h

– dataRemoveKey:withKey:

Removes key value pair from the data store.

- (NSError *)dataRemoveKey:(NSString *)folder withKey:(NSString *)key

Parameters

folder

NSString* folder name to read data

key

NSString* key of data

Return Value

NSError* Error object. Nil if success

Discussion

Removes key value pair from the data store.

Declared In

ABCDataStore.h

– dataRemoveFolder:

Removes all key value pairs from the specified folder in the data store.

- (NSError *)dataRemoveFolder:(NSString *)folder

Parameters

folder

NSString* folder name to read data

Return Value

NSError* Error object. Nil if success

Discussion

Removes all key value pairs from the specified folder in the data store.

Declared In

ABCDataStore.h