tried to do the same, and although documents say that the lower-level API does not activate cellular radio and VPN on demand, this is not entirely true for TCP connections.
In the case of UDP, this is true and your UDP packets are not sent most of the time. To solve this problem, simply open the listening socket for TCP using the lower level API and this will activate cellular radio or VPN on demand and close the socket as soon as you are done.
For TCP, you can use low-level APIs for server-side code on iOS devices, and this will activate cellular radio or VPN on demand, but for client code on iOS devices, it is preferable to use the higher-level APIs that were provided. In any case, the radio is active, and you do not need to worry that packets are not being sent.
By the way, this is what I'm doing right now.
Shehzan
source share