AsLocationMonitor is a powerful library that allows you to easily monitor the location of a user’s device in your iOS app. The library provides convenient APIs to track the user’s location data, including latitude, longitude, and altitude.


  • Effortless integration into your iOS app
  • Real-time monitoring of user’s location
  • Access to accurate latitude, longitude, and altitude data
  • Highly customizable options for location tracking
  • Support for background location updates
  • Flexible delegate methods for handling location changes


To add AsLocationMonitor to your project:

  1. Open your terminal
  2. Navigate to your project directory
  3. Run the following command:
    pod 'AsLocationMonitor'
  4. Open your project in Xcode
  5. Build and run your app


1. Import the library

In the file where you want to use AsLocationMonitor, import the library:

import AsLocationMonitor

2. Create an instance of AsLocationMonitor

In the appropriate scope of your code, instantiate an instance of AsLocationMonitor:

let locationMonitor = AsLocationMonitor()

3. Set the delegate

To handle location events, set the delegate of AsLocationMonitor:

locationMonitor.delegate = self

4. Request location authorization

Before you can start monitoring the device’s location, you need to request the necessary location authorization:


5. Start monitoring

Begin monitoring the device’s location by calling the startMonitoring method:


6. Implement delegate methods

In the class conforming to the AsLocationMonitorDelegate protocol, implement the following optional methods:

func didUpdateLocation(_ location: CLLocation) {
// Handle updated location data

func didFailWithError(_ error: Error) {
// Handle location monitoring errors


AsLocationMonitor provides several options to customize the location tracking behaviors:


You can set the desired accuracy for location monitoring:

locationMonitor.desiredAccuracy = kCLLocationAccuracyBest

Distance filter

Determine the minimum distance, in meters, that should change before receiving a location update:

locationMonitor.distanceFilter = 10.0

Background updates

To enable location updates even when the app is in the background, set the allowsBackgroundLocationUpdates property:

locationMonitor.allowsBackgroundLocationUpdates = true


AsLocationMonitor has the following requirements:

  • iOS 11.0+
  • Swift 5


AsLocationMonitor is released under the MIT License. See the LICENSE file for more details.