Basically, Geozones are pins on the map that allow sending automatically triggered push notifications right at the moment a user enters the specified area on the map. Its range can be set from 50 to 1000 meters, and it has an adjustable cooldown period.
Geozones might be convenient for marketing/sales departments of different stores, shops, restaurants and other places that need to get attention of those who pass by. For instance, you can set a Geozone for your Starducks cafe, so that each time a user passes by this coffee place, he or she will receive a notification about special offers on croissants and coffee of the day in your cafe.
Enabling Geozones for Native iOS SDK
1. Add one of the following keys to your Info.plist:
NSLocationAlwaysUsageDescription– if you would like your application to react to Geozones while running in the background and when it’s closed;
NSLocationWhenInUseUsageDescription– if you would like your app to react to Geozones only while running in the foreground.
2. Start Geozone tracking when needed with
- Use GPS when the app is in the foreground – add
PW_USE_GPSflag to the Info.plist;
- Use GPS when the app is in the background – go to Target – Capabilities – Background modes – enable Location updates.
In order to set the Geozone all you have to do is to follow the steps below:
Go to your Pushwoosh Control Panel, select the application and click the Geozones icon. There you can see the list of existing Geozones for the chosen application. Click Add Geozone to create a new one.
Name your new Geozone, and specify the notification text for it. You can select the specific area on the map zone by setting the pin on the map, or using the longitude and latitude boxes below the map.
You can also set the range in meters (not more than 1000m) and the cooldown time (it is the silent period after sending a notification. If there are two featured locations in the neighborhood, you will get one notification for each of them when you pass them by, but you won’t get any on your way back if it will happen during the cooldown time).
Click on Save Geozones, and that’s it!
Wasn’t that easy?