Location Based Notifications (iOS)
Before you start:
- You must add the
NSLocationAlwaysUsageDescription
andNSLocationWhenInUseUsageDescription
in the project Info.plist under the sectionSource
. If your device has iOS 11, you must also add theNSLocationAlwaysAndWhenInUseUsageDescription
. - You will need to get
Always authorization
from an instance ofCLLocationManager
When you want to start the radar for geofences and beacons, call the start
method.
Typically, you would start the radar right after you get authorization:
LocationManager = new CLLocationManager();
LocationManager.AuthorizationChanged += (s, e) =>
{
if (e.Status == CLAuthorizationStatus.AuthorizedAlways)
NITManager.DefaultManager.Start();
else
NITManager.DefaultManager.Stop();
};
LocationManager.RequestAlwaysAuthorization();
To learn how to deal with in-app content see this section.