AsyncStorage is a simple, asynchronous, persistent, global, key-value storage system. It should be used instead of LocalStorage.
It is recommended that you use an abstraction on top of AsyncStorage instead of AsyncStorage directly for anything more than light usage since it operates globally.
This JS code is a simple facad over the native iOS implementation to provide a clear JS API, real Error objects, and simple non-multi functions.
Fetches key and passes the result to callback, along with an Error if
there is any.
Sets value for key and calls callback on completion, along with an
Error if there is any.
Merges existing value with input value, assuming they are stringified json.
Not supported by all native implementations.
Erases all AsyncStorage for all clients, libraries, etc. You probably don't want to call this - use removeItem or multiRemove to clear only your own keys instead.
Gets all keys known to the system, for all callers, libraries, etc.
multiGet invokes callback with an array of key-value pair arrays that matches the input format of multiSet.
multiGet(['k1', 'k2'], cb) -> cb([['k1', 'val1'], ['k2', 'val2']])
multiSet and multiMerge take arrays of key-value array pairs that match the output of multiGet, e.g.
multiSet([['k1', 'val1'], ['k2', 'val2']], cb);
Delete all the keys in the keys array.
Merges existing values with input values, assuming they are stringified json.
Not supported by all native implementations.