Swift version for HBeacon