# mob_dev v0.3.37 - Table of Contents Development tooling for the Mob mobile framework ## Pages - [mob_dev](readme.md) - [Building OTP Release Tarballs](build_release.md) - Guides - [Security scanning](security_scan.md) - [Slim Release (bundle size)](slim_release.md) - [Publishing to TestFlight (iOS)](publishing_to_testflight.md) - [Publishing to Google Play (Android)](publishing_to_google_play.md) ## Modules - Server - [MobDev.Server.DashboardLive](MobDev.Server.DashboardLive.md) - [MobDev.Server.DevicePoller](MobDev.Server.DevicePoller.md): Polls adb and simctl every 2 seconds, broadcasting device state changes via PubSub. - [MobDev.Server.ElixirLogBuffer](MobDev.Server.ElixirLogBuffer.md): Holds the last N server-side Elixir log lines in memory so the dashboard can restore them on reconnect. Fed by `MobDev.Server.ElixirLogger`. - [MobDev.Server.ElixirLogger](MobDev.Server.ElixirLogger.md): OTP logger handler that captures Elixir `Logger` output and forwards it to the Mob dev server dashboard. - [MobDev.Server.Endpoint](MobDev.Server.Endpoint.md) - [MobDev.Server.Layouts](MobDev.Server.Layouts.md) - [MobDev.Server.LogBuffer](MobDev.Server.LogBuffer.md): Holds the last N log lines in memory so the LiveView can restore them on reconnect without losing context from before a crash or page refresh. - [MobDev.Server.LogFilter](MobDev.Server.LogFilter.md): Pure filter functions for the log stream. Extracted here so they can be unit-tested without mounting a LiveView. - [MobDev.Server.LogStreamer](MobDev.Server.LogStreamer.md): Streams logcat from connected Android devices and iOS simulator console, broadcasting parsed lines via PubSub. - [MobDev.Server.LogStreamerSupervisor](MobDev.Server.LogStreamerSupervisor.md): Isolated supervisor for LogStreamer. - [MobDev.Server.Router](MobDev.Server.Router.md) - [MobDev.Server.WatchWorker](MobDev.Server.WatchWorker.md): GenServer that runs the mob.watch loop inside the mob.server process. - Internals - [MobDev.Bench.DeviceObserver](MobDev.Bench.DeviceObserver.md): Subscribes to `Mob.Device` events on the running app over Erlang distribution and tracks ground-truth screen/app state for the bench. - [MobDev.Bench.Logger](MobDev.Bench.Logger.md): Append-only CSV log of bench probe snapshots. - [MobDev.Bench.Preflight](MobDev.Bench.Preflight.md): Pre-run checklist for the iOS battery bench. - [MobDev.Bench.Probe](MobDev.Bench.Probe.md): Multi-source state probe for the battery bench. - [MobDev.Bench.Reconnector](MobDev.Bench.Reconnector.md): Auto-reconnect logic for the bench's BEAM dist connection. - [MobDev.Bench.Summary](MobDev.Bench.Summary.md): Post-run analysis of a bench CSV log. - [MobDev.Connector](MobDev.Connector.md): Orchestrates device discovery, tunnel setup, app restart, and node connection. - [MobDev.Deployer](MobDev.Deployer.md): Pushes compiled BEAM files from `_build/dev/lib/*/ebin/` to connected devices. - [MobDev.Device](MobDev.Device.md): Represents a connected or available device (physical or emulator/simulator). - [MobDev.Discovery.Android](MobDev.Discovery.Android.md): Discovers Android devices and emulators via adb. - [MobDev.Discovery.IOS](MobDev.Discovery.IOS.md): Discovers iOS simulators via xcrun simctl. - [MobDev.Emulators](MobDev.Emulators.md): List, start, and stop Android emulators (AVDs) and iOS simulators. - [MobDev.Enable](MobDev.Enable.md): Pure helpers for `mix mob.enable` — extracted for testability. - [MobDev.ErrorView](MobDev.ErrorView.md) - [MobDev.GooglePlay](MobDev.GooglePlay.md): Google Play Developer API client for uploading Android App Bundles. - [MobDev.GooglePlay.CloudSetup](MobDev.GooglePlay.CloudSetup.md): Google Cloud REST API operations for the Play Store setup wizard. - [MobDev.GooglePlay.OAuth](MobDev.GooglePlay.OAuth.md): OAuth2 browser-based authorization for Google APIs. - [MobDev.GooglePlay.PlaySetup](MobDev.GooglePlay.PlaySetup.md): Google Play Developer API operations for granting service account access. - [MobDev.GooglePlay.SetupWizard](MobDev.GooglePlay.SetupWizard.md): Interactive wizard for the Google Play one-time setup. - [MobDev.HotPush](MobDev.HotPush.md): Connects to already-running device nodes and hot-pushes BEAM modules via RPC. - [MobDev.IconGenerator](MobDev.IconGenerator.md): Generates app icons for Android and iOS from either a random robot avatar (using Avatarz) or a provided source image (using Image). - [MobDev.NativeBuild](MobDev.NativeBuild.md): Builds native binaries (APK for Android, .app bundle for iOS simulator) for the current Mob project. - [MobDev.NdkVersion](MobDev.NdkVersion.md): Single source of truth for the Android NDK version Mob's bundled OTP runtime was cross-compiled against. - [MobDev.Network](MobDev.Network.md): Network utilities for mob_dev. - [MobDev.OtpAssetBundle](MobDev.OtpAssetBundle.md): Builds the `assets/otp.zip` that release-mode Android Mob apps extract on first launch. - [MobDev.OtpAudit](MobDev.OtpAudit.md): Reachability analysis for the bundled OTP runtime tree of a Mob app. - [MobDev.OtpDownloader](MobDev.OtpDownloader.md): Downloads and caches pre-built OTP releases from GitHub for Android and iOS simulator. - [MobDev.OtpTrace](MobDev.OtpTrace.md): Runtime call-tracing utility. Wraps `:erlang.trace_pattern/3` and `:erlang.trace/3` to capture the set of `{module, function, arity}` actually called during a function's execution. - [MobDev.OtpTrace.Harness](MobDev.OtpTrace.Harness.md): Characterization harness: a curated set of Elixir features exercised in tight blocks. Designed to be wrapped in `MobDev.OtpTrace.capture/1` to record the runtime modules touched by typical Elixir code. - [MobDev.Paths](MobDev.Paths.md): Resolution helpers for paths Mob writes to outside the project tree. - [MobDev.QR](MobDev.QR.md): Renders QR codes in the terminal using Unicode half-block characters. Uses eqrcode for matrix generation. - [MobDev.Release](MobDev.Release.md): Build a signed, App-Store-ready iOS `.ipa` for the current Mob project. - [MobDev.ReleaseAndroid](MobDev.ReleaseAndroid.md): Builds the signed release AAB for a Mob Android app. - [MobDev.SecurityScan](MobDev.SecurityScan.md): Top-level API for `mix mob.security_scan`. - [MobDev.SecurityScan.BundledRuntime.Fingerprint](MobDev.SecurityScan.BundledRuntime.Fingerprint.md): Extracts versions from `~/.mob/cache/otp-*-{hash}/` and from exqlite C sources in a project's `deps/`. - [MobDev.SecurityScan.BundledVersions](MobDev.SecurityScan.BundledVersions.md): Loads `priv/security/bundled_versions.exs` — the source-of-truth manifest of what versions ship inside the OTP tarballs that `MobDev.OtpDownloader` distributes. - [MobDev.SecurityScan.Diff](MobDev.SecurityScan.Diff.md): Computes the delta between the previous scan state and the current report - [MobDev.SecurityScan.Finding](MobDev.SecurityScan.Finding.md): A single normalized security finding. - [MobDev.SecurityScan.Formatter](MobDev.SecurityScan.Formatter.md): Render a `Report` for human or machine consumers. - [MobDev.SecurityScan.HistoryFormatter](MobDev.SecurityScan.HistoryFormatter.md): Render a single changelog entry for `SECURITY_HISTORY.md`. - [MobDev.SecurityScan.Layer](MobDev.SecurityScan.Layer.md): Behaviour every scan layer implements. - [MobDev.SecurityScan.LayerResult](MobDev.SecurityScan.LayerResult.md): Result of running a single scan layer (Hex deps, Gradle deps, bundled runtime, C source, etc). - [MobDev.SecurityScan.Layers.BundledRuntime](MobDev.SecurityScan.Layers.BundledRuntime.md): Audits the OpenSSL, ERTS, Elixir, exqlite, and SQLite versions baked into Mob's pre-built OTP tarballs and into the project's `deps/exqlite/c_src/sqlite3.c`. - [MobDev.SecurityScan.Layers.CSource](MobDev.SecurityScan.Layers.CSource.md): Static analysis of every C source file Mob actually compiles into the app: Mob's own NIF shims (`mob/android/jni/`, `mob/ios/`), the exqlite NIF wrapper (`deps/exqlite/c_src/sqlite3_nif.c`), and any C the project itself ships. - [MobDev.SecurityScan.Layers.GradleDeps](MobDev.SecurityScan.Layers.GradleDeps.md): Audits Android dependencies via `osv-scanner` recursively over the `android/` directory. - [MobDev.SecurityScan.Layers.HexDeps](MobDev.SecurityScan.Layers.HexDeps.md): Audits Hex dependencies in `mix.lock` against two complementary advisory sources - [MobDev.SecurityScan.Layers.KotlinSource](MobDev.SecurityScan.Layers.KotlinSource.md): Static analysis of Kotlin/Java source under `android/app/src/main/` using [detekt](https://detekt.dev/). - [MobDev.SecurityScan.Layers.SwiftDeps](MobDev.SecurityScan.Layers.SwiftDeps.md): Audits iOS dependencies via `osv-scanner` recursively over the `ios/` directory. - [MobDev.SecurityScan.Layers.SwiftSource](MobDev.SecurityScan.Layers.SwiftSource.md): Static analysis of Swift source under `ios/` using [swiftlint](https://github.com/realm/SwiftLint). - [MobDev.SecurityScan.OsvScanner](MobDev.SecurityScan.OsvScanner.md): Wrapper around the `osv-scanner` CLI (https://google.github.io/osv-scanner/). - [MobDev.SecurityScan.OsvScanner.Parser](MobDev.SecurityScan.OsvScanner.Parser.md): Pure parser: `osv-scanner` JSON → `[Finding.t()]`. - [MobDev.SecurityScan.Report](MobDev.SecurityScan.Report.md): Aggregate result of a security scan: every layer's `LayerResult` plus run metadata. The report is the single object handed to formatters (terminal, JSON, markdown) and the value returned from `MobDev.SecurityScan.run/1`. - [MobDev.SecurityScan.Runner](MobDev.SecurityScan.Runner.md): Orchestrates the scan: invokes each enabled layer in turn, collects `LayerResult`s, and returns a `Report`. - [MobDev.SecurityScan.StateFile](MobDev.SecurityScan.StateFile.md): Read/write the state sidecar for `mix mob.security_scan.log`. - [MobDev.Tunnel](MobDev.Tunnel.md): Manages port tunnels for Android and physical iOS devices. ## Mix Tasks - Mix Tasks - [mix mob.audit_otp](Mix.Tasks.Mob.AuditOtp.md): Walks an OTP runtime tree and tells you which libraries are dead weight. - [mix mob.battery_bench_android](Mix.Tasks.Mob.BatteryBenchAndroid.md): Builds a benchmark APK, deploys it, and measures battery drain over time. - [mix mob.battery_bench_ios](Mix.Tasks.Mob.BatteryBenchIos.md): Builds a benchmark app, deploys it to a physical iPhone/iPad, and measures battery drain over time. - [mix mob.cache](Mix.Tasks.Mob.Cache.md): Inspects every cache `mix mob.*` writes to outside the project tree, and (with `--clear`) deletes them. Distinct from `mix clean` (build artifacts in `_build/`) and `mix deps.clean` (deps in `deps/`) — this targets caches in your home directory that survive across projects. - [mix mob.connect](Mix.Tasks.Mob.Connect.md): Discovers connected Android and iOS devices, sets up USB tunnels, restarts the app on each device, waits for Erlang nodes to come online, then drops into an IEx session connected to all of them. - [mix mob.deploy](Mix.Tasks.Mob.Deploy.md): Compiles the project then pushes BEAM files to all connected Android devices and iOS simulators. - [mix mob.devices](Mix.Tasks.Mob.Devices.md): Scans for connected Android devices (via adb) and iOS simulators/physical devices (via xcrun simctl / ideviceinfo) and prints their status. - [mix mob.doctor](Mix.Tasks.Mob.Doctor.md): Checks your environment, project configuration, OTP caches, and connected devices, reporting any issues with specific fix instructions. - [mix mob.emulators](Mix.Tasks.Mob.Emulators.md): Manage virtual devices: Android emulators (AVDs) and iOS simulators. - [mix mob.enable](Mix.Tasks.Mob.Enable.md): Enables one or more optional Mob features by patching `mix.exs`, manifest files, and generating any required source files. - [mix mob.gen.live_screen](Mix.Tasks.Mob.Gen.LiveScreen.md): Generates a paired `Mob.Screen` and Phoenix `LiveView` for LiveView mode apps. - [mix mob.icon](Mix.Tasks.Mob.Icon.md): Generates platform icons for the current Mob project. - [mix mob.install](Mix.Tasks.Mob.Install.md): Runs first-time setup for a Mob project generated by `mix mob.new`. - [mix mob.provision](Mix.Tasks.Mob.Provision.md): Registers your app's bundle ID with Apple and downloads an iOS provisioning profile. - [mix mob.publish](Mix.Tasks.Mob.Publish.md): Uploads a release-signed artifact to the platform's app store. - [mix mob.push](Mix.Tasks.Mob.Push.md): Compiles the project and hot-pushes updated BEAM modules to all running Android and iOS devices — no app restart. - [mix mob.release](Mix.Tasks.Mob.Release.md): Builds a release-signed artifact ready to upload to the app store. - [mix mob.republish](Mix.Tasks.Mob.Republish.md): Convenience wrapper around the per-release flow. Bumps the platform's build number, rebuilds the release artifact, and uploads to the store. - [mix mob.routes](Mix.Tasks.Mob.Routes.md): Walks all `lib/**/*.ex` files and checks that every module passed to `push_screen/2`, `reset_to/2`, or `pop_to/2` resolves to a loadable module. - [mix mob.security_scan](Mix.Tasks.Mob.SecurityScan.md): Audits the project for known vulnerabilities and unsafe code across every surface a Mob app actually ships - [mix mob.security_scan.log](Mix.Tasks.Mob.SecurityScan.Log.md): Scheduled-run helper for the security scan. Designed to be invoked by cron, GitHub Actions, or any other recurring trigger. - [mix mob.server](Mix.Tasks.Mob.Server.md): Starts the Mob dev server and opens it in the browser. - [mix mob.setup.google_play](Mix.Tasks.Mob.Setup.GooglePlay.md): Interactive wizard that automates the Google Cloud steps required before `mix mob.publish --android` can work. - [mix mob.snapshot_loaded](Mix.Tasks.Mob.SnapshotLoaded.md): Asks a connected device's BEAM what modules it has loaded right now. In interactive mode (Mob's default), a module is loaded only when something calls into it — so the loaded set after a real user session is the empirical "actually used" set. - [mix mob.trace_otp](Mix.Tasks.Mob.TraceOtp.md): Runs `MobDev.OtpTrace.Harness` under full call tracing and reports the runtime modules + MFAs actually exercised. - [mix mob.verify_strip](Mix.Tasks.Mob.VerifyStrip.md): Boot-safety verification for stripped Mob app builds. - [mix mob.watch](Mix.Tasks.Mob.Watch.md): Watches `lib/` for source changes and automatically compiles + hot-pushes updated modules to all running Android and iOS devices. - [mix mob.watch_stop](Mix.Tasks.Mob.WatchStop.md): Stops a running `mix mob.watch` process.