Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
485 views
in Technique[技术] by (71.8m points)

ios4 - iPhone/iPad data usage tracking

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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...