我正在尝试取回刚刚保存的文件的网址。但是,他们的文档中找到的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];