API Reference Fog of War v#0.1.0

Copy Markdown View Source

Modules

FoW

Short module alias for FogOfWar.

Adds read-only offline navigation to Phoenix LiveView pages. Use via FogOfWar.region/1.

Derives a stable cache key for an authenticated account on one browser device.

Fetches anonymous server-rendered pages and extracts their FoW regions for offline navigation. The result is a route index and gzip payloads that FoW can import into browser storage.

Fetches public HTML and gathers local assets for native bundles.

Creates a standalone native source project from a resolved manifest and prepared bundle. Generation copies the inputs and writes the host project. The generated build script handles native compilation.

An offline Apple WebView needs its startup JavaScript and CSS even when the website cannot answer. This module embeds collected same-origin scripts and styles into the startup document so it can run without fetching those files from the site. Native bundle preparation calls it automatically.

Reads the settings that connect a Phoenix website to its native wrappers. The JSON file specifies the website origin, startup route, extra offline routes and native app identity. Named environments can override those settings for development or deployment.

Turns public route captures into files a native WebView can serve at startup. Android and Apple use different asset loading mechanisms, so each gets its own prepared directory. Use mix fow.bundle.prepare to produce one.

Stages generated files before replacing a project or installed app. Destination checks protect the source tree and other inputs from replacement.

Runs the macOS steps around generation. Use it to locate a generated project, build its .app, or install a finished app for local use. mix fow.desktop runs the full sequence.

Mix Tasks

Install an existing macOS .app and register it with Spotlight.

Compile an already generated desktop project on macOS.

Build a signed release from a generated mobile project, using Mob's signing configuration. Android produces an AAB and iOS produces an IPA.

Capture the public startup document and assets for one WebView platform.

Build and install the macOS wrapper in one step.

Export offline route snapshots without building an app.

Generate desktop source when you want to build separately or customize the host.

Generate an editable Mob project for a Phoenix site.

Install an existing app and register it with Spotlight.

Install an existing artifact on Android or an iOS simulator.

Install an existing macOS .app and register it with Spotlight.

Create .fow.json before building a native app.

Build and deploy a development wrapper to a running device or emulator.