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.cr

Constant 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 link myapp://cb?code=x&state=y otherwise backgrounds at &.

Instance Method Summary

Instance Method Detail

def 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. 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.


[View source]
def ios_origin?(endpoint : Endpoint) : Bool #

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.


[View source]
def launchable?(url : String) : Bool #

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 /.


[View source]
def plural(count : Int32) : String #

[View source]
def shell_quote(str : String) : String #

[View source]