Reloc Icon

Reloc

On-Device Virtual Accessory GPS Location Simulator for iPhone & iPad

Built with Swift & Objective-C · 6 Languages (English, Simplified/Traditional Chinese, Japanese, Korean, Arabic) · Accessory-Level Location Injection via Native Virtual Accessory

中文 · English · 日本語 · العربية

--- ## Overview **Reloc** is a standalone, accessory-level GPS location simulator running natively on iPhone and iPad. Using the system `CoreAccessories` framework, Reloc creates a local virtual accessory connection and iAP2 endpoint directly on-device, completes iAP2 link synchronization and MFi-v3 authentication, and streams NMEA-0183 (`$GPGGA` / `$GPRMC`) sentences so iOS accepts live coordinates as a standard external GPS accessory. **No physical accessory, no PC/Mac, no device pairing file, no loopback proxy/VPN, and no Wi-Fi required** — location injection works completely standalone even over cellular data. > **Project Status**: Core feature development for Reloc is essentially complete. No major new features are planned going forward; updates will be limited to essential bug fixes and system compatibility maintenance as needed. --- ## Key Features | Module | Capabilities | | :--- | :--- | | **Fixed Pin Location** | Tap-to-pick on map, live viewport-scoped search suggestions (Apple `MKLocalSearch` + OpenStreetMap Nominatim fallback), manual WGS-84 / GCJ-02 coordinate & altitude entry, automatic real terrain elevation lookup, multi-tier reverse geocoding fallback, distance-from-real-GPS readout with >15 km warning, and hot-swapping target pins during an active session | | **Route Simulation** | Supports **Road Routing** (multi-waypoint road snapping with long-press drag adjustment), **Freehand Drawing** (single-finger track/park loop drawing with automatic smooth loop closure), and **GPX Import/Export** (GPX 1.0/1.1), plus **Mid-Route Start** (drag start progress slider to launch anywhere along a route); includes 4 presets (Walk / Run / Cycle / Drive), live speed control with **pace (`min/km`) display**, realistic pace fluctuation & corner deceleration, optional **brief traffic-light/rest stops**, Single / Round Trip / Closed Loop modes, and **auto-stop by target distance or lap count** | | **Virtual Joystick** | Dedicated **360° floating virtual joystick** free-roam mode with real-time steering, 4 speed presets plus continuous speed adjustment, and **heading-locked auto-cruise** (continues moving steadily in the locked direction even in the background) | | **Multi-Source Maps & Datum** | Defaults to native **Apple Maps (`MapKit`)** with accurate Mainland China polygon GCJ-02 ↔ WGS-84 bidirectional correction (zero shift in HK/MO/TW and overseas); includes API-key-free pure WGS-84 tile maps (**Esri Global Street / OpenStreetMap / Esri Global Satellite**); optional ±0.6 m natural micro-jitter and toggleable Dynamic Island / status bar background indicator | | **On-Device Channel & Anti-Snapback** | Automatic exponential-backoff reconnection on local virtual accessory disconnects; **1-Tap Refresh Location Services** (floating PiP countdown with Auto 7s/18s or custom 7s/15s/30s); built-in safe anti-snapback proxy rules for Surge / Shadowrocket / Loon / Clash / Quantumult X (blocks only `gs-loc`, keeping Apple Maps & search intact) | | **Long-Running Background Keep-Alive** | Pure native background location mode (no silent audio conflicts or extra power drain), event-driven low-wakeup loop, monotonic clocks immune to wall-clock adjustments, and automatic recovery from transient disconnects or unexpected unsubscriptions | | **Shortcuts & Automation** | 4 native iOS **Apple Shortcuts (App Intents)**: **Start Virtual Location**, **Start Saved Route**, **Start Location at Coordinates** (WGS-84 / GCJ-02), and **Stop Virtual Location** (all with optional PiP refresh guide toggle); also supports `reloc://start`, `reloc://route`, `reloc://favorite`, and `reloc://stop` URL schemes | | **Data & Diagnostics** | Saved places with **group tags, keyword search, and full editing (coordinates / altitude / notes)**; **JSON full-library backup/migration with deduplicated merge import**; 6 built-in UI languages (EN / zh-Hans / zh-Hant / JA / KO / AR with full RTL layout); live `CoreLocation` telemetry dashboard and protocol logs | --- ## Comparison with Other Location Solutions Common standalone, non-jailbreak iOS location tools fall into three main technical approaches: **On-Device Virtual Accessory (Reloc)**, **MitM Network-Location Rewriting (MitM-based Wloc)**, and **Developer Location Simulation (RoamControl, etc.)**. They differ fundamentally in injection layer, prerequisites, system source flags, and policy compatibility: | Dimension | Reloc (Virtual Accessory) | MitM-Based Wloc (Network Rewriting) | RoamControl (Developer Simulation) | | :--- | :--- | :--- | :--- | | **Underlying Mechanism** | Creates a local virtual accessory and iAP2 endpoint via `CoreAccessories`, completes MFi-v3 authentication, and streams NMEA-0183 (`$GPGGA` / `$GPRMC`) | Decrypts `gs-loc` (`/clls/wloc`) over HTTPS via a proxy module or local Packet Tunnel (MitM) and rewrites returned Wi-Fi / cell-tower coordinates | Uses a `LocalDevVPN` loopback tunnel and device pairing to invoke iOS's developer location-simulation service (same path as Xcode `Simulate Location`) | | **Prerequisites** | Signed app install only; **no PC/Mac, pairing file, VPN/loopback proxy, or CA certificate required**; works standalone over cellular | Requires a third-party proxy app (Surge / Shadowrocket / Loon / Quantumult X, etc.) or built-in Packet Tunnel, plus **installing and fully trusting a custom root CA certificate** | Requires installing and connecting **`LocalDevVPN`** and completing device pairing (some OS versions require a computer for initial pairing) | | **VPN Slot Usage** | **None** (no proxy needed within 15 km; optional long-distance anti-snapback rules reuse your existing proxy) | **Occupied** (relies on a proxy app or Packet Tunnel to intercept traffic) | **Occupied** (requires keeping the `LocalDevVPN` tunnel active, making it hard to coexist directly with other proxies) | | **`CoreLocation` Source Flags** | `isProducedByAccessory = true`
`isSimulatedBySoftware = false` (standard external GPS accessory) | `isProducedByAccessory = false`
`isSimulatedBySoftware = false` (regular network location) | `isProducedByAccessory = false`
`isSimulatedBySoftware = true` (explicitly flagged as software-simulated) | | **Trust Asset Version `1014` Impact** | **Unaffected** (no HTTPS MitM decryption; optional anti-snapback rules only `REJECT` requests) | **Broken on Trust Asset Version `1014`; works on earlier versions** | **Unaffected** (does not rely on `gs-loc` MitM decryption) | | **Main Limitations** | Requires sideloading/signing; distances >15 km are subject to `CLNmeaScreener` (requires anti-snapback rules or disabling Wi-Fi / Airplane Mode); background execution subject to Jetsam | **MitM fails on Trust Asset Version `1014`**; persistent `locationd` caches on newer iOS builds often require Airplane Mode or a reboot to clear | Requires maintaining device pairing state and the `LocalDevVPN` tunnel; carries the system-level `isSimulatedBySoftware = true` flag | --- ## System Compatibility | Device / OS | Status | Notes | | :--- | :---: | :--- | | **iPhone · iOS 16.0+** | Supported | Verified on non-jailbroken physical devices running iOS 16.0 and later | | **iPad · iPadOS 16.0+** | Supported | Verified on physical Wi-Fi and Cellular iPads running iPadOS 16.0 and later | > The local virtual accessory channel requires valid **MFi-v3** credentials to pass system accessory authentication. --- ## Usage 1. Open Reloc. In the **Location** tab, pick a spot on the map, search by address, or enter WGS-84 coordinates manually (terrain elevation is fetched automatically and can also be overridden), then tap **Start Location**. 2. If the system location does not switch immediately, tap **1-Tap Refresh Location Services (PiP Guide)** on the home card and follow the floating PiP prompt: toggle system **Location Services** OFF, wait 7 seconds, and turn it back ON. 3. Once the status card shows **Accessory GPS Active**, you can switch to any other app. 4. Tap **Stop & Restore** when finished; if iOS still caches the previous simulated position, follow the guided restore refresh flow to return to real GPS. > Protocol handshake and ACK logs only confirm that packets reached the virtual accessory channel — always verify actual system adoption via the home card status or the live `CoreLocation` coordinates and `isProducedByAccessory` flag in the **Diagnostics** tab. > > **Long-Distance Notice (>15 km)**: Local pins and routes within 15 km work smoothly with normal Wi-Fi and cellular enabled. For cross-city or cross-country simulation (>15 km from your real location), configure the **[Anti-Snapback Proxy Rules](#anti-snapback-proxy-rules)** below (blocks `gs-loc` while staying online), or enable Airplane Mode and turn Wi-Fi completely OFF in **Settings → Wi-Fi** to avoid `CLNmeaScreener` Wi-Fi/cell snapback. --- ## Anti-Snapback Proxy Rules When simulating coordinates **>15 km** away from your real position (cross-city / cross-country), iOS `locationd` queries `gs-loc.apple.com` and `gs-loc-cn.apple.com` to cross-check nearby Wi-Fi networks and cell towers, which can cause `CLNmeaScreener` to reject incoming NMEA, freeze dead reckoning, or snap back to your real location. Rejecting (`REJECT`) only these two location-verification domains in a proxy app significantly improves long-distance and long-running background stability **while keeping internet connectivity active without Airplane Mode**. You can copy or export ready-made module/plugin files directly inside Reloc under **Settings → Anti-Snapback Proxy Rules** (or via the **Proxy Rules** button on the >15 km warning banner), or add the rules below manually: **Surge (`.sgmodule`) / Shadowrocket (`.module`) / Loon (`.plugin`)** ```ini #!name=Reloc Anti-Snapback #!desc=Block Apple Wi-Fi/Cell location verification domains (gs-loc) to stabilize long-distance virtual GPS without breaking Apple Maps. [Rule] DOMAIN,gs-loc.apple.com,REJECT DOMAIN,gs-loc-cn.apple.com,REJECT ``` **Clash / Stash / Mihomo** ```yaml rules: - DOMAIN,gs-loc.apple.com,REJECT - DOMAIN,gs-loc-cn.apple.com,REJECT ``` **Quantumult X** ```ini [filter_local] host, gs-loc.apple.com, reject host, gs-loc-cn.apple.com, reject ``` > **Important**: Block **only** `gs-loc.apple.com` and `gs-loc-cn.apple.com`. **Do NOT** wildcard-block `ls.apple.com`, or Apple Maps tiles, place search, and road routing will break. After enabling the rules, run one **1-Tap Refresh Location Services** cycle to flush any stale system cache. --- ## Shortcuts Reloc provides 4 native iOS **Apple Shortcuts (App Intents)**, all supporting an optional "Show PiP Refresh Guide" toggle as well as `reloc://` URL schemes: | Action | Description | | :--- | :--- | | **Start Virtual Location** | Pick a saved favorite (or bind one) → start virtual accessory GPS → optionally launch the PiP refresh timer and open Location Services to flush cache (also outputs `prefs:root=Privacy&path=LOCATION`) | | **Start Saved Route** | Directly load and start a saved trajectory route, with optional PiP refresh guide and jump to Location Services | | **Start Location at Coordinates** | Pass custom latitude/longitude (WGS-84 or GCJ-02) and altitude directly to start virtual GPS — ideal for NFC tags and automations | | **Stop Virtual Location** | Disconnect the virtual accessory channel → optionally launch the PiP restore countdown and open Location Services to clear residual cache and return quickly to real GPS | > Setting Reloc's Location permission to **Always** in iOS Settings is recommended for best long-term background stability when switching apps or locking the screen. --- ## Building from Source ### Requirements - macOS with Xcode - [XcodeGen](https://github.com/yonaskolb/XcodeGen) (`brew install xcodegen`) The project is written in pure Swift + Objective-C with no Rust toolchain or external bridge libraries required. ### 1. Prepare MFi-v3 Credentials Obtain valid MFi-v3 credentials and place them at the following local paths (covered by `.gitignore` — do not commit them): - `Reloc/Resources/MFi/certificate.p7b` - `Reloc/Resources/MFi/identity.pk8` ### 2. Generate Project & Build ```bash xcodegen generate xcodebuild build \ -project Reloc.xcodeproj \ -scheme Reloc \ -configuration Release \ -sdk iphoneos \ -derivedDataPath build/DerivedData \ CODE_SIGNING_ALLOWED=NO ``` ### 3. Package Unsigned IPA (Optional) ```bash rm -rf build/Payload && mkdir -p build/Payload ditto build/DerivedData/Build/Products/Release-iphoneos/Reloc.app build/Payload/Reloc.app (cd build && zip -qr Reloc.ipa Payload) ``` Configure your own signing identity in Xcode to install directly, or sign `build/Reloc.ipa` with your preferred signing tool. The Bundle ID is `dev.reloc.ios` and display name is `Reloc`. --- ## FAQ
1. Why doesn't the system location switch or restore immediately after starting/stopping? Even after NMEA reaches `locationd`, iOS applies source screening and location caching: - **Not switching after Start**: Tap **1-Tap Refresh Location Services (PiP Guide)** on the home card, turn system Location Services OFF for 7 seconds as guided, then turn it back ON to force iOS onto the accessory GPS source. - **Stuck at old position after Stop**: Reloc releases the virtual accessory endpoint and restores internal positioning when stopped; if weak indoor signal causes iOS to retain the previous cache, run the guided restore refresh flow.
2. Protocol logs show successful handshake / ACK, yet the map position hasn't changed? iAP2 handshake and NMEA ACK only confirm that sentences were delivered to the local virtual accessory channel — not that `locationd` has selected it as the active location provider. Always check the home status card and the live `CoreLocation` readout (`isProducedByAccessory = true`) in the **Diagnostics** tab, and perform a Location Services refresh when needed.
3. Why does default Apple Maps display "Amap (高德地图)" in Mainland China? Due to Mainland China mapping regulations, native iOS `MapKit` automatically renders Amap basemaps there. For pure international WGS-84 tiles without Amap branding, switch to **Global Street (Esri) / OpenStreetMap / Global Satellite** via the map layer button or **Settings** (no API key required).
4. Why does route simulation not start moving, stall, or snap back mid-route? This is usually caused by one of two system behaviors: 1. **Waiting for initial start lock**: To avoid advancing along a route before iOS switches to the accessory source, Reloc streams high-rate NMEA at the start point until `CoreLocation` confirms `isProducedByAccessory = true` within `< 25 m`. If it stays on "Waiting for start point lock…", run a Location Services refresh first. 2. **iOS `CLNmeaScreener` long-distance screening**: `locationd` continuously compares accessory NMEA against nearby **Wi-Fi (~15 km threshold)** and **cellular towers / LAC (~1.4 km – 149 km threshold)**: - **Within 15 km**: Smooth continuous movement works with normal Wi-Fi and cellular enabled. - **Beyond 15 km**: Once nearby Wi-Fi or cell data conflicts with the simulated coordinates, `CLNmeaScreener` rejects subsequent moving updates, causing `@ClxADL` dead-reckoning freeze or snapback (Reloc automatically pauses in place until lock is regained). **Solution**: For continuous routes **>15 km** from your real position, enable **[Anti-Snapback Proxy Rules](#anti-snapback-proxy-rules)** (`REJECT` `gs-loc.apple.com` and `gs-loc-cn.apple.com` in Surge / Shadowrocket / Loon / Clash / Quantumult X while staying online), or enable **Airplane Mode** and turn Wi-Fi completely OFF in **Settings → Wi-Fi** (turning off from Control Center still scans in the background).
5. Why doesn't a long-distance (cross-city / cross-country) location take effect even after refreshing? The default **7-second countdown** in the PiP guide is tuned for nearby switches — **do not stick strictly to 7 seconds for distant locations**: - On large coordinate jumps, iOS `locationd` holds its fused internal GNSS, Wi-Fi, and cellular cache longer; turning Location Services back on after only 7 seconds may let the old cache survive and reject the accessory fix. - **Solution**: Turn system **Location Services** OFF again and wait longer (**15–30 seconds**, or up to **45–60 seconds** if needed; you can also set the PiP refresh timer in **Settings** to Auto 7s/18s or 15s/30s) before re-enabling. If local networks still interfere, enable **[Anti-Snapback Proxy Rules](#anti-snapback-proxy-rules)** or turn Wi-Fi completely OFF in **Settings → Wi-Fi** / enable Airplane Mode.
6. Why can't Reloc run indefinitely in the background (session may drop after a long period)? Reloc's virtual accessory channel runs inside the app process and is subject to non-jailbroken iOS background lifecycle limits (unlike a jailbroken system daemon): 1. **Memory reclamation (Jetsam)**: Using heavy foreground apps (Camera, 3D games, video editors) may cause iOS to terminate background apps; once Reloc is terminated, the virtual accessory disconnects and iOS reverts to real GPS. 2. **Location permission & sleep policies**: If permission is not set to **Always**, or **Low Power Mode** / deep lock-screen sleep is active, RunningBoard / CoreLocation may suspend background location execution. 3. **Periodic background network re-checks**: Over long sessions, `locationd` periodically cross-checks position against Wi-Fi and cell towers, which can trigger long-distance snapback. **Tips for longer stability**: - Set Reloc's Location permission to **Always** with **Precise Location** enabled; - For >15 km sessions, enable **[Anti-Snapback Proxy Rules](#anti-snapback-proxy-rules)** (block `gs-loc.apple.com` and `gs-loc-cn.apple.com`); - Disable **Low Power Mode** and minimize switching to memory-heavy apps; - Enable **Micro-Jitter (±0.6m GPS Drift)** in **Settings** and raise the NMEA interval to **2.0–3.0 s** to reduce background CPU wakeups and battery use; - If iOS ever reclaims the process, reopen Reloc and tap **Resume** on the home banner to pick up where you left off.
7. Why does a far-away static fix still occasionally log dead_reckoning_screening_block and drop even with gs-loc proxy rules enabled? `dead_reckoning_screening_block` is **not** an IMU / motion-sensor check. It is Reloc's detector for `CLNmeaScreener` rejecting accessory NMEA: `locationd`'s `@ClxADL` dead-reckoning propagator coasts on the last accepted fix for ~10–30 seconds while `verticalAccuracy` inflates monotonically (`>= 20 m`), then falls back to real GPS. **Both static pins and route simulations go through the exact same >15 km `CLNmeaScreener` check.** Blocking `gs-loc` stops `locationd` from fetching new network tiles, but three offline/system paths can still trigger screening on cross-continent targets: 1. **On-device cached Wi-Fi & Cell tiles**: `locationd` persistently caches nearby Wi-Fi BSSIDs and cell/LAC tiles around places you visit daily (home/office) and can match them offline. 2. **System daemon bypassing proxy**: Because `locationd` is a system daemon, requests can bypass a proxy app if system-wide traffic capture is not active. 3. **Offline internal GNSS**: Near windows or outdoors, modern iPhone dual-frequency GNSS can obtain a real satellite fix with zero network access and conflict with far-away NMEA. **Most reliable setup**: - **Turn Wi-Fi completely OFF in Settings → Wi-Fi** (toggling Wi-Fi in Control Center only disconnects the current network while keeping background Wi-Fi scanning active); - For maximum cross-continent stability, combine **Airplane Mode + Wi-Fi OFF in Settings** indoors away from strong satellite reception; if the cache is especially stubborn, turn Location Services OFF, reboot the iPhone once, then launch Reloc and turn Location Services back ON.
8. Signing or importing the IPA fails with corruption or Bundle ID mismatch (e.g. does not match "Reloc.i")? Downloading `.ipa` files from GitHub Releases directly through **iOS Safari** intermittently produces truncated or corrupted archives on certain iOS versions, causing AltStore, SideStore, LiveContainer, or other signers to report a corrupted package or Bundle ID mismatch. - **Solution**: Avoid downloading the IPA directly with iOS Safari — download it using **Chrome, a desktop browser, or a dedicated download manager**, verify the file is intact, and then import/sign again.
9. Why does "1-Tap Refresh" open the main Settings page instead of Location Services, and can it toggle automatically? - **Automatic toggling is not possible**: Non-jailbroken iOS strictly prohibits third-party apps from changing the system **Location Services** master switch, so manual toggling is still required to flush stubborn caches. - **Sub-page deep-link restriction**: Starting with iOS 18+, Apple restricts third-party apps from opening `App-Prefs:` / `prefs:` sub-menu URLs directly, so in-app buttons can only open Settings. - **One-step jump workaround**: Use Reloc's built-in **Apple Shortcuts** (or copy `prefs:root=Privacy&path=LOCATION` from **Settings → Shortcuts**) and chain Shortcuts' native **Open URL** action to jump straight to **Privacy & Security → Location Services**.
10. Where do I get MFi-v3 credentials? Why is there no Pairing / Device tab anymore? Does cellular data work? - **Pre-built IPA for end users**: Ready-to-sign unsigned IPAs are published on GitHub Releases — you do not need to source MFi credentials yourself unless compiling from source (developers may apply for MFi-v3 credentials via Apple). - **No pairing or VPN since v1.0.3**: Reloc switched to the on-device virtual accessory architecture with three tabs (**Location / Settings / Diagnostics**). **No pairing files (`.plist` / `.rppairing`), PC/Mac, LocalDevVPN, or loopback tunnel is needed.** - **Full cellular support**: Works standalone over 4G/5G cellular data with no Wi-Fi required.
11. How do I hide the blue status bar / Dynamic Island location pill? Why is there no "Background App Refresh" toggle in iOS Settings? - **Hide Dynamic Island / blue pill**: First set Reloc's Location permission to **Always** in iOS **Settings → Privacy & Security → Location Services → Reloc**, then turn OFF **Dynamic Island Indicator** inside Reloc's **Settings** tab (iOS forces the blue indicator whenever permission is only "While Using"). - **No "Background App Refresh" toggle is expected**: Reloc runs on native iOS **background location mode (`UIBackgroundModes: location`)**, not Background App Refresh. Keeping Location permission set to **Always** is all that is required.
12. Importing GPX or JSON backups in LiveContainer or via "Share to Reloc" does nothing? - The latest release replaces SwiftUI `.fileImporter` with native UIKit `UIDocumentPickerViewController` (copy mode), disables in-place document access (`LSSupportsOpeningDocumentsInPlace = false`), registers `.gpx` / `.xml` / `.json` document types, and auto-detects file format by extension and header bytes. Both in-app picking and sharing from Files, WeChat, or AirDrop copy files cleanly into the app sandbox and switch straight to the Map tab for GPX routes. - If you experienced greyed-out files or unresponsive imports in an older build or inside LiveContainer, update to the latest IPA, and stop any active route simulation before importing a new GPX route.
13. Are iOS 15 or jailbroken / TrollStore devices supported? Reloc requires **iOS / iPadOS 16.0 or later** and does not support iOS 15 due to missing system APIs and SwiftUI / AppIntents capabilities. Jailbroken or TrollStore iOS 15 users have dedicated system-level location tools available for that version.
14. Why doesn't Reloc work in certain third-party apps, or why was my issue closed without response? Reloc is strictly intended for accessory location protocol research, development debugging, and standard testing. **We do not support or adapt to check-in/attendance scenarios, risk-control or policy bypasses, or any use violating applicable rules or third-party terms — related inquiries or issues will not be handled and will be closed directly.** When reporting a genuine protocol or app bug, please read this README and the FAQ first and include your device model, iOS version, and protocol logs.
--- ## Disclaimer & License > **Disclaimer**: This project is strictly intended for accessory location protocol research, application debugging, and automated testing. Users are solely responsible for complying with applicable local laws, regulations, and the terms of service of any target applications. Licensed under the **GNU Affero General Public License v3.0 (`AGPL-3.0-only`)**. See [LICENSE](./LICENSE) for full terms. Any modified version distributed or offered as a network service must publish its complete corresponding source code under AGPL-3.0.