SuperIslandSuperIsland
API Reference

DynamicIsland.store & settings

Persistent key-value storage and settings APIs.

DynamicIsland.store

Extension-scoped persistent storage. Data survives app restarts and is isolated per-extension (your extension cannot read another extension's store).

Methods

store.get(key)

Returns the stored value for key, or null if not set.

const count = DynamicIsland.store.get("clickCount") ?? 0;

Stored values can be any JSON-serializable type: string, number, boolean, array, or object.

store.set(key, value)

Stores value under key.

DynamicIsland.store.set("clickCount", count + 1);
DynamicIsland.store.set("config", { theme: "dark", size: 16 });
DynamicIsland.store.set("tags", ["focus", "work"]);

Example: Persistent counter

DynamicIsland.registerModule({
  compact() {
    const count = DynamicIsland.store.get("count") ?? 0;
    return View.hstack([
      View.text(`${count}`, { style: "headline", bold: true }),
      View.button(View.text("+"), "increment"),
    ]);
  },

  onAction(id) {
    if (id === "increment") {
      const count = DynamicIsland.store.get("count") ?? 0;
      DynamicIsland.store.set("count", count + 1);
    }
  },
});

DynamicIsland.settings

Reads and writes settings values defined in your settings.json. Unlike store, settings values are shown to the user in Settings → Extensions → [Your Extension].

Methods

settings.get(key)

const duration = DynamicIsland.settings.get("workMinutes") ?? 25;

Returns the current value, or the default from settings.json if the user hasn't changed it, or null if neither.

settings.set(key, value)

Programmatically update a setting (rare — usually users set these in the UI).

DynamicIsland.settings.set("lastSync", Date.now());

Example: Reading user preferences

DynamicIsland.registerModule({
  compact() {
    const unit = DynamicIsland.settings.get("tempUnit") ?? "F";
    const temp = fetchTemperature();
    return View.text(`${temp}°${unit}`, { style: "caption" });
  },
});

On this page