class

Analyzer::Mobile::Ios

Inherits Analyzer < FileHelper < Reference < Object

Parses iOS configuration files to surface mobile app entry points:

  • Info.plist CFBundleURLTypes > CFBundleURLSchemes -> custom schemes
  • *.entitlements com.apple.developer.associated-domains applinks:<domain> -> universal links

Same model as the Android analyzer: one endpoint per URI, method "GET", mobile semantics in protocol. iOS declares no handler in the config (deep links are dispatched by the App/SceneDelegate onOpenURL / application(_:open:)), so via is filled later by the code layer.

Constants

BUILD_VAR_RE = /\$[({]([A-Za-z_][A-Za-z0-9_]*)[)}]/

$(VAR) / ${VAR} build-setting reference.

BUILD_VAR_REF_RE = Regex.union("$(", "${")

Presence-only gate for the same reference syntax. One precompiled Regex.union scan (PCRE2 JIT) replaces the OR-ed String#includes?("$(") / String#includes?("${") pair used to short-circuit substitution/resolution below.

ENUM_CASE_LINE_RE = /^\s*case\s+(.+)$/
ENUM_CASE_NAME_RE = /^([A-Za-z_][A-Za-z0-9_]*)\s*(?:=\s*"([^"]*)")?$/
GENERIC_SCHEMES = Set {"http", "https", "file", "content"}

Generic web/file schemes an app may register without them being a real deep-link surface (a bare http:// / https:// has no host to address). Compared case-insensitively.

HOST_ENUM_SITE_RE = /\.(?:host|scheme)\S*\s*[=!]?=\s*([A-Z][A-Za-z0-9_]*)\.[A-Za-z_][A-Za-z0-9_]*\.rawValue|([A-Z][A-Za-z0-9_]*)\.[A-Za-z_][A-Za-z0-9_]*\.rawValue\s*[=!]?=\s*\S*\.(?:host|scheme)|\[[^\]\n]*\b([A-Z][A-Za-z0-9_]*)\.[A-Za-z_][A-Za-z0-9_]*\.rawValue[^\]\n]*\]\s*\.contains\(\s*\S*\.(?:host|scheme)/

.host/.scheme connected to EnumName.case.rawValue via a comparison (==/!=), an assignment (=), or membership in a [...].contains(...) array literal — the shapes real routers use to test/set a scheme's host against a String-backed enum. Deliberately not a full expression parser: forms that separate the two sides further (e.g. url.host ?? "" == ...) are missed in exchange for not firing on two unrelated statements that merely share a line (a bare .host/.scheme substring next to an unrelated capitalized-enum .rawValue reference elsewhere on the same line).

MAX_BUILD_VAR_EXPANSIONS = 32
MAX_BUILD_VAR_SUBSTITUTION_DEPTH = 8
MAX_BUILD_VAR_VALUES_PER_KEY = 16
MAX_CASES_PER_ENUM = 200
MAX_HOST_ENUMS = 20
MAX_LITERAL_ROUTES = 500
MAX_PBXPROJ_FILES = 10
MAX_XCCONFIG_FILES = 40
PBXPROJ_ASSIGN_RE = /^\s*([A-Za-z_][A-Za-z0-9_]*)\s*=\s*([^;]*)\s*;\s*$/

KEY = value; (project.pbxproj build setting assignment).

URL_DOMAIN_SERVICES = {"applinks:", "appclips:"}

Associated-domain service prefixes that designate a URL entry point.

  • applinks — a tapped https:// URL opens the full app (universal link)
  • appclips — a tapped https:// URL launches the App Clip; same URL mechanism, but a distinct (often less-trusted, friction- reduced) surface that the App Clip target handles via NSUserActivity. App Clip targets ship their own *.entitlements that frequently list domains the main app does NOT (e.g. pocket-casts appclips:pocketcasts.net), so skipping them dropped a real entry point. webcredentials / activitycontinuation are autofill/handoff plumbing, not URL entry points, and stay ignored.
XCCONFIG_ASSIGN_RE = /^\s*([A-Za-z_][A-Za-z0-9_]*)\s*=\s*([^\n]*)$/

KEY = value (xcconfig assignment); the value runs to a trailing comment / end of line.

XCCONFIG_SEARCH_DEPTH = 6

How far up from the Info.plist to look for the project's build settings files, and how many to read.

Class methods

tech_name
Source

Instance methods

analyze
Source
tech

Instance-side view of the same declaration. The per-file rescues live on this base class, which has no way to name the analyzer that is running inside them, so a skipped file could not be attributed to a tech. Deriving it from analyzer_for keeps the name written exactly once.

Source