CoreLocation app for iBeacons written in Swift
This is essentially a clone of the AirLocate app from the iOS 7 sample codes. It allows you to configure your device as an iBeacon as well as search to find other iBeacons nearby.
AirLocatorSwift shows how to use
CLLocationManager to monitor and range
You can configure an iOS device as a beacon as follows:
Obtain two iOS devices equipped with Bluetooth LE. One will be a target device, one will be a remote (calibration) device.
Load and launch this app on both devices.
Turn the target device into a beacon by selecting Configuration and turning on the Enabled switch.
Take the calibration device and move one meter away from the target device.
On the calibration device start the calibration process by selecting Calibration.
Choose the target device from the table view.
The calibration process will start. You should wave the calibration device from side-to-side while this process is running.
When the calibration process is done, it will show a calibrated RSSI value on the screen.
On the target device, go back to the Configuration screen and enter this value under Measured Power.
Note: The calibration process is optional, but recommended as it will fine-tune ranging for your environment. You can configure an iOS device as a beacon without calibrating it by not specifying a measured power. If a measured power is not specified, CoreLocation default to a pre-determined value.
Once you've setup your target device as a beacon, you can use this app to demo beacon ranging and monitoring.
To demo ranging, select Ranging from the remote device.
RangingViewController ranges a set of
To demo monitoring, select Monitoring from the remote device.
MonitoringViewController allows you to configure a
CLBeaconRegion to monitor.