I want to receive a raw data continuously from my IOT device and want perform continuous operation on it while app is in background state.

I am working on a project which is related to IoT communication, where I use to connect the iOS applications with my IoT device(Smell detector device), and after the successful BLE connection, the IoT device will continuously pass raw smell data to my application via BLE. Now the problem is I want my application to be connected with the device while my app goes to the background state and during the background state communication between App and IoT device should be remaining constant using BLE connection. Also, I have to perform some calculations on the raw data received from the IoT device as well...  

So Is there any way using which I can continuously get the data from the IoT device and perform some calculations on it while my app is in the background state? 

I want to receive a raw data continuously from my IOT device and want perform continuous operation on it while app is in background state.
 
 
Q