简体   繁体   中英

DROPBOX- Error Domain=NSURLErrorDomain Code=-1001

I am trying to download some of the audio files from dropbox to my app. When the audio files are minimum upto 4 or 5 audiofiles the download doesn't cause any problem. But when it has greater than 5 audio files it cause error 1001. I searched for this issue and i found this is because of TIMEOUT .

[WARNING] DropboxSDK: error making request to /1/files/dropbox/xxx/xxx/xxx.ima4 - Error Domain=NSURLErrorDomain Code=-1001 "The operation couldn’t be completed. (NSURLErrorDomain error -1001.)" UserInfo=0x851b0a0 {path=/xxx/xxx/xxx.ima4, destinationPath=/Users/siva/Library/Application Support/iPhone Simulator/5.1/xxx/xxx/Library/TempAttachment/xxx/xxx.ima4}

What can i do now? Any soution please

What SDK are you using? (Core or Sync?)

If you're using the Core API and kicking off all these downloads in parallel, that may be the cause of the problem. You should consider doing the downloads one at a time (or a small number at a time) to avoid requests getting blocked on the limited bandwidth of the device.

The issue is that the number of concurrent requests is to high.

You need to use something like an NSOperationQueue to limit the number of request made at any one time. Failing to do so you get the timeout -1001

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM