Objective c- [ERROR] DBRequest#connectionDidFinishLoading:将临时文件移动到所需位置时出错:

时间:2014-03-29 10:38:16

标签: objective-c xcode cordova

尝试将文件从dropbox app文件夹下载到iphone时显示错误和警告。这是我的代码

-(void) download:(CDVInvokedUrlCommand*)command
   { 
 CDVPluginResult* pluginResult = nil;

NSLog(@"Dropbox restore method is executing");

 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,         NSUserDomainMask, YES);

NSString *documentsDirectory = [paths objectAtIndex:0]; // Get documents directory

NSString *localPath = [documentsDirectory stringByAppendingPathComponent:@"key.txt"];

NSString *dropBoxFile = @"/key.txt";

[[self restClient]  loadFile:dropBoxFile intoPath:localPath];

 pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];

 self.restoreJavaScript = [pluginResult toSuccessCallbackString:command.callbackId];
 }

错误详细信息:[错误] DBRequest#connectionDidFinishLoading:将临时文件移动到所需位置时出错:无法完成操作。 (可可错误512。)

警告:[警告] DropboxSDK:向/1/files/sandbox/key.txt发出错误请求 - (512)错误域= NSCocoaErrorDomain代码= 512"操作无法完成。 (可可错误512。)"

任何人都可以搞清楚什么是错误的! :(

0 个答案:

没有答案