If you haven't already, sign up for Radar to get your API key. You can create up to 1,000 geofences and make up to 100,000 API requests per month for free.Get API Keys
On the Geofences page, create a geofence for a McRadar's location. In this case, use
restaurant for the geofence
123 for the geofence
Initialize the SDK in your
AppDelegate class with your publishable API key, then request location permissions.
When the user places an order and taps "I'm on my way," start tracking to start live location tracking, start a trip to the destination geofence. Use the order ID, in this case
456, for the trip
Optionally, instead of calling
Radar.startTracking(), we can simulate a sequence of location updates from an origin to a destination with
Radar.mockTracking(). For example, to simulate a sequence of 10 location updates every 3 seconds by car from an
origin to a
destination, we can call:
When the user taps "I'm here" or when the order is picked up, complete the trip and stop tracking.
Have questions or feedback on this documentation? Let us know! Email us at [email protected].