NordicSemiconductor / IOS-CoreBluetooth-Mock

Mocking library for CoreBluetooth framework.
BSD 3-Clause "New" or "Revised" License
225 stars 51 forks source link

App backgrounding not updating timers #71

Closed kscheff closed 1 year ago

kscheff commented 2 years ago

With Core Bluetooth it is possible to keep the peripheral connected and receive e.g. regularly notifications when the App is in background mode. My use case is to receive notifications in background to update real time model. The Mock however is suspended and the typical Timer or GDC doesn't fire anymore when the user sends the App to background.

There are workaround to keep timers going (see https://www.raywenderlich.com/5817-background-modes-tutorial-getting-started). Those might be a solution for development, but will be of limited use for an App Store submission due to potential API miss-use.

NickKibish commented 1 year ago

Yes, we can't use Timer in the background. However, the workaround is related to the application, not the library.

We can add it somewhere to README.