Leanplum allows you to create custom geofences to be used for triggering push notifications and in-app messages.
Note: iOS limits the number of locations that an app can save to 20; however, our SDK manages this for you by only storing the nearest 20 locations to each user's device at any given time. This way, you can have more than 20 locations saved in Leanplum, but your users will only have the 20 most relevant to them (i.e. the closest).
To create and utilize a geofence, do the following:
- Select your message type and targets
- For a push notification, select Triggered locally as the delivery option, and select the User enters region or User exits region trigger. For an in-app message, select the User enters region or User exits region trigger as the Display When trigger.
- Select Edit regions. If you have already created a region before, you’ll see the Manage Regions interface, where you can add a new region or edit an existing region. If you’ve never created a region before, you’ll be taken directly to the Create Region interface.
- Create your region by either entering latitude and longitude values to function as the center of the region and a radius value, or manually dragging and setting the geofence area
- Name your region and click Finish
- If you are using an iBeacon, you can select that as the region type instead of a geofence, and add in the appropriate iBeacon information
You can now use your created region as an entry or exit trigger for any other message.