I am working with download files from google drive. But I am facing lots of issues using google SDK. In developer.google.com there is some examples are available.
GTLServiceDrive *drive = ...;
GTLDriveFile *file = ...;
GTMHTTPFetcher *fetcher = [drive.fetcherService fetcherWithURLString:file.downloadUrl];`
`[fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) {
if (error == nil) {
NSLog(@"Retrieved file content");
// Do something with data
} else {
NSLog(@"An error occurred: %@", error);
}
}];
I have downloaded new sdks from developer.google.com
site, but in above example given GTMHTTPFetcher *fetcher = [drive.fetcherService fetcherWithURLString:file.downloadUrl];
. But in new SDK,in this GTLDriveFile
there is no downloadURL
object.
And in another example it is asking for client secret key, but when I am selecting type of iOS then there is no option for client secret key. But when I am choosing web that time it is showing. but it is not working.
Please help me how to download file from google drive in iOS using objective c.
downloadURL
object. Please double check if you are using the right resource. SeedownloadURL
– gerardnimo