我正在使用OneDriveSDK for iOS。我找不到任何文件的流路径。
答案 0 :(得分:1)
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
__block NSString *streamablePath = @"";
ODClient *client = [ODClient loadCurrentClient];
ODItemRequest *request = [[[client drive] items:item.path] request];
[request getWithCompletion:^(ODItem *response, NSError *error) {
if (!error)
{
streamablePath = [[response dictionaryFromItem] objectForKey:@"@content.downloadUrl"];
dispatch_semaphore_signal(sema);
}
}];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
return streamablePath;