IOS-Mapper WiFi follows an offline-first layered architecture:
- UI Layer (
Views) - Presentation Layer (
ViewModels) - Service Layer (
Services) - Persistence Layer (
Persistence) - Domain Models (
Models)
AppModel wires global dependencies and shared application state:
NetworkRepositoryLocationServicePermissionServiceExternalScannerServiceWiFiScannerService
Coordinates scan sessions and routes incoming observations to persistence.
Responsibilities:
- Start/stop scan sessions.
- Manage scanner mode (iPhone or external scanner).
- Trigger history refresh and maintain session state.
- Track external scanner status polling in external mode.
Implements scanner HTTP client behavior:
connectAndProbeconfigureRemoteScannerstartScanstopScanpollResults
Also exposes a status snapshot consumed by UI banners and settings screens.
NetworkRepository encapsulates Core Data operations and query patterns for:
- upsert snapshots
- historical fetches
- area comparison
- analytics-ready datasets
- User starts scan from dashboard.
- Service captures iPhone or external scanner data.
- Observations are normalized into
WiFiNetworkSnapshot. - Repository writes to Core Data.
- View models subscribe and update UI.
All user-facing text should be stored in Resources/*/Localizable.strings and accessed through AppStrings.localized(...).
Companion firmware: ESP32-Mapper WiFi