I work with download files from Google Drive. But I ran into a lot of problems using the Google SDK. There are several examples on developers.google.com.
GTLServiceDrive *drive = ...;
GTLDriveFile *file = ...;
GTMHTTPFetcher *fetcher = [drive.fetcherService fetcherWithURLString:file.downloadUrl];`
`[fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) {
if (error == nil) {
NSLog(@"Retrieved file content");
} else {
NSLog(@"An error occurred: %@", error);
}
}];
I downloaded the new sdks from the site developer.google.com, but the above example is given GTMHTTPFetcher *fetcher = [drive.fetcherService fetcherWithURLString:file.downloadUrl];. But GTLDriveFilethere is no object in the new SDK downloadURL.
And in another example, it asks for the client’s secret key, but when I select the iOS type, then there is no key for the client’s secret key. But when I select the web, this time is shown. but it does not work.
Please help me download a file from Google Drive in iOS using target c.
source
share