For developers and QA
How to test geofences on a real iPhone
Updated · By the Geovo team
To test a geofence on a real iPhone without walking to it, simulate the location: put the iPhone just outside the region, then move it inside and wait for the entry event, then back out for the exit. Xcode can do this for your app while it runs from Xcode. Geovo does it for any build, including TestFlight and App Store builds, from a Mac or Windows PC or on the iPhone itself, with saved points and routes that cross the boundary at a realistic pace.
Why test geofences on hardware
Geofences (Apple calls them condition monitoring, or region monitoring) are handled by iOS, not your app. The system watches your regions and wakes or relaunches the app when the user enters or leaves one. That behaviour, plus permission prompts and background limits, is exactly what the Simulator and unit tests don't show. Apple's documentation notes that if an iOS app isn't running when a condition is satisfied, the system tries to launch it, and that monitoring only starts after the user unlocks the device following a reboot (Apple: monitoring geographic regions).
A test plan that works
- Save your test points. For each region, save a point well outside it and one well inside it as favorites in Geovo. "Well" matters: keep the points comfortably beyond the radius so GPS accuracy doesn't blur the result.
- Start outside. Teleport to the outside point and give the app time to register its conditions.
- Cross the boundary. Play a walking or driving route from outside to inside, or teleport straight to the inside point. Routes are closer to real life; teleports are faster for smoke tests.
- Check the exit. Move back out the same way.
- Repeat in the background and after a force-quit. This is where most geofence bugs live: the app must recreate its monitor when iOS relaunches it.
- Repeat with different permissions: Always and While Using, and Precise Location on and off.
Make runs repeatable
- GPX and KML: import the same route file every run, or export a route you drew and commit it to your repo. Route formats explained.
- Loop and back-and-forth: let a route cross a boundary again and again for soak tests.
- Schedules: start a teleport or route at a set time while Geovo is open.
- Session track export: save exactly what was sent to the iPhone, with times, to attach to a bug report.
| Option | Real device | Any build | Notes |
|---|---|---|---|
| iOS Simulator | No | Debug builds | Fast for logic; doesn't show real background and relaunch behaviour |
| Xcode Simulate Location | Yes | Only while running from Xcode | Preset cities or GPX waypoints; Mac only |
| Geovo | Yes | Yes, including TestFlight and App Store builds | Map, saved points, routes at real speeds, GPX/KML; Mac, Windows or on the iPhone |
| Field testing | Yes | Yes | The final check, but slow and hard to repeat |
Core Location details worth knowing
- 20 conditions per app. Core Location stops any single app from monitoring more than 20 conditions at once (Apple). If your app rotates regions as the user moves, test the rotation by playing a long route.
- CLMonitor is the newer API (iOS 17+) for conditions, alongside the older region monitoring calls (Apple: CLMonitor).
- Simulated locations are detectable. Since iOS 15 an app can check whether a location was simulated by software (CLLocationSourceInformation). If your app rejects simulated locations outside debugging, test both paths deliberately; Geovo doesn't hide simulation.
- GPS only. Geovo changes the GPS position, not the IP address, so server-side geo-IP logic needs your backend's own test overrides.
Set up a test iPhone
- Download Geovo on a Mac or Windows PC (Windows needs iTunes from apple.com for Apple's driver).
- Plug in the test iPhone, tap Trust and turn on Developer Mode.
- Save your test points, then teleport or play a route.
- Optional: install the Geovo iPhone app so testers can run the same checks unplugged, on Wi-Fi or cellular.
Coordinates never leave your devices. Every feature is free for 30 minutes a day; for a release cycle, Pro is $5.99/week or $24.99 for 3 months. See pricing.
Frequently asked questions
- How do I trigger a geofence on a real iPhone without moving?
- Simulate the location: start outside the region, then teleport or play a route inside it. Geovo does this for any build from a Mac or Windows PC; Xcode does it while your app runs from Xcode.
- Does a teleport trigger region entry?
- It changes the location iOS reports, which is what region monitoring watches. A route across the boundary is closer to real movement, so test both.
- Can I test geofences in a TestFlight build?
- Yes. Geovo sets the location for the whole iPhone, so TestFlight and App Store builds see it too.
- How many geofences can an iOS app monitor?
- Apple's Core Location documentation says one app can monitor at most 20 conditions at a time.
- Can my app tell the location is simulated?
- Yes, since iOS 15 through CLLocationSourceInformation. Test both paths if your app checks it.
Try Geovo free
30 minutes every day, every feature. Mac and Windows.