core-bluetooth
iBeacon in the background – Use cases
Sounds like you are on the right track. In general you are correct that an app needs to be in the foreground to fully use iBeacon capabilities. A few specifics on your three main questions: Your mall use case can work with a couple of limitations. (a) you have to conserve your CLBeaconRegions by having … Read more
Battery drain when using CoreLocation Significant Location Monitoring & CoreBluetooth
At the end of the day, Apple’s suggestion of removing location from UIBackgroundModes fixed our battery drain issue. In order to still get locations in the background we had to wrap the [locationManager startLocationUpdates] & [locationManager stopLocationUpdates] calls with: [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler]; [[UIApplication sharedApplication] endBackgroundTask:];
CoreBluetooth XPC connection invalid
CBCentralManager reference should be a strong reference to the class as a member variable. It cannot work as a local reference. Try next: class ViewController: UIViewController { var ble: BLE! override func viewDidLoad() { super.viewDidLoad() ble = BLE() } } class BLE: NSObject, CBCentralManagerDelegate, CBPeripheralDelegate { private var manager: CBCentralManager! required override init() { super.init() … Read more
Communicating between iOS and Android with Bluetooth LE
I’ve already gone through this for at least one week having this same issue. I’ve already asked a question here and I’ve already answered on my own. The main problem is an Android BUG issue. It’s sending a non permitted command on a fixed L2CAP channnel. But when Android is communicating with normal peripheral BLE … Read more
How to get list of available Bluetooth devices?
This guide looks promising for Bluetooth 3.0. Remember that the CoreBluetooth framework is ONLY for Bluetooth Low Energy (4.0). At bluetooth.com’s dev-pages you can see some examples of globally defined services, and as Guan Yang mentionen, you can see that the heart rate service is 0x180D. UUID`s of the unit is defined by the manufacturer. … Read more
iOS Core Bluetooth : Getting API MISUSE Warning
You have to wait until the [-CBCentralManagerDelegate centralManagerDidUpdateState:] callback has been called. And then, verify that the state is PoweredOn before you start scanning for peripherals.
Use BlueZ Stack As A Peripheral (Advertiser)
With your Bluetooth dongle plugged in, running the following command will tell you the device name and give its state: $ hciconfig The output should look something like this: hci0: Type: BR/EDR Bus: USB BD Address: 00:01:02:aa:bb:cc ACL MTU: 1021:8 SCO MTU: 64:1 DOWN RX bytes:1000 acl:0 sco:0 events:47 errors:0 TX bytes:1072 acl:0 sco:0 commands:47 … Read more
Does the iPhone simulator in Xcode support Bluetooth Low Energy?
The simulator does support Bluetooth Low Energy (4.0) according to this appnote from Apple. The only problem is that even if you have a computer with BLE inside, you will not be able to use the simulator together with it, because (I think) you occupy the availability on BLE for other devices to discover your … Read more