I need to calculate network usage programatically for my iOS application so I can put a limit for Celluar data usage and wifi usage monthly.
I made a lot of investigation and found the following approaches:
I can calculate the application network usage via personal VPN, but this solution is not preferred because a lot of user with agree to use VPN.
I can calculate the overall usage for network interfaces using
getifaddrs
, but not per application.
Any help on how to calculate network usage for my application without using personal VPN.