Count while in background (NSTimer for more than 3 mins)
Is there any way to run NSTimer for more than 3 mins in background? I have to create simple app that uses `locationManager(manager: CLLocationManager, didRangeBeacons beacons: [CLBeacon], inRegion region: CLBeaconRegion)` for scan my beacons. I have run into problem when I needed to check if user is exactly 10 seconds near closest beacon. I created var timer: NSTimer? var lastClosestBeacon: CLBeacon? { didSet { timer?.invalidate() timer = NSTimer.scheduledTimerWithTimeInterval(10, target: self, selector: "showLocalNotification", userInfo: nil, repeats: false) // NSRunLoop.mainRunLoop()