Articles · App ExamplesUpdated September 2026

To add geofencing to an app you hand the operating system a circle and let it wake you when somebody crosses it.

To add geofencing to an app you register a centre point, a radius in metres and the crossings you care about, and from then on the operating system does the watching. Your own code runs only when somebody enters or leaves. Here is the limit, at the top where it belongs: iOS lets one app watch 20 regions at a time, Android lets one app watch 100, and the alert arrives in minutes rather than seconds. A national list of stores will never fit, and nothing on the phone will tell you the instant a foot crosses the line. All of this sits on top of adding maps and location, which is a separate job with its own permissions.

This page covers how a region actually fires and how late it can be, the two caps and the one design that survives them, what to do with a crossing once you have it, and when the honest answer is a button instead.

See whether your list fits the caps

The short version

Drawing the circle takes an afternoon, the caps and the lag are what shape the app.

Two numbers decide whether a geofence feature is worth building. How many places you need to watch, because both platforms cap that and neither cap is generous. And how fast the person has to know, because a geofence alert is not instant and was never meant to be.

A feature that needs 400 live places or a two second reaction is not a geofence feature. It is background location tracking, which costs battery, needs a harder permission conversation and is a different build with a different budget.

How a region fires, and how late

You hand over a latitude, a longitude, a radius in metres and whether you want the enter crossing, the exit crossing or both. After that the operating system watches, using whatever positioning is cheap at that moment, and it starts your app to deliver the event even if the app was closed. That is the whole appeal: you get a location trigger mobile app without running GPS all day.

The cheapness is paid for in time. Google's geofencing guide says to expect latency, usually less than 2 minutes and less again when the device has been moving. With background location limits in effect the average is about 2 to 3 minutes. If the device has been sitting still for a long stretch, it can reach about 6 minutes. You can also set a responsiveness value, which trades speed for battery in one line: a five minute setting means the check happens every five minutes, and Google notes that a low value does not guarantee an alert inside that window either.

Radius is the other half of it. Google recommends a minimum radius of 100 to 150 metres, which accounts for the accuracy of typical wifi positioning and cuts power use at the same time. A 30 metre circle around a shop door will fire late, fire twice or not fire at all. If your idea depends on knowing which side of a doorway somebody is standing on, geofencing is the wrong tool and no amount of tuning will rescue it.

Android developers, create and monitor geofences

Both platforms cap how many regions you get

This is the constraint that changes the design, and it is worth knowing before you draw a single circle. Apple is explicit about it: so that all apps can take part, Core Location prevents any single app from monitoring more than 20 conditions of any type at the same time. Regions are shared hardware, not something your app owns.

Android is more generous and still finite. Google's geofencing guide sets the limit at 100 geofences per app on a single user device, and 100 per app per device user on a shared one. So the number to design against is 20, because that is the one both platforms can honour. Registering 21 regions on iOS is not a warning you can ship past.

The design that survives is a moving window. Keep the full list on your server or on disk, register only the handful nearest the person, and swap the set whenever they move far enough that a different handful is nearest. That turns a list of any length into 20 live regions for the cost of one extra rule about when to re-register. Most geofencing features that work do this. Most that fail tried to register everything on first launch and quietly lost the rest.

Budget one region for the swap itself. A common pattern is to keep a large circle around the area the current set covers, and use its exit crossing as the signal to fetch the next set. That leaves you 19 real ones on iOS, which is another reason the practical ceiling is lower than the published one.

Apple, monitoring the user's proximity to geographic regions

Try it

Does your list of places fit the caps

One app may watch 20 regions on iOS and 100 on Android. Put your numbers in and see what the design has to do about it.

40 too many for iOS

Android has room. Keep the whole list on your side and register only the 20 nearest, swapping them as the person moves. Google recommends 100 to 150 metres. At 80 metres, expect late alerts, doubled alerts and misses.

What to do with a crossing once you have one

