Sample code for iBeacons