unable to download all songs from server
in my app i am having a button called download all clicking on which i have to download all songs present on my server. i am able to download one song at a time. Be开发者_JAVA百科low is my code:
NetworkManager *manager = [[NetworkManager alloc] init];
NSString *Mp3filePath = [manager GetFile:SongUrl];
NSLog(@"aaaaa");
SongUrl= [[NSString alloc] initWithString:@"my URL"];
NSLog(@"aaaaa");
NSLog(@"songurl--%@",SongUrl);
steps to consider:
- Download a list of songs
- Compose this list of songs into URLs (if they aren't already)
- Iterate over the list of songs, downloading them one by one.
- If process is interrupted (network lost or user cancel), record what you have downloaded, so you can resume again.
精彩评论