iPhone app rejected for “transferring excessive volumes of data”

前端 未结 6 1544
长发绾君心
长发绾君心 2020-12-03 15:43

Our lovely app that downloads mp3s from our server into a local file on the phone then plays from that file was rejected for using too much bandwidth.

I understand t

6条回答
  •  天命终不由人
    2020-12-03 16:35

    I would suggest throttling the bandwidth on the network/http request when connected to cellular, and having no throttle on wifi.

    A combo of using Reachability to detect the network status, and implementing your http request using CFNetwork with a sleep until the next second whenever you have already downloaded as much as allowed per second should get you there.

    You should check out this project, either to use, or just to see an example of how to code this well:

    http://allseeing-i.com/ASIHTTPRequest

    The ASIHTTPRequest class implements this, using either the old or 2.0 version of Reachability, and also provides a class level throttle, so even if you have multiple concurrent downloads and uploads, so long as all of them go through ASIHTTPRequest, they will be properly taken together and throttled properly.

    A bit more on how to use this here: http://allseeing-i.com/ASIHTTPRequest/How-to-use#bandwidth_throttling

    Lots of good stuff in this (and no, I am not the author of any of it).

提交回复
热议问题