Skip to content

Instantly share code, notes, and snippets.

@MrCrambo
Created May 24, 2020 18:36
Show Gist options
  • Save MrCrambo/6e562247a9e762dcceec0a42d6a41928 to your computer and use it in GitHub Desktop.
Save MrCrambo/6e562247a9e762dcceec0a42d6a41928 to your computer and use it in GitHub Desktop.
var locationManager: CLLocationManager = {
let locationManager = CLLocationManager()
locationManager.delegate = self
locationManager.allowsBackgroundLocationUpdates = true
return locationManager
}()
var region:CLBeaconRegion {
let region = CLBeaconRegion(proximityUUID: uuid, identifier: identifier)
region.notifyEntryStateOnDisplay = true
return region
}
locationManager.startMonitoring(forRegion: region)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment