I'm creating an application that collects data from a bluetooth peripheral. When all of the data is collected I want to upload my data, which is in the format of a .txtfile, to a google drive account for processing.
I have looked at this method and it doesn't really seem to fit the purpose
https://developers.google.com/drive/v3/web/quickstart/ios?ver=objc
Is there anyway way I can do this in Objective-C? I have searched everywhere and I cannot seem to find something.
An easy way is to leverage the CloudRail SDK for Google Drive. Here is how you would upload a file:
CRGoogleDrive * service = [[CRGoogleDrive alloc] initWithClientIdentifier:#"[Google Drive Client Identifier]"
clientSecret:#"[Google Drive Client Secret]"
redirectUri:#"http://localhost:12345/auth"
state:#"someState"
];
[service uploadFileToPath:#"/myFolder/myFile.png"
stream:readableStream
size:1024
overwrite:true
];
Yes, You can upload a text file to google drive. Please look up to this post.
IOS: How to upload a file to specific Google drive folder using Google drive sdk library
You can upload .txt and other type of file on google drive. You can go through from this tutorial Google Drive Integration in iOS apps and
Uploading a file to Google drive using iOS sdk
Or
Refer Introduction to the Google APIs Client Library for Objective-C for RESTfor detail explanation.
Related
Apple's Files app treats google drive as a folder and operates files saved in google drive in the same ways as local files saved on the phone. See "Use the Files app on your iPhone, iPad, and iPod touch".
It is convenient, e.g., if want to send a file saved in google drive to a friend via iMessage, just browse into the google drive, select file and send. I sent files via another applications also.
Now the question comes: what if an app on the phone wants to steal files saved in my google drive?
I think this concern is common, as I trust google drive before because it has two-steps verification, I save some personal files in google drive. But now if I install google drive on my iphone, together with some other social communicators, it looks like the files in google drive can be easily get accessed by them. I don't feel safe anymore. There is a lot of discussion.
How does iOS prevent bad app from stealing files saved in google drive, or DropBox?
Apps cannot simply access Google Drive. They must do so through a UIDocumentPickerViewController which requires user interaction
I'd like to know how I can pull a file from Google Drive, specifically a document file. I'd also like a way to display this document on an application. Does anyone know a way that this can be achieved?
I've heard something about a Google Drive API, but I've never really figured out how it works.
If anyone could tell me how I can do this, that'd be great. Keep the questions simple as I'm quite new with Objective-C and iOS.
I'm currently using XCode to build this application.
You can integrat the google drive to your app,for that you need the help of google Drive API for iOS.
Below link is the introduction to the API's
Introduction to the Google Drive Platform for iOS
Drive API for iOS
Google Drive Integration in iOS app this tutorial helps you for integration.
Apologies if this is a rubbish question, but it's something I've never had to give much thought and I'm short on time. I have a Web App which is required to run offline and on iOS. This Web App has a lot of content consisting mainly of videos. One solution we are thinking of is to utilise DropBox's or Google Drive's API's to download the content and access it.
The main issue with this is whether you can access a native app (DropBox or Google Drive) from a browser or Web App. Does anyone know if this is possible?
Ideas so far are:
Access Drop Box or Google Drive native app from a web app (not sure if this is possible and is the current question)
Wrap up the web app to make it a hybrid native app using something like Phone Gap (this is plan B but will have its own issues)
Convert to a Google Chrome App to get improved access to Google Drive API (not sure how this would function on iOS)
Start from scratch and build a native iOS app (a longer term solution)
Thanks
Chris
Late, but maybe helpful: www.cloudrail.com
It's a useful Javascript library to access the Dropbox and Google Drive API
We ended up making a hybrid app using PhoneGap for iOS.
I am able to upload a file with google drive iOS sdk now.
Basically using "GTLService executeQuery".
I get this from the Google Drive iOS sample
But it is not a resumable upload. If the network fail when I upload a big file, the upload will start again from the beginning.
I know how to make a resumable upload with this method
But can I make a resumable upload with google drive iOS sdk?
It seems that I can only make it happen with NSURLConnection.
I just started implementing Dropbox API on my iOS app.
Last time, when I played around with iCloud a bit, I found that Apple recommended an app save the data either locally or on iCloud, not on both.
I remember the code for data transition when user switching the setting between local and iCloud was a bit difficult.
Does this apply to Dropbox, too?
So, when the user chose Dropbox option, should I save all data through Dropbox API exclusively?
or could I save one copy through Dropbox and another through native iOS code?
Thanks for your help in advance!
Which API?
For both files (Sync API) and datastores (Datastore API), the iOS SDK will cache data locally on the device as well as store it in the cloud, so there's really nothing to do aside from use the SDK.