Posts

Post not yet marked as solved
1 Replies
853 Views
We have an App that advertises a peripheral and we're using Core Bluetooth's State Preservation and Restoration feature. Most of the time, an incoming connection from a Central device causes the App to be launched and work as expected. However, there are times when an incoming connection starts to launch (or resurrect) the App but fails to do so.Going through the sysdiagnose logs reveals that shortly after an incoming connection the OS decides to resurrect the App followed by a message which states "Application pending termination". Here's an excerpt from the sysdiagnose logs:2019-10-09 07:23:47.669724 -0400 bluetoothd com.apple.bluetooth Incoming connection from device "35726F12-5D40-97B4-8115-254DD494B5B2" () with handle:0x109c00eb0 was successful with connection interval 6 active=1 2019-10-09 07:23:47.937680 -0400 bluetoothd com.apple.bluetooth (CBSR) Resurrecting zombie application "com.UniKey.KwiksetBeta" 2019-10-09 07:23:47.937699 -0400 bluetoothd com.apple.bluetooth (CBSR) Starting Resurrection Timer <15> for "com.UniKey.KwiksetBeta" 2019-10-09 07:23:47.937814 -0400 bluetoothd com.apple.bluetooth (CBSR) Application pending termination, delaying resurrection - privateHas anyone seen this? Any suggestions on how to go about troubleshooting this?
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
1 Replies
724 Views
Given the following code:func peripheralManager(_ peripheral: CBPeripheralManager, didReceiveWrite requests: [CBATTRequest]) { ... } func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager){ ... }Once we initialize an instance of CBPeripheralManager, we sometimes observe the peripheralManager(_:didReceiveWrite:) delegate function getting called before the state of peripheral manager is updated to .poweredOn. Since the state is not .poweredOn, we cannot respond to the write message as that results in an API MISUSE warning.We have occasionally seen this happen on iOS 12, but are seeing it happen more on iOS 13.
Posted
by nokey4.
Last updated
.