Transferring big data chunks between device and phone

Hello,

I have a general question to ask about an implementation of a protocol my company will need. On a high level, we're implementing an update system for a device that will have a Bluetooth connection with the phone.

To update the firmware of the device, we will send a HTTP request to a server and the server will respond with the new firmware of the device. Then to minimise the complexity we would want to simply parse the response and immediately transmit it as a byte array over a Bluetooth connection to the device. The size of this updated firmware would be around 40MB.

My question is do you think this type of data transfer could be done easily using swift, and if it can be done easily. Could you point to some examples where it has been done since I was struggling to find something similar online?

Thank you for your answers in advance.