Builds native binaries (APK for Android, .app bundle for iOS simulator) for the current Dala project.
Reads paths from dala.exs in the project root. If dala.exs is missing
or paths haven't been configured, prints instructions and exits.
OTP runtimes for Android and iOS are downloaded automatically from GitHub
and cached at ~/.dala/cache/ by DalaDev.OtpDownloader.
dala.exs keys
:dala_dir— dala library repo (native C/ObjC/Swift source):elixir_lib— Elixir stdlib lib dir
Summary
Functions
Returns true when the Android build toolchain looks usable from the given project directory. Three signals must all be present
Builds native binaries for all platforms present in the project.
Runs Android Gradle build if android/ dir exists.
Runs iOS build script if ios/build.sh exists (simulator), or
xcodebuild if targeting a physical iOS device via device: opt.
Returns the UDID of the sole connected physical iOS device, or nil. When exactly one physical device is connected, it can be used automatically. With zero or 2+ physical devices, returns nil.
Returns true when an iOS build is feasible: macOS host with xcrun
installed. Linux/Windows always returns false. Pure of side effects.
When --device <id> is given, narrow platforms to just the platform
the device lives on. Drops Android when the id resolves to an iOS
device (sim or physical), drops iOS otherwise.
Variant that takes an iOS-discovery function so tests (and other
callers that already have the device list in hand) can avoid the
network-bound IOS.list_devices/0 LAN scan.
Returns the OTP directory for the given Android ABI string.
Functions
Returns true when the Android build toolchain looks usable from the given project directory. Three signals must all be present:
adbis on PATH (build needs it to install the APK after Gradle)<project_dir>/android/local.propertiesexists and setssdk.dir- The directory
sdk.dirpoints at exists on disk
Returns false otherwise so the deploy can skip Android cleanly instead of failing late inside Gradle. Pure of side effects.
Builds native binaries for all platforms present in the project.
Runs Android Gradle build if android/ dir exists.
Runs iOS build script if ios/build.sh exists (simulator), or
xcodebuild if targeting a physical iOS device via device: opt.
@spec detect_physical_ios() :: String.t() | nil
Returns the UDID of the sole connected physical iOS device, or nil. When exactly one physical device is connected, it can be used automatically. With zero or 2+ physical devices, returns nil.
@spec ios_toolchain_available?() :: boolean()
Returns true when an iOS build is feasible: macOS host with xcrun
installed. Linux/Windows always returns false. Pure of side effects.
When --device <id> is given, narrow platforms to just the platform
the device lives on. Drops Android when the id resolves to an iOS
device (sim or physical), drops iOS otherwise.
Public so mix dala.deploy can apply the same narrowing before calling
DalaDev.Deployer.deploy_all/1 — otherwise the deployer's per-platform
filter_by_device_id complains "No device matched" against the
irrelevant platform even though the build itself was correctly
targeted.
Returns platforms unchanged when device_id is nil.
@spec narrow_platforms_for_device([atom()], String.t() | nil, (-> [DalaDev.Device.t()])) :: [atom()]
Variant that takes an iOS-discovery function so tests (and other
callers that already have the device list in hand) can avoid the
network-bound IOS.list_devices/0 LAN scan.
The lister is called at most once per invocation; both ios_device?
and the physical-UDID format fallback consume the same result.
Returns the OTP directory for the given Android ABI string.