First-Party Packages

Copy Markdown View Source

Mob is fully featured — but since 0.7.0 the capabilities live in focused packages rather than one monolithic core. Core ships the kernel every app needs (screens, navigation, rendering, state, storage, permissions, distribution, the test harness, and the neutral light/dark/adaptive themes); everything else is one dep + one config line away.

Activating any capability plugin is the same two steps:

# mix.exs
{:mob_camera, "~> 0.1"}

# mob.exs
config :mob, :plugins, [:mob_camera]

Style packages use the styles lane instead:

config :mob, :styles, [:mob_themes]
config :mob, :default_style, :mob_themes

Capability plugins

The core loop — screens, navigation, state, storage, the neutral theme, distribution — is in mob itself. Everything below is opt-in.

Device I/O

PackageGives youNotes
mob_cameraPhoto/video capture, live preview session, ML-ready frame streamingThe <CameraPreview> view node is in core; pair it with MobCamera.start_preview/2
mob_photosThe system photo/video pickerNo runtime permission needed (out-of-process picker)
mob_videoOn-device video clip / probe / thumbnail / extract-audioNo ffmpeg; uses AVFoundation on iOS and MediaCodec on Android
mob_locationGPS/network location — one-shot + continuous
mob_biometricFace ID / Touch ID / fingerprint authiOS + Android both green (Android now via platform BiometricPrompt on ComponentActivity)
mob_scannerQR / barcode scanning (full-screen scanner)Also activate mob_camera (it owns the :camera permission)
mob_bluetoothBluetooth discovery + SPP/HFP/HID + BLE (LE advertise/scan/connect)Verified on both Moto G Power + iPhone
mob_midiMIDI in + out (over USB, Bluetooth LE MIDI, and app-to-app)
mob_touchRaw touch stream, observe-without-consumeUseful for gesture prototyping / analytics without owning the UI event flow
mob_screencastThe device's own screen as an on-device-encoded H264 streamFor remote viewing / WebRTC; max_size is Android-only today

Messaging + wake

PackageGives youNotes
mob_smsSystem SMS composer pre-filled with recipient + bodyMobSms.compose/2 on both platforms. iOS observes send / cancel via the MessageUI delegate; Android hands off to the user's SMS app (outcome unobservable — see the plugin's per-platform-delivery docs). No permissions on either platform.
mob_notifyLocal notification scheduling + push token registration (device-side)Two ends of the same wire as mob_push (server-side); delivery into handle_info is core behaviour. See Push notifications.
mob_wakeOS-triggered background execution (device-side) — iOS BGTaskScheduler + silent APNs, Android WorkManager + FCM data messagesFor episodic work fired by the OS or a silent push (server-side push via mob_push using MobWake.wake_payload/2). Foreground + backgrounded verified end-to-end on Moto G Power 5G 2024 + iPhone SE 3rd-gen (MOB-268 / MOB-271); force-quit drop is intentional platform behaviour on both OSes.
mob_backgroundKeep-alive execution while backgrounded — iOS silent-audio session, Android foreground serviceFor continuous work (music, upload, walk tracker) that the user has explicitly kicked off. Not the same as mob_wake — mob_background keeps a process alive while backgrounded; mob_wake wakes a specific handler on an OS event. They stack. See Background execution.

ML

PackageGives youNotes
mob_nx_eigenOn-device Nx backend backed by Eigen — the header-only C++ linear-algebra library, NEON-vectorised on ARM. Always-available CPU baseline for on-device numerics — needs no GPU, runs anywhere mob runs.GPU-accelerated backends (mob_nx_vulkan, mob_nx_mlx, mob_nx_tflite) planned to layer on top; NxEigen is the fallback that always works. Spike; API surface still narrow.

Style packages

PackageGives you
mob_themesFive preset looks — Obsidian (default), ObsidianGlass, Citrus, Birch, Material3. Switch live with Mob.Theme.set(MobThemes.Citrus)

Component kits

PackageGives youNotes
mob_mishka73 Mishka Chelekom composites for Mob apps — dialogs, tabs, accordions, hue / alpha / range / angle sliders, semi-circle progress, JSON input, and moreShipped as a proper Hex plugin (replaces the pre-mob_new 0.6 vendoring pattern). Reads Mob's theme tokens (see Theming), so switching Mob.Theme.set/1 re-skins every composite at once, identically on both platforms. mix mob_mishka.gen <name> ejects a specific composite into your lib/<app>/components/ for editing with config :mob_mishka, :override_namespace, MyApp.Components. mix mob_mishka.migrate converts pre-plugin vendored apps in one pass. Design system upstream: mishka-group/mishka_chelekom (Shahryar Tavakkoli / @shahryarjb).

Framework integrations

PackageGives you
mob_ashDeclare Ash resources, get generated list/detail/create screens per resource — Ash runs on-device

Server-side companions

PackageGives you
mob_pushAPNs + FCM push sending from your Elixir server (no mob dependency — works for any app)

Choosing plugins for an app

The catalog is deliberately un-monolithic — you pay for what you activate. Some pairing hints:

  • Verification / OTP flow. mob_sms + the built-in text-field text_content_type: :one_time_code prop (mob 0.9.1+) covers iOS QuickType autofill; mob_sms's MobSms.OneTimeCode.arm/2 covers Android via Google Play Services' SMS Retriever. Same shape on both platforms, no READ_SMS permission on Android.
  • Camera-centric app. mob_camera for capture + preview, mob_scanner if you want QR/barcode as its own screen (activates :camera under the hood), mob_photos for picking existing images from the library. mob_video for on-device editing.
  • Sensor / peripheral app. mob_bluetooth for BLE + BR/EDR, mob_midi for musical instruments, mob_location for GPS, mob_touch if you need the raw touch stream.
  • Background sync. mob_notify for local reminders, mob_wake for OS-triggered handlers (scheduler firings + silent-push receive), mob_background for continuous keep-alive while the app is backgrounded. Three distinct concerns — see each plugin's moduledoc for the "which one do I want" table.
  • Design system. mob_mishka gives you 73 composites; mob_themes gives you five preset visual looks that all composites read from.
  • Push notifications end-to-end. mob_notify on the client (register for pushes, receive them) + mob_push on your server (send APNs / FCM).

Building your own

  • Pure-Elixir UI kits: function composites work with a plain Hex dep, and tag-name composites via Mob.Composite — see the Components guide.
  • Anything deeper: mix mob.new_plugin --tier 0|1|2|3|4 scaffolds a plugin with tests; the Plugins guide and the manifest reference cover the rest.
  • If your plugin will fill an obvious gap in the first-party catalog above, reach out — happy to review, credit, and potentially adopt it into first-party status once it stabilises.