0

I Googled a lot before asking but couldn't find a solution. I need to do this programmatically. I need the information recorded for Cellular Data Usage.

Undo
  • 25,519
  • 37
  • 106
  • 129

1 Answers1

1

You cannot retrieve such information because your app is subject to the app sandbox. Data usage information is considered private, and there is no public API to access it.

Undo
  • 25,519
  • 37
  • 106
  • 129
  • hmm I see. Anyway there are apps on the App Store which monitor Data Usage and I was wondering how they do that. Maybe using ifaddrs.h is the only way to do it. Thanks for the answer! –  Dec 22 '14 at 23:43
  • Depending on what applications you're looking at, they may have access to data that you do not. In particular, applications written by cellular providers (e.g, Verizon, AT&T, etc) may be going off of the network's own billing data, rather than anything available on the phone. –  Dec 22 '14 at 23:46
  • I was talking of applications like this one: Data Usage by sigterm https://appsto.re/gr/Gwgex.i –  Dec 22 '14 at 23:48