How does the iPhone know I’m by a Shoprite?

Shoprite is a big grocery chain in my area. They have a Bonus Card that grants you occasional discounts. When my iPhone is near a Shoprite, I get the notification on my iPhone for the bonus card in my Apple Wallet.

I also get something similar when I go to an airport and my boarding pass is in my Apple Wallet.

How does my iPhone/App know my location to display the card from my Apple Wallet?

I suspect it is using geofencing - the app has a set of circular regions (center and radius) defining, for example, the location of all ShopRite stores, built-in to it. This set of regions is registered with iOS. iOS can then wake-up the app when your location enters one of those regions.

If the total set of regions (number of stores) is too big for them all to be installed at once, the app can use your location to determine a region (e.g. all stores within 100 miles) and only load those coordinates. For this, precise location is unnecessary, so the app doesn’t need to request precise location permission from you. Without this permission, apps get “reduced accuracy”, where the location is only updated a few times per hour and is only accurate to 1-20km - not enough to be a privacy concern for most people, but enough to let the app know what town/city/region you’re in so it can load the region’s geofence data.

Alternatively, I suppose they could also do this with Bluetooth beacons. For example, Apple’s iBeacon. This is a mechanism where a venue sets up short-distance transmit-only Bluetooth transmitters. Your phone, when picking up the beacon, can get information about it (e.g. its location, who is running it, etc.) and a compatible app can take action based on it.

This is often used for venues like museums, where they may put a beacon near each exhibit, so the companion app can always show you information about what you’re standing in front of.

But I think it wouldn’t be appropriate for the ShopRite app, since Bluetooth beacons are very short range. It would only be receivable when you’re actually in the store, not when you’re nearby. But it is technically possible.

See also:


Maybe you already know, but you can turn this off for each pass. In Wallet, tap the (…) button, then turn off Show on Lock Screen. (Which has subtest indicating that it’s triggered by date/time and location.)


Location Services. Here’s Apple’s explanation, and you can make changes to it at any time:

“You control whether Maps, iPhone, and many more apps collect information about your location. You control whether iPhone and apps use Location Services to determine information about your location.”

And you can use it to look back your location history.

Location Services is also a backbone of Apple Watch and services including Find My.

Apple swears that all information about you in Locations is strictly kept private. And Apple does not share any of your Apple Location information with Google or any other online service. As Shamimo described, Google Maps does use your information it collects on your iPhone, Watch or iPad to sell advertising. Here’s just a few of the many ways they do:

Geofencing is has been a big revenue producer for Google. Apple’s App Tracking Transparency significantly defanged a lot of what Google geolocates, but in Google’s Map app, it still exists in truncated fashion:

Try turning Wallet location services off to see if it still happens. I use Key Ring and turned those off as they got pretty annoying (there are a lot of stores in my area)


The Shoprite app doesn’t use location services at all. It also doesn’t do background processing. That’s what made this so weird. I guess the location data is in the Wallet app itself.

The fact that I get boarding passes in my screen when I’m by the airport didn’t concern me as much. There aren’t that many, and their locations are pretty stable. Their locations being built into the Wallet App made sense. All Shoprite locations? There are hundreds and I assume dozens of major supermarket chains throughout the US. And stores open and close all the time.

The fact it’s the Wallet app handling this and not some location leaking to apps makes me feel better.

The notifications come in the parking lot, so I don’t believe it’s Bluetooth iTokens.

1 Like

I don’t think this is how it works for boarding passes or train tickets. They show up based on time (2 hours before train/flight departure it seems) regardless of your location.

Geofencing is a separate API from location services. Even though it does use your location, all the computation is done by the OS - the app gets notifications when you enter/leave a fenced region, but it gets no other information about your location. I’m pretty sure they will work even if you have location services disabled for the app (assuming you didn’t disable it system-wide).

According to this web site, ShopRite has 322 locations. The app may simply be giving 322 geofence regions to iOS in order to generate these alerts.


Shopright has been using geofencing for many years. Like many other retailers of all sizes and shapes, they probably keep their mouths shut tight because being shadowed, tracked and analyzed is not something the majority of their shoppers would approve of.

“ To better compete in a changing grocery retail landscape, ShopRite contracted SapientRazorfish to redesign its iOS app and incorporate into it geolocation, as well as a comprehensive grocery ordering, delivery, and pick up eCommerce solution.”

Razorfish also developed, designed and built Shoprite’s in store cashierless checkout system.

And Macy’s not only uses geofencing in and outside of their stores, and they also use it before, during and after the Thanksgiving Day Parade:

They use it for the Fourth Of July Fireworks as well.

1 Like

Wait, what? How do you turn it off then? Or is consent to this “tracking” buried in the User Agreement for their app?

This isn’t tracking. The app isn’t told your location. iOS only tells the app “is the phone within the app’s geofence region”.

As for how to disable the geofencing, I think you will need to disable location services for the entire phone, or check to see of the ShopRite app has some configuration you can use.

As for user agreements, have you read it? I don’t know anybody (myself included) who has ever read these agreements. They probably imply consent for all kinds of things, with your only recourse being to uninstall the app.


Does the Shoprite app still pop up when you quit it (for older iPhones: double click the Home button, locate the app and swipe it upwards)?

I haven’t used the Shoprite app in ages. Just the card that’s in the wallet.

on that topic: you have to be pretty dedicated to read all the user agreements you are presented with, as Geoffrey A. Fowler of the Washington Post discovered

I tried to read all my app privacy policies. It was 1 million words.

Let’s abolish reading privacy policies. Here’s how we can use the law and technology to give us real privacy choices.