Skip to content

sergiiz/wifi-radar-ios

Repository files navigation

Wi-Fi Speed Radar for iOS

Wi-Fi Speed Radar iOS feature graphic

Wi-Fi Speed Radar is an iOS app for continuous network measurements with live, mode-specific history charts.

This repository is intentionally independent from Android implementation details. Android and iOS codebases evolve separately. You can also check the Android app here: wifi-radar-android. Both repositories are my experiments with AI coding agents, built in my free time for educational purposes only.

Features

  • Download speed mode (Mbps)
  • Upload speed mode (Mbps)
  • Ping mode (ms)
  • Live rolling chart for the selected mode
  • Network-aware display state (Wi-Fi, mobile data, disconnected)
  • About screen with contact and privacy policy links

Screenshots

Screenshot 1 Screenshot 2 Screenshot 3
Wi-Fi Speed Radar iOS screenshot download Wi-Fi Speed Radar iOS screenshot upload Wi-Fi Speed Radar iOS screenshot ping

App Store

Stack

  • SwiftUI
  • Swift Charts
  • URLSession async/await
  • BSD sockets (IPPROTO_ICMP) for native ping
  • NWPathMonitor
  • XCTest (unit, integration, UI)
  • XcodeGen (project generation)

Networking notes

  • Download and upload tests hit Cloudflare speed endpoints (https://speed.cloudflare.com).
  • Ping uses native ICMP echo requests implemented with sockets.
  • There is currently no HTTP ping fallback in app runtime; UI tests use a synthetic test runtime to avoid flaky network dependencies.

Requirements

  • Xcode 26.3+
  • iOS 17+ target
  • xcodegen installed (brew install xcodegen)

Generate project

xcodegen generate

This creates WiFiRadar.xcodeproj from project.yml.

Build

xcodebuild \
  -project WiFiRadar.xcodeproj \
  -scheme WiFiRadar \
  -destination 'platform=iOS Simulator,name=iPhone 17' \
  -derivedDataPath ./DerivedData \
  build

If iPhone 17 is unavailable locally, switch to any installed iPhone simulator name.

Rebuild + install + launch (Simulator)

./scripts/run-simulator.sh

Notes:

  • This script does a full clean build each run.
  • Default simulator is iPhone 17.
  • You can override with SIMULATOR_NAME or SIMULATOR_UDID.

Test

All tests:

xcodebuild \
  -project WiFiRadar.xcodeproj \
  -scheme WiFiRadar \
  -destination 'platform=iOS Simulator,name=iPhone 17' \
  -derivedDataPath ./DerivedData \
  test

Unit tests only (skips integration class):

xcodebuild \
  -project WiFiRadar.xcodeproj \
  -scheme WiFiRadar \
  -destination 'platform=iOS Simulator,name=iPhone 17' \
  -only-testing:WiFiRadarTests \
  -skip-testing:WiFiRadarTests/PingRunnerIntegrationTests \
  test

UI tests only:

xcodebuild \
  -project WiFiRadar.xcodeproj \
  -scheme WiFiRadar \
  -destination 'platform=iOS Simulator,name=iPhone 17' \
  -only-testing:WiFiRadarUITests/ModeSwitchSmokeUITests \
  test

Integration tests only:

xcodebuild \
  -project WiFiRadar.xcodeproj \
  -scheme WiFiRadar \
  -destination 'platform=iOS Simulator,name=iPhone 17' \
  -only-testing:WiFiRadarTests/PingRunnerIntegrationTests \
  test

Test coverage summary

Unit tests (Tests/Unit)

  • SpeedAlgorithmsTests: RollingSpeedCalculator, display filters, timeout estimator, and SpeedTestViewModel chart-domain calculations.
  • WorkerPolicyTests: DownloadConcurrencyController ramp/downscale behavior and BackoffState retry progression.
  • AppLifecycleTests: SpeedTestViewModel app lifecycle + connectivity transitions with stubbed workers/network monitor.

Integration tests (Tests/Integration)

  • PingRunnerIntegrationTests: end-to-end sampling path for PingSpeedRunner against live network behavior.
  • Includes long-running ping sample/stat collection (testPingRunnerCollectsStableMetrics).
  • Includes optional Wi-Fi -> cellular -> Wi-Fi transition scenario across modes (RUN_NETWORK_TRANSITION_ACCURACY=1).

UI tests (UITests)

  • ModeSwitchSmokeUITests: mode switching and live history/value rendering for Download, Upload, and Ping tabs.
  • Covers no-network placeholder behavior and About sheet interaction contract.
  • Runs via debug UI test runtime (UITestRuntimeFactory) with scripted network sequences.

CI workflows

  • ios-tests.yml runs on push to main and pull_request.
  • It performs a simulator-SDK build (xcodebuild ... -sdk iphonesimulator) without simulator test execution.
  • ios-network-integration.yml is manual (workflow_dispatch) for ping integration runs, and auto-skips when no iPhone simulator is available on the runner.

Privacy policy link used in-app

License

This project is licensed under the MIT License. See LICENSE.

About

An iOS app to measure network performance in real time.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors