 
 import Foundation
 import CoreLocation
+import UIKit
 
 public typealias LocationResult = Result<Location>
 public typealias Observer = (location: LocationResult) -> ()

        locationManager.requestWhenInUseAuthorization()
        
        self.locationManager.startUpdatingLocation()
    }
    
    // MARK: - Public

    
    // MARK: - Private
    
    func handleBackgroundNotification(notification: NSNotification) {
        self.locationManager.stopUpdatingLocation()
    }
    
    func handleForegroundNotification(notification: NSNotification) {
        self.locationManager.startUpdatingLocation()
    }
    
    private func publishChangeWithResult(result: LocationResult) {
        if self.shouldUpdateWithResult(result) {
            observers.map { (observer) -> Void in
