Search documentation of mob

# API Reference mob v#0.6.18

Copy Markdown View Source

## Modules

Mob

Mob — BEAM-on-device mobile framework for Elixir.

Mob.Alert

Native alert dialogs, action sheets, and toast messages.

Mob.App

Behaviour for Mob application entry point.

Mob.Audio

Microphone recording and audio playback.

Mob.Background

Background execution keep-alive via a silent audio session.

Mob.Biometric

Biometric authentication (Face ID / Touch ID / fingerprint).

Mob.Bt

Bluetooth Classic (BR/EDR) — device-level discovery, pairing, and cross-profile session management.

Mob.Bt.Hfp

Bluetooth Classic Hands-Free Profile (HFP) — audio + vendor AT commands.

Mob.Bt.Hid

Bluetooth Classic Human Interface Device (HID) — input listener.

Mob.Bt.Spp

Bluetooth Classic Serial Port Profile (SPP) — RFCOMM byte streams.

Mob.Camera

Native camera capture for photos and videos.

Mob.Canvas

Drawing-op constructors for `Mob.UI.canvas/1`.

Mob.Clipboard

System clipboard access. No permission required.

Mob.Component

Behaviour for native view components.

Mob.DNS

Hostname → IP resolution that works around BEAM's broken DNS path on iOS.

Mob.Device

Cross-platform device events and queries.

Mob.Device.Android

Android-specific device events. Symmetrical with `Mob.Device.IOS`.

Mob.Device.IOS

iOS-specific device events. Subscribers receive events that either have no Android counterpart (e.g. `:protected_data_did_become_available`) or carry extra iOS fidelity beyond what `Mob.Device` exposes cross-platform.

Mob.Diag

Runtime diagnostics that run inside a Mob app's BEAM. Designed to be invoked via Erlang RPC from a developer's machine to inspect the actual state of a deployed app.

Mob.Dist

Platform-aware Erlang distribution startup.

Mob.Event

The unified event emission API for Mob.

Mob.Event.Address

Canonical address for an event in the Mob view tree.

Mob.Event.Bridge

Translates legacy event shapes (`{:tap, tag}`, `{:change, tag, value}`, `{:tap, {:list, id, :select, index}}`) into the canonical `{:mob_event, %Address{}, event, payload}` envelope.

Mob.Event.Component

Behaviour for stateful event-owning components.

Mob.Event.Target

Resolves a `target:` spec to a concrete delivery pid.

Mob.Event.Throttle

Throttle / debounce config for high-frequency event subscriptions.

Mob.Event.Trace

Live tracing of Mob events for IEx debugging.

Mob.Files

System file picker. Opens the OS document picker (Files app on iOS, SAF on Android).

Mob.Formatter

`mix format` plugin for the `~MOB` sigil.

Mob.Haptic

Haptic feedback. No permission required on either platform.

Mob.List

Data-driven list component.

Mob.LiveView

Bridge between Phoenix LiveView and the Mob native WebView.

Mob.Location

Device location (GPS / network).

Mob.Motion

Accelerometer and gyroscope sensor data.

Mob.NativeLogger

OTP logger handler that routes Elixir Logger output to the platform's native system log.

Mob.Nav.Registry

ETS-backed registry mapping screen name atoms to their modules.

Mob.Notify

Local and push notifications.

Mob.Permissions

Request OS-level permissions from the user.

Mob.Photos

Photo / video library picker.

Mob.Registry

Maps component names (atoms) to their platform-specific NIF constructors.

Mob.Renderer

Serializes a component tree to JSON and passes it to the platform NIF in a single call. Compose (Android) and SwiftUI (iOS) handle diffing and rendering internally.

Mob.Scanner

QR code and barcode scanner.

Mob.Screen

Behaviour and GenServer wrapper for a Mob screen.

Mob.ScreenState

Persistent store for screen assigns.

Mob.Share

System share sheet. Opens the OS share dialog with a piece of content. Fire-and-forget — no response arrives in the BEAM.

Mob.Sigil

The `~MOB` sigil for declarative native UI.

Mob.Socket

The socket struct passed through all Mob.Screen and Mob.Component callbacks.

Mob.State

Persistent key-value store for app state.

Mob.Storage

App-local file storage.

Mob.Storage.Android

Android-specific storage locations and MediaStore integration.

Mob.Storage.Apple

iOS-specific storage locations and media library integration.

Mob.Style

Thin wrapper around a props map for named, reusable styles.

Mob.Test

Remote inspection and interaction helpers for connected Mob apps.

Mob.Theme

Design token system for Mob apps.

Mob.Theme.Adaptive

Theme that follows the OS-level light / dark setting.

Mob.Theme.AdaptiveWatcher

GenServer that re-resolves the active theme when the OS appearance flips.

Mob.Theme.Birch

Birch theme for Mob — warm parchment surfaces with a chestnut-brown accent.

Mob.Theme.Citrus

Citrus theme for Mob — warm charcoal with a lime-green accent.

Mob.Theme.Dark

High-contrast greyscale dark theme.

Mob.Theme.Light

High-contrast greyscale light theme.

Mob.Theme.Obsidian

Obsidian theme for Mob — deep blacks with a violet accent.

Mob.Theme.ObsidianGlass

Obsidian + Liquid Glass — the Obsidian palette with `glass: true`, so every card / sheet renders as a translucent material instead of a solid fill.

Mob.UI

UI component constructors for the Mob framework.

Mob.VendorUsb

Raw USB host access via vendor bulk endpoints. Android only.

Mob.WebView

Bidirectional JS bridge for the native WebView component.

## Mix Tasks

mix erlfmt

Format `.erl` files (or check formatting with `--check`).

mix mob.onboarding_test

Runs the Mob onboarding integration tests, which verify that a new user can go from zero to a running app without hitting any friction that should have been caught automatically.