根据分析文档的Files部分,要保存PFFile,我们应该遵循以下步骤:
创建PFFile
将PFFile保存到云中
保存完成后,将PFFile与PFObject关联
我很难想象第2步。下面是他们提供的示例代码,我试图自己运行:
//1. Creating the PFFile
let str = "Working with Parse is great!"
let data = str.dataUsingEncoding(NSUTF8StringEncoding)!
let file = PFFile(name: "resume.txt",