---------- VERY IMPORTANT UPDATE (July 1, 2020) ------------
We received news from Google that they have turned off the Geo triggered notifications for Google Pay for the moment. So, on Google's behalf, we are very sorry to inform you that any of your customers who use Android phones and have saved your pass to Google Pay will no longer receive a notification when near to your location(s). Your customers can still access and use their pass in their Google Pay app. They just won't see a notification to remind them of the pass when they are nearby.
Google tell us they plan to switch it back on but they will be implementing a new methodology, to fix the lag issue and as Android 10 get adopted more. They have not committed to a timeframe but we will update this article as soon as we learn more.
How do I send a location based message?
Adding locations and messages to your pass designs.
Before we get started, it is THE MOST IMPORTANT concept to understand:
YOU (or PassKit) ARE NOT SENDING A MESSAGE TO A USER WHEN THEY ARE AT A LOCATION.
In contrast to notifications delivered to the lock screen when a pass is updated, location triggered messages are 'passive'.
Location triggered messages are passive.
Passes let your users take some action in the real world, so accessing them needs to be easy and fast. Apple Wallet makes relevant passes immediately accessible by integrating them with the lock screen. To take advantage of this feature, add information about where and when your pass is relevant. For example, a gym membership card is relevant at the gym, while a boarding pass is relevant at the airport but only near time the flight begins boarding.
Once the end user has installed the pass to their wallet app, Wallet then determines whether the pass should appear on the lock screen based on these settings. It calculates when the user is close enough to the specified locations based on the pass style. These settings are determined by Apple, and they are different. They are not controlled by PassKit.
Location based messages are 'passive'—it helps users find passes when they need them by putting relevant passes right on the iPhone lock screen. It doesn’t present alerts or post notifications. This is in contrast to the notification posted when a pass updates.
A pass can have up to 10 relevant locations.
This is an Apple Wallet constraint.
It is fixed for 2 key reasons:
Reduce battery consumption when scanning for locations or beacons
Keep the size of the pass file manageable
In many cases, you have more than ten relevant locations, so you have to pick the best ten. There are a variety of ways to do this. For example, you can have settings in your account management system to let customers add their favorite stores or the stores that they frequently visit. Like other data in the pass, relevance data can be changed when a pass is updated. A pass can initially have very generic relevance information, which is replaced over time with relevant locations tailored by the user.
For Apple Wallet Passes, you can also provide relevancy information using iBeacons. A pass is relevant when the device is brought into proximity of an iBeacon with a matching UUID. You can add up to ten unique beacon UUIDs to the pass. Beacons can optionally include relevancy text, as well as the major and minor Bluetooth identifiers. The system uses the relevancy text from the most-specific matching beacon (the beacon matching the most of the UUID, minor, and major identifiers).
You define what your beacons’ UUIDs mean within the context of your pass. You can use different UUIDs to represent different locations—for example, providing different relevancy text for different stores. Alternatively, you can have a large number of beacons with the same UUID—for example, one beacon per store for a large retail chain. This lets you exceed the ten-location limit for relevant locations. You can also use major and minor identifiers to further refine your relevancy text. For example, identifying different departments within a store.
For passes with relevant locations, you provide a description of why the pass is relevant at a given location. This wording can be as simple as “Store nearby” or it can include a brief description of how to find the relevant location, such as cross streets or landmarks. Don’t include your organization name in the relevant text, and don’t include instructions to the user, such as “Redeem this pass at XYZ.”