How reukix/reloc works
Reloc is an iOS/iPadOS app that simulates an accessory GPS by sending location as NMEA through a local virtual accessory. The main workflow is to choose or search for a place, configure a fixed point or route, start a session, and have the accessory session stream updates for iOS to consume; the app also monitors CoreLocation to report whether injection took effect. Distinct branches cover routes and GPX, joystick roaming, favorites, refresh and background support, automation, maps, and diagnostics. Several subsystem details are documented but not shown in source excerpts, so those links are omitted or identified as documented.
Main entry points: RelocViewModel.swift Session coordinator · AccessoryLocationSession.swift Accessory session · MapPickerView.swift Map and location picker · RelocApp.swift App shell
Components 25
App interaction
- App shell
Reloc/UI/RelocApp.swift - Map and location picker
Reloc/UI/MapPickerView.swift - Global tile maps
Reloc/UI/WebMercatorMapView.swift - Configuration
Reloc/UI/ConfigurationView.swift - Proxy rule export
Reloc/UI/AntiSnapbackRulesSheet.swift
Location workflows
- Place search
Reloc/Core/Swift/NominatimSearchClient.swift - Session coordinator
Reloc/Core/Swift/RelocViewModel.swift - Route simulation
Reloc/Core/Swift/TrajectoryEngine.swift - GPX import/export
Reloc/Core/Swift/GPXCodec.swift - Favorites and routes
Reloc/UI/PlacesSheet.swift - Favorite editor
Reloc/UI/FavoriteEditorSheet.swift - Joystick roaming
Reloc/Core/Swift/JoystickDriver.swift
Accessory injection
- Accessory session
Reloc/Core/Swift/AccessoryLocationSession.swift - iAP2 link
Reloc/Core/Swift/IAP2Link.swift - NMEA generation
Reloc/Core/Swift/NMEAGenerator.swift - Virtual accessory transport
Reloc/Core/ObjC/RLVirtualAccessoryTransport.m - MFi signing
Reloc/Core/ObjC/RLMFiSigner.m
Monitoring and support
- CoreLocation monitor
Reloc/Core/Swift/LiveCoreLocationMonitor.swift - Location refresh
Reloc/Core/Swift/LocationRefreshPresenter.swift - Background keep-alive
Reloc/Core/Swift/BackgroundKeepAlive.swift - Shortcuts and URLs
Reloc/Core/Swift/RelocAppIntents.swift - Telemetry and logs
Reloc/UI/ProtocolLogsView.swift
Other components
- User
- Apple Maps and OSM
- iOS CoreLocation
Connections 35
- User → App shell: opens
Reloc/UI/RelocApp.swift - App shell → Map and location picker: presents
Reloc/UI/RelocApp.swift - App shell → Configuration: presents
Reloc/UI/RelocApp.swift - App shell → Telemetry and logs: presents
Reloc/UI/RelocApp.swift - User → Map and location picker: selects location
Reloc/UI/MapPickerView.swift - Map and location picker → Session coordinator: updates
Reloc/UI/MapPickerView.swift - Map and location picker → Place search: searches
Reloc/UI/MapPickerView.swift - Place search → Apple Maps and OSM: queries fallback
Reloc/Core/Swift/NominatimSearchClient.swift - Map and location picker → Global tile maps: renders tiles
Reloc/UI/MapPickerView.swift - Map and location picker → Favorites and routes: opens places
Reloc/UI/MapPickerView.swift - Favorites and routes → Session coordinator: selects saved item
Reloc/UI/PlacesSheet.swift - Favorites and routes → Favorite editor: edits favorite
Reloc/UI/PlacesSheet.swift - User → Favorites and routes: manages saved items
README.md - Session coordinator → GPX import/export: imports and exports
Reloc/Core/Swift/RelocViewModel.swift - Session coordinator → Route simulation: plans route
Reloc/Core/Swift/RelocViewModel.swift - User → Joystick roaming: steers
README.md - Session coordinator → Accessory session: starts session
Reloc/Core/Swift/RelocViewModel.swift - Accessory session → Route simulation: advances route
Reloc/Core/Swift/AccessoryLocationSession.swift - Accessory session → Joystick roaming: gets roaming target
Reloc/Core/Swift/AccessoryLocationSession.swift - Accessory session → NMEA generation: generates sentences
Reloc/Core/Swift/AccessoryLocationSession.swift - Accessory session → iAP2 link: uses link
Reloc/Core/Swift/AccessoryLocationSession.swift - Accessory session → Virtual accessory transport: opens transport
README.md - iAP2 link → Virtual accessory transport: uses transport
README.md - Accessory session → MFi signing: authenticates
README.md - Virtual accessory transport → iOS CoreLocation: sends NMEA
README.md - Session coordinator → CoreLocation monitor: checks injection
Reloc/Core/Swift/RelocViewModel.swift - CoreLocation monitor → Session coordinator: reports status
README.md - Session coordinator → Location refresh: controls refresh
Reloc/Core/Swift/RelocViewModel.swift - Session coordinator → Background keep-alive: coordinates background
Reloc/Core/Swift/RelocViewModel.swift - Shortcuts and URLs → Session coordinator: starts or stops
Reloc/Core/Swift/RelocAppIntents.swift - Configuration → Session coordinator: changes settings
Reloc/UI/ConfigurationView.swift - Configuration → Proxy rule export: presents rules
Reloc/UI/ConfigurationView.swift - Telemetry and logs → Session coordinator: reads events
Reloc/UI/ProtocolLogsView.swift - Telemetry and logs → CoreLocation monitor: shows telemetry
Reloc/UI/ProtocolLogsView.swift - Map and location picker → Apple Maps and OSM: uses MapKit search
README.md