module MobileLaunch
Overview
Helpers shared by the mobile launch-command builders (adb, simctl). A mobile
entry point's launcher depends on the platform that declared it: Android
entry points launch via adb, iOS ones via xcrun simctl. Each builder
emits for its own platform and skips the rest, so both need the same origin
classification and the same "is this actually launchable?" / shell-quoting
rules — kept here so the two stay in lock-step.
Direct including types
Defined in:
output_builder/mobile_launch.crConstant Summary
-
DEVICE_SHELL_METACHARS =
/[\s&;|<>()$`"'\\*?\[\]{}#!~]/ -
Characters the on-device shell would interpret (word-splitting, control operators, globs, expansions).
&is the important one: an OAuth-style deep linkmyapp://cb?code=x&state=yotherwise backgrounds at&.
Instance Method Summary
-
#device_shell_quote(str : String) : String
adb shell ARGS...runs ARGS through a SECOND shell on the device: the host shell strips one quote layer, leaving raw metacharacters exposed to the device shell. -
#ios_origin?(endpoint : Endpoint) : Bool
An iOS-originated mobile endpoint.
-
#launchable?(url : String) : Bool
App Links / Universal Links from
.well-knownfiles are bare path patterns (/*,/buy/*) bound to a domain that isn't in the URL, so they can't become a concrete launch. - #plural(count : Int32) : String
- #shell_quote(str : String) : String
Instance Method Detail
adb shell ARGS... runs ARGS through a SECOND shell on the device: the
host shell strips one quote layer, leaving raw metacharacters exposed to
the device shell. When a value carries such a character, quote twice so
both shells strip a layer and the device receives the literal value.
Metachar-free values (the common case) keep a single clean quote layer.
An iOS-originated mobile endpoint. The analyzer framework tags each
endpoint with its detector tech (details.technology): the Android
manifest analyzer -> "android", the iOS analyzer -> "ios". The shared App
Links analyzer ("well_known_applinks") emits both platforms, told apart by
the backing file — Android assetlinks.json vs Apple
apple-app-site-association.
App Links / Universal Links from .well-known files are bare path
patterns (/*, /buy/*) bound to a domain that isn't in the URL, so they
can't become a concrete launch. Every real launchable entry point carries
a scheme (myapp://, intent://, content://, https://, mailto:),
none of which start with /.