问题
I integrated dropbox core API with two of my iOS apps. Successfully. A few weeks ago, it was working fine. But now when I run those apps on devices with iOS 5.0 or iOS 4.2, and try to call the uploadFile: API, I get this error:
error making request to /1/files_put/sandbox/abc.xyz - (-1021) Error Domain=NSURLErrorDomain Code=-1021 "The operation couldnÕt be completed. (NSURLErrorDomain error -1021.)" UserInfo=0x28af00 {destinationPath=/abc.xyz, sourcePath=/var/mobile/Applications/FB0373C9-...C4F0874D40/Documents/abc.xyz}
where abc.xyz is the file name I am trying to upload.
-1021 error code usually comes in case of authentication failure while uploading. That too AFTER the file has been uploaded. But this time it appears even before the upload starts.
I tried loadMetadata: API, it works fine, and returns the metadata.
On 2 devices with the latest iOS installed, dropbox upload works fine. I tried updating to latest SDK, but even then it doesn't work.
回答1:
You can check this build it works fine with me in iOS 5,6 from Dropbox Forum
Also you can download the build from Here
来源:https://stackoverflow.com/questions/16075213/dropbox-core-api-1021-error-before-upload-only-in-ios-5-and-below