我正在尝试使用Office 365 SDK for iOS 使用他们的示例演示读取文件,我能够获取文件列表。
现在我被困在我想读取文件内容的地方,下面给出的是正在使用的代码
MSSharePointFile* fileToRead = [self.Files objectAtIndex:indexPath.row];
[BaseController getClient:^(MSSharePointClient * client) {
MSSharePointItemFetcher *fetcher = [[client getfiles] getById:fileToRead.id];
MSSharePointFileFetcher *fileFetcher = [fetcher asFile];
[[fileFetcher read:^(MSSharePointFile *file, MSODataException *error) {
NSLog(@"%@",file.contentUrl);
// download item from content URL
//Am stuck at this point
}] resume];
我能够获取所选文件的 contentURL,但我被困在接下来需要做什么来提取文件文本。我遍历了文档但失败了。
请帮我解决这个问题。
谢谢