Ios GoogleDrive文件下载问题

Ios GoogleDrive文件下载问题,ios,google-drive-api,Ios,Google Drive Api,我可以从GoogleDrive API下载文件。 使用以下代码 NSString *url = [NSString stringWithFormat:@"https://www.googleapis.com/drive/v3/files/%@?alt=media", identifier]; GTMSessionFetcher *fetcher = [self.service.fetcherService fetcherWithURLS

我可以从GoogleDrive API下载文件。 使用以下代码

    NSString *url = [NSString stringWithFormat:@"https://www.googleapis.com/drive/v3/files/%@?alt=media",
                     identifier];

    GTMSessionFetcher *fetcher = [self.service.fetcherService fetcherWithURLString:url];
    [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) {
        if (error == nil) {
            NSLog(@"Retrieved file content");
            // Do something with data

            UIImage *img = [UIImage imageWithData:data];
            NSLog(@"%@", img);

        } else {
            NSLog(@"An error occurred: %@", error);
            [self showErrorAlert:error];
        }
    }];
工作正常。(从数据中获取图像)

现在它无法合成图像

            UIImage *img = [UIImage imageWithData:data];
            NSLog(@"%@", img);

它为空。

您想在日志中显示什么?我想使用图像。JU正在记录它以获取信息。您想在日志中显示什么?我想使用图像。JU正在记录它以获取信息。