开发者

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:

  1. Make sure you use cellular connection first
  2. Reset your data counter.
  3. Launch your app and perform operations that interested in
  4. Quit your app and see the traffic used in Settings.app

On the picture below is traffic used for my app in 2 minutes.

Tracking data size over network -- iPhone server communication

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