6

I'm developing an App that is not intended for App Store so I can use private APIs.

What I'm trying to accomplish is getting data information counters per specific applications - if possible, separately for WIFI and Cellular network usage.

I am assuming there is probably some API for that, since Apple does it in Settings > Cellular > "Use cellular data for" and Settings > General > Usage. I've been going through headers, but it is a very long process.

Does anyone know which private API allow for this functionality? Otherwise where would this data be stored physically on the device so I could access it?

Legoless
  • 10,942
  • 7
  • 48
  • 68
  • 2
    On jailbrokens devices ? Using private API does not mean you can be root on the iPhone... – Antzi Mar 25 '14 at 08:21
  • Some of the APIs can be used on non-jailbroken devices. Or i'm getting this wrong? –  Mar 25 '14 at 08:45
  • Yes. However, your application is still sandboxed with a lots of restrictions, which might prevent you to accomplish your goal. – Antzi Mar 25 '14 at 09:22
  • Agreed. But i'm able to get data counters for Wifi/wwan sent/received but as whole, not for a single app. –  Mar 25 '14 at 10:19
  • i think this is what you are looking for: http://stackoverflow.com/questions/7946699/iphone-data-usage-tracking-monitoring – Alaa Awad Apr 01 '14 at 19:44
  • This is what we are currently using, but we are still trying to get data counters per app. –  Apr 02 '14 at 06:44

2 Answers2

0

Tons of private APIs are not documented and varies from different version of iOS. Find the exact method yourself might be the only way to the question. Luckily, there IS some common way to find private API on your own.

  1. Guess a possible name and search it from all the private headers , like https://github.com/JaviSoto/iOS8-Runtime-Headers/search?p=1&q=cellular&type=Code. You can find the headers at https://github.com/nst/iOS-Runtime-Headers, https://github.com/EthanArbuckle/IOS-7-Headers or https://github.com/JaviSoto/iOS8-Runtime-Headers.

  2. Use tools like class-dump or Otool from Detecting Private APIs or iOS Private API Documentation. A jailbreaked device would help you a lot.

Sorry for a not that exact answer.

Community
  • 1
  • 1
Henry
  • 481
  • 4
  • 17
0

Here is a private framework that might help you: iOS Runtime Header

Milo
  • 5,041
  • 7
  • 33
  • 59