Skip to content

[iOS] Defer cellular telephony initialization in NetworkMonitor - #70

Merged
ladd merged 4 commits into
airbnb:mainfrom
angelaguilar06:aaguilar--defer-telephony-network-monitor
Oct 2, 2026
Merged

ladd merged 4 commits into
airbnb:mainfrom
angelaguilar06:aaguilar--defer-telephony-network-monitor

Conversation

@angelaguilar06

@angelaguilar06 angelaguilar06 commented Oct 2, 2026 •

Copy link
Copy Markdown

Change summary:

Defer CTTelephonyNetworkInfo construction in NetworkMonitor until telemetry reads an observed cellular network path. The cached instance is protected by Mutex for concurrent attribute reads. Network path attributes and cellular radio subtype reporting remain available when applicable.

Context:

An iOS launch trace showed NetworkMonitor constructing CTTelephonyNetworkInfo during app lifecycle setup, before homepage prefetch. CoreTelephony can synchronously contact CommCenter even when the device is on Wi-Fi. Only cellular telemetry needs that work, so non-cellular and not-yet-known paths now avoid it.

How was it tested?

  • Added unit tests confirming pre-path attribute reads do not construct telephony info and cellular-path reads construct it exactly once.
  • Ran xcodebuild test -scheme NautilusTelemetry-Package -destination 'platform=iOS Simulator,id=91CF97E1-3C14-40CF-AA1F-552E2EC7EEF0' locally; full suite passed.
  • Ran xcodebuild test -scheme NautilusTelemetry-Package -destination 'platform=macOS' locally; full suite passed.
  • Previously built the consuming app and captured a sampled iOS Simulator launch trace with no named telephony initialization sample before homepage prefetch. App frames were partially symbolicated, so this trace is supporting evidence rather than a timing claim.

Please review:

This upstream fix can be released before the consuming app updates its package revision.

@angelaguilar06
angelaguilar06 marked this pull request as ready for review October 2, 2026 20:09
Comment thread Sources/NautilusTelemetry/Instrumentation/NetworkMonitor.swift Outdated
@ladd
ladd merged commit b382e60 into airbnb:main Oct 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants