About AftermathCompass

Welcome to the documentation for AftermathCompass – a powerful compass plugin for iOS. With AftermathCompass, you can easily integrate a compass feature into your iOS applications. This comprehensive guide will provide you with all the necessary information to get started with AftermathCompass and make the most out of its features.


Follow the steps below to install AftermathCompass in your project:

  1. Step 1: Add dependency

    To utilize AftermathCompass, add the following line to your project’s Podfile:

    pod 'AftermathCompass'

    Then, run pod install to install the AftermathCompass dependency in your project.

  2. Step 2: Import and configure

    In your desired view controller, import the AftermathCompass module:

    import AftermathCompass

    You can now utilize the AftermathCompass functionality within your project.

  3. Step 3: Initialize and use compass

    To initialize AftermathCompass and start using the compass, follow the code snippet below:

    let compass = AftermathCompass()

    Ensure that start() is called to begin receiving compass updates.


Compass Updates

You can receive compass updates by conforming to the AftermathCompassDelegate protocol. Make sure to set the delegate of your compass object:

compass.delegate = self

Then, implement the delegate method compassDidUpdateHeading to receive the updated heading:

func compassDidUpdateHeading(_ newHeading: CLHeading) {
  // Handle the updated heading data here

Other Compass Features

AftermathCompass also provides additional features and functionality:

  • Calibration

    You can calibrate the compass using the startCalibration() method. Implement the compassDidUpdateCalibrationState delegate method to receive calibration state updates.

  • Accuracy

    AftermathCompass provides access to compass accuracy information. Implement the compassDidUpdateAccuracy delegate method to receive the updated accuracy value:

    func compassDidUpdateAccuracy(_ newAccuracy: CLDeviceOrientation) {
      // Handle accuracy updates here

Additional Resources

Here are some additional resources to further enhance your knowledge of AftermathCompass:

  • API Reference: Access the full API documentation for AftermathCompass here.
  • GitHub Repository: Visit the official GitHub repository for AftermathCompass here.
  • Support: If you encounter any issues or have questions, feel free to reach out to our support team via email.