iPhone/iPad data usage tracking

2019-01-26 06:50发布

问题:

Just wanted to ask the community a quick question. Out of curiosity, would anyone have an idea how the iPhone App "DataMan" and "Data Usage" are pulling data readings of your personal cellular data usage? I've check the web high and low for possible answers and all so far has been dead ends. How could they have gotten their Apps to be Apple approved?

Any help or advice would be great!

回答1:

One way to do this would be to install a configuration profile with the proper APN settings which will route all the network traffic through a proxy server. For WiFi, you can set the proxy in the network settings. This way you can easily get data usage statistics using a proxy server such as Squid. Also, it is possible to get per-app data usage by inspecting the HTTP headers of the request, since all apps using CFNetworking pass the app name in the header. I am almost sure this is how Onavo works.

The other way would be to use a VPN connection. The principle is the same, only the technique is different.