2

I need to find out my user's data usage and I'm seeing there's a way to do it here

But is this API public? In other words would the App Store accept, or reject it?

Community
  • 1
  • 1
Eddy
  • 3,533
  • 13
  • 59
  • 89
  • 3
    Since Apple provides the documentation for the `getifaddrs` function, it is public. Therefore that isn't a problem. – rmaddy May 23 '14 at 15:23

1 Answers1

0

I've used getifaddrs for years without problems.

It is documented with man pages, and is from the BSD library, so I think you are on rock solid ground here.

The problem you're going to meet is that the iOS implementation ( for most devices) uses 32bit pointers, so you have to code around overflow. This is non-trivial and there are a few gotchas ( I'm currently trying to find out why the counts can go backwards by a few tens of bytes!).

Gordon Dove
  • 2,537
  • 1
  • 22
  • 23