how to make a delegate method keep running across the application

66 Views Asked by At

I'm building a BLE application, main functionality is real-time data polling from the sensor board.

This board has an open sourced lib: https://github.com/zentri/ble_commander_ios

In order to get the data, you need to keep sending command to the sensor board as soon as you receive the data come back from the sensor.

Now I have several view controller all conform to this delegate and getting data back seperately.

But I'm trying to integrate this data polling function to a single class. within this class, I need to conform to that delegate, keep sending command to sensor.

Question: How can I make this "readdata" delegate method always running in background no matter which view controller I'm in.

Thanks

0

There are 0 best solutions below