NordicSemiconductor / IOS-DFU-Library

OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
http://www.nordicsemi.com
BSD 3-Clause "New" or "Revised" License
520 stars 214 forks source link

Update fails without the corresponding DFUServiceDelegate state update #516

Closed joonaservald closed 6 months ago

joonaservald commented 10 months ago

DFU Bootloader version:

Device information:

Describe the bug During a firmware update with the library, I am running into a case where the update fails but the DFUServiceDelegate method dfuStateDidChange does not return the aborted case. During this case, I was logging out both state updates from dfuStateDidChange and errors from dfuError, more on that below. I would expect that if the update fails for any reason, the state would change to aborted or similar.

Logs The state and error updates come in the following order:

After this, nothing. The last known DFUServiceDelegate state update was enablingDfuMode and not aborted.

philips77 commented 9 months ago

Hello,

This is kinda by design. I updated the doc now, but even before it was saying that whan an error is received that's all you get. The state won't change. The state goes to .aborted only when DFU was explicitly aborted using the controller.

We may think about changing that, but that would be a breaking change, I think.