检索文件parse.com的URL

时间:2014-08-05 07:53:02

标签: ios objective-c parse-platform

我正在尝试取回刚刚保存的文件的网址。但是,他们的文档中找到的getUrl()方法似乎不起作用。我收到错误:

在'PFFile *'

类型的对象上找不到属性'getUrl'

我的代码:

int count = 0;    
PFObject *obj = [PFObject objectWithClassName:@"File"];
    for (NSString* currentString in directoryContents){

        NSString *temp2 = [temp stringByAppendingPathComponent:currentString];
        PFFile *file = [PFFile  fileWithName:currentString contentsAtPath:temp2];
        [file saveInBackground];


        count += 1;

        NSString *filen = [NSString stringWithFormat:@"file%i",count];
        NSLog(@"%@",filen);


        [obj setObject:file forKey:filen];
        NSString* url = file.getUrl();
    }

        [obj saveInBackground];

1 个答案:

答案 0 :(得分:3)

您希望将file.url用作documented