title: Receive signal from beacon while app is in the background
body: <p>I have a iOS app that interact with a beacon.
  Also have a function to detect the signal from a beacon and if the signal is out of range I want to store something in the database (in this case core data)</p>
  
  <pre><code>    func updateDistance(distance: CLProximity) {
      UIView.animateWithDuration(1.0) { [unowned self] in
          switch distance {
          case .Unknown:
              self.view.backgroundColor = UIColor.grayColor()
              self.distanceReading.text = "No Beacon Signal Detected"
              updateDatabaseWithLocation()
  
          }
      }
  }
  </code></pre>
  
  <p>So the app works fine as long as the app is running in foreground.
  My understanding is I can also have the app in the background when user not actively using the app and still get signal from beacon. 
  If so, how can I accomplish this task? <br>I added the following to info.plist and still didn't work.<br>Also is it possible to update the database as well?<a href="https://i.stack.imgur.com/WHbAI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WHbAI.png" alt="enter image description here"></a></p>