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
- Sample application demos of SDK usage
- Read our Wiki for a basic SDK usage
- Download Cubeacon App in Apple Store to see some implementation of Cubeacon SDK
-
Download
Cubeacon.frameworkfrom release page. -
Then drag it into the
Frameworkssection in your XCode project. -
Ensure the following frameworks and a library exist in your project :
CoreLocation.frameworkCoreBluetooth.framework
-
Import Cubeacon SDK using
#import <Cubeacon/Cubeacon.h> -
Add the following code to initialize Cubeacon SDK in
AppDelegateapplication:didFinishLaunchingWithOptionsmethod :[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
CBLogLevelfrom :CBLogLevelNoneCBLogLevelErrorCBLogLevelWarningCBLogLevelInfoCBLogLevelDebug
- Enable Cubeacon SDK debug logging when in development mode by calling
-
Open your project settings and go to the
Capabilitiestab. Enable these modes :Location updatesUses Bluetooth LE accessoriesBackground fetch
-
Add this two lines into
info.plistfile :
| 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 for beacons
- Monitoring beacon
- Show notification
Having trouble uploading to App Store? Try any of these step :
- Stripping Unwanted Architectures From Dynamic Libraries In Xcode from Daniel Kennet
- Replacing
Cubeacon.frameworkfor Released only binary. Download here.
Read about detailed changelog here