【发布时间】:2013-09-27 11:34:15
【问题描述】:
我正在使用Dropbox Sync API sdk 它显示所有文件夹和文件但我们无法下载文件 我正在使用此代码:
DBFilesystem *filesystem;
DBFile *file = [_filesystem openFile:info.path error:nil];
NSData *imagedata=[file readData:nil];
[fileMan createFileAtPath:Image_filePath contents:**data** attributes:nil];
NSLog(@"flao=%d",[file writeData:imagedata error:nil]);
// it return 1
我正在获取 NSData,但我无法存储在文档目录中。 我检查了以下链接,但没有成功
Dropbox Sync API iOS copy files to app documents
Data syncing with DropBox API and iOS
请帮帮我。
【问题讨论】:
-
你实现了下面的函数吗,你在下面的方法中得到任何值吗我的朋友??? - (void)restClient:(DBRESTClient *)client loadedMetadata:(DBMetadata *)metadata { }
-
@NiravPatel restclient 是核心 api 功能,因此同步应用程序中允许使用此功能
-
尝试检查错误。
NSError *error; NSData *imagedata = [file readData:&error]; if (error) NSLog(@"%@", error.localizedDescription);
标签: iphone ios objective-c dropbox