Skip to main content

Set User Default

An expression editor function that stores data persistently in UserDefaults.

Updated yesterday

Overview

This function stores a value in UserDefaults for the provided key, allowing data persistence between app sessions.


Parameters

setUserDefault(key, value)

Key

The string key to associate with the stored value.

Value

The value to store (can be string, number, boolean, etc.).


For example...

setUserDefault("username", "john_doe")

Stores "john_doe" with the key "username".

Did this answer your question?