A crossing is an event, not an experience. Something has to happen next while the app is in the background or not running at all, and on both platforms that usually means a notification fired from the same background task. This is why geofencing and push notifications are nearly always built together: a geofence notification app is two features, and the second one has its own permission prompt the person can refuse.

Decide early whether the message is made on the device or asked for from your server. On the device is simpler and still works in a car park with no signal. Going through a server lets you change the wording without shipping a build and lets you see what was sent. If the phone may well be offline at the moment of the crossing, that decision belongs with the rest of your offline app functionality rather than with the geofence.

Then guard against the drive-by. Somebody who passes your circle at speed gets exactly the same enter event as somebody who parks and walks in, and an enter area alert app that cannot tell them apart becomes noise within a week. Google's own answer is a dwell transition with a loitering delay, so the alert fires only after the person has stayed inside for a set time. In a React Native and Expo project the geofencing task reports enter and exit only, so you build the equivalent yourself: hold the event, look again a few minutes later, and drop it if they have already gone.

Build it, buy it or leave it out

Geofencing is cheap to add and expensive to make trustworthy, so the decision comes down to how wrong it is allowed to be. If a late or missed alert is an annoyance, build it. If money, safety or a record somebody will rely on depends on the crossing, do not: no cap, no radius and no latency figure on this page can support that. Pair it with a manual confirmation instead, and treat the geofence as a prompt rather than a proof.

Count the permission cost too. A region that fires while the app is closed needs background or always-on location, the heaviest location permission either platform offers, and the person sees that prompt described in the system's words rather than yours. A share of them will say no. Design so the app still makes sense for those people, because a feature that only exists for the ones who granted always-on location is a feature most of your users never see working.

Finally, count what it replaces. For a lot of arrival ideas the honest competitor is a button. If the person opens the app when they get there anyway, a check in tap is free, instant, has no permission prompt, no cap and no radius floor. Geofencing earns its place only when the whole point is that nobody has to remember. That is a real category, and it is smaller than it looks at the start of a project.

Ways an app can notice that somebody arrived

ApproachWorks with the app closedPlaces you can watchTime to fireBattery cost
Operating system geofenceYes20 on iOS, 100 on AndroidMinutes, not secondsLow
Background location trackingYesAs many as you codeAs often as updates arriveHigh
Map open in the foregroundNoAs many as you codeNear instantHigh while open
A check in buttonNoAny numberWhen the person remembersNone
Server side from periodic pingsYesAny numberOne ping intervalSet by the ping rate

Putting the trigger inside an app you already have

Geofencing is almost never the app. It is one trigger inside something else: a delivery app that marks arrival, a site app that opens the right checklist, a shopping app that waits until you are actually at the shop. That makes it a weak reason to start a project and a good reason to add one screen and one background task to a project you already have.

Newly is an AI app builder. You describe the app in plain English and it writes a real React Native and Expo project you own, runs it on a cloud iPhone or Android simulator while it builds, and ships it to TestFlight and to Google Play internal testing. It is $25 a month with no free plan, iOS needs your own Apple Developer account, and the project comes out as a repo you own through the two way GitHub sync in the Deploy tab. One practical note for the plan: geofencing does not run in Expo Go, so it needs a real build, and the failures worth catching only show up on a real device on a real journey.

Settle one thing before any of the code. A geofence tells you where a person was, and the moment you send that crossing to a server you are holding someone's location, which carries obligations that holding an email address does not. Decide what you keep, for how long, and whether you need to keep the history at all. Plenty of these features work perfectly while storing nothing but the last event.

Questions people ask about geofencing

Apple prevents any single app from monitoring more than 20 conditions of any type at the same time, and Google sets the Android limit at 100 geofences per app per device user. Design against 20, since that is the number both platforms can honour, and keep the rest of the list on your own side.

Describe the arrival that should not need remembering

Write down the places worth watching, decide what happens the minute somebody reaches one, and build the trigger into the app your users already have.

Start building