How to get iPad/iPhone Cellular Network Data >Sent/Received Usage so my app doesn't kill users Data Plan
The iPad is coming to the Uk and so are the expensive data plans.
My app downloads large pdf files. I prompt the user if they are on 3g if they wish to continue but it there any way to access the IPhone setting for data downloaded so I could do a before/after.开发者_开发知识库 Im looking for IPhone > Settings > General > Usage > Cellular Network Data > Sent/ReceivedThere's no way to access this information from inside your application. You could just measure the size of the file(s) you download, and display that.
On 3.x, these are got using the private functions CTRegistrationDataCounterGet***Statistics
in Core Telephony framework.
(And even Core Telephony becomes public in 4.0, this is still a private function.)
精彩评论