Project generator for the Dala mobile framework. Installs a global mix dala.new command to generate native SwiftUI/Compose apps or LiveView-wrapped mobile projects.
Dual licensed under:
- MIT License (for original Mob New project portions) - see LICENSE
- Apache License 2.0 (for new contributions) - see LICENSE-APACHE
See NOTICE for attribution details.
dala_new is a Mix archive — install it globally, not as a project dependency:
mix archive.install hex dala_newmix dala.new my_app
cd my_app
mix dala.install # first-run setup: download OTP runtime, generate icons, write dala.exs| Option | Description |
|---|---|
--ios |
Generate iOS boilerplate only (skip android/) |
--android |
Generate Android boilerplate only (skip ios/) |
--liveview |
Wrap a Phoenix LiveView app in a Dala WebView (combines with --ios / --android) |
--no-install |
Skip mix deps.get after generation |
--dest DIR |
Create the project in DIR (default: current directory) |
--local |
Use path: deps pointing to local dala/dala_dev repos — see below |
--no-ios |
Alias for --android (skip iOS boilerplate) |
--no-android |
Alias for --ios (skip Android boilerplate) |
mix dala.install, mix dala.deploy, and mix dala.doctor detect the project's
platform set from on-disk layout, so a single-platform project skips the
absent platform's setup automatically (no Android OTP download, no iOS
toolchain check, etc.).
This flag is for Dala framework contributors and library authors testing unpublished changes. It is not intended for app developers — use the standard
mix dala.new my_appinstead.
When working on dala_new itself, build and force-install the archive to pick up your changes:
cd ~/code/dala_new && mix archive.build && mix archive.install $(ls dala_new-*.ez | tail -1) --forceVerify it's active:
mix archive # dala_new should appear with the updated version
mix dala.new --helpIf you are working on Dala itself and want to test your changes end-to-end
before publishing to Hex, pass --local to generate a project that depends on
your local checkouts instead of the published packages:
mix dala.new my_app --localThis generates mix.exs with path: deps:
{:dala, path: "/path/to/dala"},
{:dala_dev, path: "/path/to/dala_dev", only: :dev, runtime: false}It also pre-fills dala.exs with your actual local paths so mix dala.install
skips the path configuration prompts and proceeds straight to OTP download and
icon generation.
Path resolution (in order):
DALA_DIR/DALA_DEV_DIRenvironment variables./dala/./dala_devin the current directory (e.g. running from~/code)../dala/../dala_devrelative to the current directory
# If dala and dala_dev live alongside each other in ~/code:
cd ~/code
mix dala.new my_app --local # auto-detects ~/code/dala and ~/code/dala_dev
# Or set explicitly from anywhere:
DALA_DIR=~/code/dala DALA_DEV_DIR=~/code/dala_dev mix dala.new my_app --localmy_app/
├── mix.exs
├── lib/
│ └── my_app/
│ ├── app.ex # Dala.App entry point
│ └── home_screen.ex # starter screen
├── android/
│ ├── build.gradle
│ └── app/
│ └── src/main/
│ ├── AndroidManifest.xml
│ └── java/com/dala/my_app/MainActivity.java
└── ios/
├── beam_main.m
└── Info.plist
First deploy (builds the native app and installs it):
mix dala.deploy --nativeDay-to-day (hot-pushes changed BEAMs, no native rebuild):
mix dala.deploy # push + restart
mix dala.watch # auto-push on file save
mix dala.connect # open IEx connected to the running device nodecd ~/code/dala_new
mix archive.build # produces dala_new-<version>.ez
mix archive.install dala_new-0.1.27.ez --force
mix archive # verify installTo publish a new version: bump version: in mix.exs, then
mix hex.publish archive.
mix test # unit tests (fast)
mix test --include integration # also runs `mix phx.new` subprocesses (~minute)The integration tests generate real LV projects in tmp dirs to verify the end-to-end output. Worth running locally before publishing a new version.
Templates live at priv/templates/dala.new/, rendered with EEx by
DalaNew.ProjectGenerator. The LiveView path additionally runs mix phx.new
as a subprocess and patches the result via DalaNew.LiveViewPatcher.
Full guide at hexdocs.pm/dala, including Getting Started, screen lifecycle, components, navigation, and live debugging.