 
         NSNotificationCenter.defaultCenter().addObserver(
             self,
-            selector: "onResume",
+            selector: #selector(BackgroundLocationServices.onResume),
             name: UIApplicationWillEnterForegroundNotification,
             object: nil);
 
         NSNotificationCenter.defaultCenter().addObserver(
             self,
-            selector: "onSuspend",
+            selector: #selector(BackgroundLocationServices.onSuspend),
             name: UIApplicationDidEnterBackgroundNotification,
             object: nil);
 
         NSNotificationCenter.defaultCenter().addObserver(
             self,
-            selector: "willResign",
+            selector: #selector(BackgroundLocationServices.willResign),
             name: UIApplicationWillResignActiveNotification,
             object: nil);
     }

    }

    func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
        log("Got location update");
        let locationArray = locations as NSArray
        let locationObj = locationArray.lastObject as! CLLocation


        self.manager.desiredAccuracy = desiredAccuracy;
        self.manager.distanceFilter = distanceFilter;

        self.startUpdating(true);
    }

    func syncAfterXSeconds() {
