Skip to main content
In this tutorial, we show you how to use the Radar iOS SDK and geofences to show a notification when a user enters a geofence. In this example, we show local notifications on iOS using RadarDelegate. Alternatively, you could show local notifications on Android using RadarReceiver, or send remote push notifications using a webhook or integrations with platforms like OneSignal, Braze, and Airship.

Languages used

  • Swift

Features used

Steps

1

Sign up for Radar

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
2

Import geofences

On the Geofences page, create a geofence.
3

Install the Radar iOS SDK

Initialize the SDK in your AppDelegate class with your publishable API key. Make your AppDelegate implement RadarDelegate. Finally, request location permissions and start tracking:
4

Listen for events

Implement didReceiveEvents:user: to listen for geofence entry events and show notifications:

Sample code

Support

Have questions or feedback on this documentation? Let us know! Contact us at radar.com/support.