Geofencing is the concept of being notified when a user enters or exits a specific region. This region can be, for example, a shopping mall to remind the user to buy some stuff or to perform any specific action. Many apps can be built on the concept of geofencing to remind or notify users when they enter or exit specific regions. In the following demo, we will build a sample screen that allows the user to register a new geofencing to the map. The user will be able to select a location on the map, a diameter of the region, when to be notified (upon entry or upon exit), and some notes to be displayed on the notification that will be fired when the user passes this region.
To add geofencing, perform the following steps:
Open storyboard, drag a UIBarButtonItem and add it to the right of the Locate Me button. Change its type to the Add type:
Add a new View Controller for adding geofencing to the map. Link a Show segue from the new plus button to the new view...