Expo

Documentation

Hi friend! Meet us at App.js Conf in Krakow, Poland on April 4th and 5th with workshops and talks. Learn more

Settings

Settings serves as a wrapper for NSUserDefaults, a persistent key-value store available only on iOS.


Reference

static get(key)
Get the current value for a key in NSUserDefaults.

static set(settings)
Set one or more values in NSUserDefaults.

static watchKeys(keys, callback)
Subscribe to be notified when the value for any of the keys specified by the keys array changes in NSUserDefaults. Returns a watchId number that may be used with clearWatch() to unsubscribe.

static clearWatch(watchId)
watchId is the number returned by watchKeys() when the subscription was originally configured.