iphone App Is Requires Large Files Downloading Feature

Discussion in 'iPhone Tips, Help and Troubleshooting' started by skipday, Apr 4, 2011.

  1. skipday macrumors newbie

    Joined:
    Mar 14, 2011
    #1
    My iphone application is requires large files downloading features and due to that apple has rejected my iphone app as per the Apple iStore review Guideline (https://developer.apple.com/appstore/resources/approval/guidelines.html). Apple suggests that downloading content over a cellular network should not use more than 5MB over 5 minutes.

    is there any solution to achieve this via pro grammatically especially when the app is downloading anything from apple store (e.g., huge PDF or pub file)? :apple:
     
  2. eastercat macrumors 68040

    eastercat

    Joined:
    Mar 3, 2008
    Location:
    PDX
    #2
    Is there a way to have the user d/l in chunks and combine them after it's done? I'm not a programmer, so I don't know if this is feasible.
     
  3. baharharre, Apr 8, 2011
    Last edited: Apr 21, 2011

    baharharre macrumors newbie

    Joined:
    Mar 16, 2011
    #3
    This will Help YOu

    Well, as you need to set bandwidth usage limit for cellular network to control the download of heavy pdf files. This can be achieved by using ASIHTTPRequest open source library @ http://allseeing-i.com/ASIHTTPRequest/How-to-use#throttling_bandwidth

    Below snippet code will be used while making the request.

    // Will limit bandwidth to the predefined default for mobile applications when WWAN is active.
    // Wi-Fi requests are not affected
    // This method is only available on iOS
    [ASIHTTPRequest setShouldThrottleBandwidthForWWAN:YES];

    // Will throttle bandwidth based on a user-defined limit when when WWAN (not Wi-Fi) is active
    // This method is only available on iOS
    [ASIHTTPRequest throttleBandwidthForWWANUsingLimit:14800];

    // Will prevent requests from using more than the predefined limit for mobile applications.
    // Will limit ALL requests, regardless of whether Wi-Fi is in use or not - USE WITH CAUTION
    [ASIHTTPRequest setMaxBandwidthPerSecond:ASIWWANBandwidthThrottleAmount];

    // Log how many bytes have been received or sent per second (average from the last 5 seconds)
    NSLog(@"%qi",[ASIHTTPRequest averageBandwidthUsedPerSecond]);

    Hope this will help you to resolve your issue.:apple:
     

Share This Page