track usage of data sent and received through my app
问题 How to track usage of data sent and received through my app? I just want to record bytes sent and received when my app is running. If I can get separate info for Wifi and Cellular network then it would be great but its not a priority. I know how to find total usage of device - https://stackoverflow.com/a/8014012/427969 Also, I know I can use Instruments to collect network activity data but I want to record this data in my app so need a programmatic way to do this. I tried to search this but