简体   繁体   中英

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/Received

There'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.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM