DalaDev.DeepLink (dala_dev v0.4.0)

Copy Markdown View Source

Opens URLs and deep links on connected devices.

The device-side counterpart is Dala.Platform.Linking; this module is the dev-machine side — firing myapp://product/42 or an https URL at the screen you're testing without retyping UDIDs.

Summary

Functions

adb argument list that opens a URL on Android.

xcrun argument list that opens a URL on an iOS simulator.

Opens url on matching devices (all connected by default). Returns {label, result} per device.

Validates a deep link / URL. Accepts any scheme (https, custom app schemes like myapp://); rejects strings with no scheme since neither platform can route them.

Types

result()

@type result() :: {:ok, String.t()} | {:error, String.t()}

Functions

android_open_command(serial, url)

@spec android_open_command(String.t(), String.t()) :: [String.t()]

adb argument list that opens a URL on Android.

ios_open_command(udid, url)

@spec ios_open_command(String.t(), String.t()) :: [String.t()]

xcrun argument list that opens a URL on an iOS simulator.

open(url, opts \\ [])

@spec open(
  String.t(),
  keyword()
) :: [{String.t(), result()}]

Opens url on matching devices (all connected by default). Returns {label, result} per device.

Options: :device, plus test seams :devices (explicit device list) and :exec (command executor override).

valid_url?(url)

@spec valid_url?(String.t()) :: boolean()

Validates a deep link / URL. Accepts any scheme (https, custom app schemes like myapp://); rejects strings with no scheme since neither platform can route them.