MobDev.OtpDownloader (mob_dev v0.3.37)

Copy Markdown View Source

Downloads and caches pre-built OTP releases from GitHub for Android and iOS simulator.

Artifacts are cached at ~/.mob/cache/ and reused across projects.

Summary

Functions

Returns the cached Android OTP directory path (may not exist yet).

Ensures the Android OTP release is cached. Returns {:ok, path} or {:error, reason}.

Ensures the iOS device OTP release is cached. Returns {:ok, path} or {:error, reason}.

Ensures the iOS simulator OTP release is cached. Returns {:ok, path} or {:error, reason}.

Returns the cached iOS device OTP directory path (may not exist yet).

Returns the cached iOS simulator OTP directory path (may not exist yet).

Functions

android_otp_dir(abi \\ "arm64-v8a")

@spec android_otp_dir(String.t()) :: String.t()

Returns the cached Android OTP directory path (may not exist yet).

ensure_android(abi \\ "arm64-v8a")

@spec ensure_android(String.t()) :: {:ok, String.t()} | {:error, term()}

Ensures the Android OTP release is cached. Returns {:ok, path} or {:error, reason}.

ensure_ios_device()

@spec ensure_ios_device() :: {:ok, String.t()} | {:error, term()}

Ensures the iOS device OTP release is cached. Returns {:ok, path} or {:error, reason}.

ensure_ios_sim()

@spec ensure_ios_sim() :: {:ok, String.t()} | {:error, term()}

Ensures the iOS simulator OTP release is cached. Returns {:ok, path} or {:error, reason}.

ios_device_otp_dir()

@spec ios_device_otp_dir() :: String.t()

Returns the cached iOS device OTP directory path (may not exist yet).

ios_sim_otp_dir()

@spec ios_sim_otp_dir() :: String.t()

Returns the cached iOS simulator OTP directory path (may not exist yet).