Share via


CoreLocation Namespace

The CoreLocation namespace provides classes for tracking and monitoring location, regions (including iBeacons), and geocoding.

Classes

Name Description
CLAuthorizationChangedEventArgs

Provides data for an event based on an Objective-C protocol method.

CLBackgroundActivitySession
CLBackgroundActivitySessionDiagnostic
CLBeacon

Represents a local-area device that can be used for fine-grained location monitoring.

CLBeaconIdentityCondition
CLBeaconIdentityConstraint
CLBeaconRegion

CoreLocation region determined by an iBeacon.

CLCircularGeographicCondition
CLCircularRegion

A CLRegion defined by a center and a radius (in meters).

CLCondition
CLFloor

Information describing a building level.

CLGeocoder

Provides support for converting between an address in text form and a location described using latitude and longitude or to convert from a latitue and longitude to a user-friendly location (street, city, state, country/region).

CLHeading

Heading data as generated by the CLLocationManager.

CLHeadingUpdatedEventArgs

Provides data for an event based on an Objective-C protocol method.

CLLocation

Location information as generated byt he CLLocationManager class.

CLLocationDistance

A class whose static members define constants relating to filtering and maximum distance.

CLLocationManager

Manages the delivery of location, region, and heading events to your application.

CLLocationManagerDelegate

This is a class that implements the interface ICLLocationManagerDelegate (for the protocol CLLocationManagerDelegate).

Subclass this class to easily create a type that implements the protocol.

An alternative is to create a subclass of NSObject and then implemented the interface ICLLocationManagerDelegate.

CLLocationManagerDelegate_Extensions

Extension methods to the ICLLocationManagerDelegate interface to support all the methods from the CLLocationManagerDelegate protocol.

CLLocationPushServiceErrorExtensions

Extension methods for the CLLocationPushServiceError enumeration.

CLLocationPushServiceExtension_Extensions

Extension methods to the ICLLocationPushServiceExtension interface to support all the methods from the CLLocationPushServiceExtension protocol.

CLLocationSourceInformation
CLLocationsUpdatedEventArgs

Provides data for an event based on an Objective-C protocol method.

CLLocationUpdatedEventArgs

Provides data for an event based on an Objective-C protocol method.

CLLocationUpdater
CLMonitor
CLMonitorConfiguration
CLMonitoringEvent
CLMonitoringRecord
CLPlacemark

Associates data such as street address with a coordinate.

CLRegion

The base class for trackable geographical regions.

CLRegionBeaconsConstraintFailedEventArgs

Provides data for an event based on an Objective-C protocol method.

CLRegionBeaconsConstraintRangedEventArgs

Provides data for an event based on an Objective-C protocol method.

CLRegionBeaconsFailedEventArgs

Provides data for an event based on an Objective-C protocol method.

CLRegionBeaconsRangedEventArgs

Provides data for an event based on an Objective-C protocol method.

CLRegionErrorEventArgs

Provides data for an event based on an Objective-C protocol method.

CLRegionEventArgs

Provides data for an event based on an Objective-C protocol method.

CLRegionStateDeterminedEventArgs

Provides data for an event based on an Objective-C protocol method.

CLServiceSession
CLServiceSessionDiagnostic
CLUpdate
CLVisit

Relates a location and radius with an arrival and departure time.

CLVisitedEventArgs

Provides data for an event based on an Objective-C protocol method.

Structs

Name Description
CLLocationCoordinate2D

Geographical coordinates.

Interfaces

Name Description
ICLLocationManagerDelegate

This interface represents the Objective-C protocol CLLocationManagerDelegate.

ICLLocationPushServiceExtension

This interface represents the Objective-C protocol CLLocationPushServiceExtension.

Enums

Name Description
CLAccuracyAuthorization
CLActivityType

An enumeration whose values specify different types of activity.

CLAuthorizationStatus

An enumeration whose values specify the current status of authorization to use location services.

CLBeaconRegionUuidType

This enum is used to select how to initialize a new instance of a CLBeaconRegion.

CLDeviceOrientation

An enumeration whose values represent the device's physical orientation.

CLError

Errors returned by the CLLocationManager.

CLLiveUpdateConfiguration
CLLocationPushServiceError
CLMonitoringState
CLProximity

An enumeration whose values specify the physical proximity of an iBeacon.

CLRegionState

An enumeration whose values specify whether the device is inside or outside a region or unknown.

CLServiceSessionAuthorizationRequirement

Delegates

Name Description
CLBackgroundActivitySessionCreateHandler
CLGeocodeCompletionHandler

A delegate that is the completionHandler for various asynchronous methods in CLGeocoder.

CLLocationManagerEventArgs
CLServiceSessionCreateHandler

Remarks

The Core Location namespace revolves around tracking and monitoring the user location, the device's entry-and-exit from regions (either fixed or iBeacon-based), and geocoding between addresses and locations.

Geocoding use-cases center on the CLGeocoder class. Geocoding is simple:

async void GeocodeToConsoleAsync (string address) {
    var geoCoder = new CLGeocoder();
    var placemarks = await geoCoder.GeocodeAddressAsync(address);
    foreach (var placemark in placemarks) {
	      Console.WriteLine(placemark);
    }

As is reverse-geocoding:

async void ReverseGeocodeToConsoleAsync (CLLocation location) {
    var geoCoder = new CLGeocoder();
    var placemarks = await geoCoder.ReverseGeocodeLocationAsync(location);
    foreach (var placemark in placemarks) {
	      Console.WriteLine(placemark);
    }
}

Other use-cases typically start with the CLLocationManager class:

  • Tracking the device's location:
  • Region monitoring (Geofencing):
  • iBeacon ranging:

These use-cases are discussed in the CLLocationManager class documentation.