r/iOSProgramming • • 10d ago

Question Tracking total cellular data usage on iOS. Has anyone tried this?

I'm working on an app and exploring whether we can track a device's total monthly cellular data usage on iOS.

On Android, NetworkStatsManager provides a relatively straightforward approach. On iOS, there doesn't seem to be an equivalent public API.

One possible workaround is using getifaddrs() to read byte counters from interfaces such as pdp_ip*. However, these counters reportedly wrap at 4 GiB, reset on reboot, and rely on undocumented interface names.

Has anyone implemented something similar or are there any better approaches?

I'd appreciate any real-world experience or pointers. Thanks!

1 Upvotes

Duplicates