-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Cubeacon SDK for iOS is a library to allow interaction with any iBeacons. The SDK system requirements are iOS 8 or above and Bluetooth Low Energy.
Cubeacon SDK allows for:
- Beacon ranging (scans beacons and optionally filters them by their properties).
- Beacon monitoring (monitors regions for those devices that have entered/exited a region).
Learn more at:
- iOS [Apple Documentation][AppleDoc]
- Sample application [demos][Demos] of SDK usage
- Read our [Wiki][Wiki] for a basic SDK usage
- Download [Cubeacon App][AppleStore] in Apple Store to see some implementation of Cubeacon SDK
-
Download
Cubeacon.framework
from [release][Github Release] page. -
Then drag it into the
Frameworks
section in your XCode project. -
Ensure the following frameworks and a library exist in your project :
CoreLocation.framework
CoreBluetooth.framework
-
Add the following code to initialize Cubeacon SDK in
AppDelegate
application:didFinishLaunchingWithOptions
method :[Cubeacon initialize];
Optional: You can add some custom setup :
- Enable Cubeacon SDK debug logging when in development mode by calling
Cubeacon.+setLogLevel:
before initialize SDK. - You can choose
CBLogLevel
from :CBLogLevelNone
CBLogLevelError
CBLogLevelWarning
CBLogLevelInfo
CBLogLevelDebug
- Enable Cubeacon SDK debug logging when in development mode by calling
-
Open your project settings and go to the
Capabilities
tab. Enable these modes :Location updates
Uses Bluetooth LE accessories
Background fetch
-
Add this two lines into
info.plist
file :
Key | Type | Value |
---|---|---|
NSLocationAlwaysUsageDescription |
String | $(PRODUCT_NAME) use location service to scan nearby beacons |
NSLocationWhenInUseUsageDescription |
String | $(PRODUCT_NAME) use location service to scan nearby beacons in foreground |
NSBluetoothPeripheralUsageDescription |
String | $(PRODUCT_NAME) use bluetooth to scan nearby beacons |
Optional: You can change the value to match your needs. The values are containing the message to be displayed to the user at the prompt.
- [Ranging][Ranging] for beacons
- [Monitoring][Monitoring] beacon
- Show [notification][Notification]
Read about detailed changelog [here][Changelog]