Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. // Swift 3
  2.  
  3. func setupBeaconRegions() {
  4.  
  5. // Use the .filterDuplicates function on an array of beacons to create a new array of only unique UUID's
  6. let beaconRegions: [iBeaconItem] = iBeacons.filterDuplicates { $0.uuid == $1.uuid && $0.uuid == $1.uuid }
  7.  
  8. // Iterate through new array of unique UUIDs and start ranging those
  9. for beacon in beaconRegions {
  10. startRangingBeacon(beacon)
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement