      */
     public func stopUpdates () {
         locman.stopUpdatingLocation()
-        //locman.stopUpdatingHeading()
+        
+        #if os(iOS)
+            locman.stopUpdatingHeading()
+        #endif
+        
         updatingHeading = false
         trying = false
         startTime = nil

public protocol LocationProviderDelegate {
    func retrieved(location: CLLocation)
    func accessDenied()
    func retrieved(heading: CLHeading)
    func locationAccess(isGranted: Bool)
}


        locman.delegate = self
        locman.desiredAccuracy = kCLLocationAccuracyBest
        
        #if os(iOS)
            locman.activityType = .fitness
            locman.pausesLocationUpdatesAutomatically = true
        #endif
        
    }
    
    // MARK: - Public Methods
