Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

newtoiphonesdk

macrumors 6502a
Original poster
Jul 30, 2010
567
2
I have an app that accesses this site in a WebView.
Every .mp3 file there has less MB than minutes of Audio. According to 9.3 of App Review Guidelines an app can't receive more than 5 MB in 5 minutes. The .mp3 files fit this ratio, but the issue is that the phone will download it all at once. Meaning in about 5 minutes it may download the whole 21 MB file, and for the next 25 minutes of the file not download anymore. Is there any way I can change it to where it will download it over a slower amount of time, or any other way to meet the requirements?
 

newtoiphonesdk

macrumors 6502a
Original poster
Jul 30, 2010
567
2
Limit bandwidth within app

I had an app rejected because the mp3 it was playing within the app was using more than 5 mb of data in 5 minutes. Someone suggested I could throughput the bandwidth of the app so this wouldn't happen, but they didn't know how to do this. I've looked online, and haven't been able to find any solutions for this. Is it really possible to do and not well documented, or can limiting the bandwidth not be done?
 

admanimal

macrumors 68040
Apr 22, 2005
3,531
2
Just to be clear, the mp3 you are playing is located on a server somewhere, not on the device right? Generally speaking it is definitely possible to limit the bandwidth of an arbitrary transmission. The question is whether it is possible in this case where you apparently need to download and play an mp3 in real time.
 

ulbador

macrumors 68000
Feb 11, 2010
1,554
0
Honestly I think about the only workaround is to make it so your app requires a WiFi connection. Otherwise you would have to write a custom file downloader that would manually insert some waits or something to stay under the limit.
 

newtoiphonesdk

macrumors 6502a
Original poster
Jul 30, 2010
567
2
yea, I can't really do the wifi only thing. The audio part is only 1 of 5 different views in the app, and the others connect to the internet just to read blog articles or post them to facebook. If there's a way I can make just one of the view controllers wifi only it would be great. I just think the 5 mb in 5 minutes rule is too rigid. Yes, my app is downloading 17 mb in 5 minutes, but for the rest of the 43 minute audio file, it's downloading nothing. Shouldn't that count for something?
 

ulbador

macrumors 68000
Feb 11, 2010
1,554
0
yea, I can't really do the wifi only thing. The audio part is only 1 of 5 different views in the app, and the others connect to the internet just to read blog articles or post them to facebook. If there's a way I can make just one of the view controllers wifi only it would be great. I just think the 5 mb in 5 minutes rule is too rigid. Yes, my app is downloading 17 mb in 5 minutes, but for the rest of the 43 minute audio file, it's downloading nothing. Shouldn't that count for something?

ha, sadly between Apple and AT&T I doubt you have any recourse. You will either have to make the app WiFi only or not release it to the app store.
 

jnic

macrumors 6502a
Oct 24, 2008
567
0
Cambridge
If you control the server then you might find it easier to throttle the connection on the server side. Otherwise you're going to have to write a custom downloader for the client.
 

newtoiphonesdk

macrumors 6502a
Original poster
Jul 30, 2010
567
2
I control the server side, adn that is where the .php is at that will access the .mp3s, but I don't control the server that has the .mp3s. How do you write a custom downloader for it?
 

newtoiphonesdk

macrumors 6502a
Original poster
Jul 30, 2010
567
2
make the mp3's smaller?

They're plenty small already. 1 hour audio and only 17 MB. The issue is that the entire 17 MB is getting downloaded in less than 5 minutes. I just need a way to throttle the bandwidth to only allow 5 MB in a 5 minute time for the app.
 

ulbador

macrumors 68000
Feb 11, 2010
1,554
0
I control the server side, adn that is where the .php is at that will access the .mp3s, but I don't control the server that has the .mp3s. How do you write a custom downloader for it?

Well... since it is in PHP you would just fopen the URL of the MP3, read a set number of bytes and spit them out, then sleep for however long you want. Rinse and repeat.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.