Tracking data size over network -- iPhone server communication
I want to log the n开发者_开发百科umber of bytes being transferred from my iPhone app to server so that I could put a watch on the bandwidth being eaten up and could take necessary actions.
How can I do this?
In Instruments there is Network Activity Monitor that does what you need. You can always correlate your findings with network usage numbers in your Settings.app on actual device. Settings->General->Usage
Update: Second approach:
- Make sure you use cellular connection first
- Reset your data counter.
- Launch your app and perform operations that interested in
- Quit your app and see the traffic used in Settings.app
On the picture below is traffic used for my app in 2 minutes.
精彩评论