Peripheral advertising in the background
Peripheral advertising in the background
- Subject: Peripheral advertising in the background
- From: Kagan Riedel <email@hidden>
- Date: Wed, 06 Apr 2016 11:45:18 -0500
Hello,
We've been working on an app that requires a peripheral advertising in the background continuously. The goal is to maximize the up time of the peripheral advertising in the background.
Setup:
- "bluetooth-peripheral" background mode is enabled.
- There is only one CBPeripheralManager with a static CBPeripheralManagerOptionRestoreIdentifierKey.
- The CBPeripheralManager has one CBMutableService, that has one CBMutableCharacteristic.
- The manager and its service and characteristic are initialized on app startup.
- -startAdvertising is called immediately when -peripheralManagerDidUpdateState: returns a valid state.
- Targeting iOS 9+ with the 9.3 iOS SDK.
- The user confirms the alert asking if the app is allowed to broadcast in the background.
From our testing we've found:
- The peripheral advertises continuously without interruption, whether plugged in to power or not.
- Advertising continues after intentionally forcing the app to crash.
- The energy impact is very low.
- The only way to stop the advertising is by killing the app from the multi-tasking menu, restarting the device, or disabling bluetooth.
Questions:
- Is this behavior reliable? We'd like to guarantee this behavior, and it's difficult to tell from the documentation if we can rely on our findings.
- Has anyone else had similar results, anecdotal or otherwise?
Thanks for your time!
Kagan Riedel
Software Developer
Livefront
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden