从应用程序创建Dropbox中的文件夹

时间:2013-04-18 10:42:41

标签: iphone ios dropbox

我正在制作iPhone应用程序,我需要集成Dropbox SDK。我在Dropbox中创建文件夹时遇到错误。请任何人都可以告诉我如何创建文件夹。

这是我的代码

(DBRestClient*)restClient { 
 if (restClient1 == nil) {
    restClient1 = [[DBRestClient alloc] initWithSession:[DBSession sharedSession]];
    restClient1.delegate = self; }
    return restClient1; }

(IBAction)folderCreateMethod:(id)sender {
  [[self restClient] createFolder:@"/YourFolder"];

   }

我收到以下错误

-[__NSCFConstantString stringByAddingURIPercentEscapesUsingEncoding:]: unrecognized selector sent to instance 0x2fe5c

1 个答案:

答案 0 :(得分:1)

stringByAddingURIPercentEscapesUsingEncoding不是NSString的方法,但可能在类别中定义。

要使用另一个库中定义的类别 - 其中DBRestClient是 - 您必须将-ObjC标志传递给链接器(在xcode中)