I upload a sqlite database to google drive. And now I would like to download it. So I tried to download it from Google Drive to my Swift Project but it is being downloaded in GTLRDataObject Data format. How can I get the file into sqlite database format? The sqlite files comes as Data format from Google drive. I used the following to download my sqlite database file from google drive.
Global.googleDriveService.executeQuery(GTLRDriveQuery_FilesGet.queryForMedia(withFileId: "\((result as? GTLRDrive_File)?.identifier ?? "")"))
{ (ticket, file, error) in
guard let data = (file as? GTLRDataObject)?.data else {
return
}
print("Download data: - \(data)")
}