Does iOS' 8 iCloud Drive enable different users to share files? - ios

C.f. Apple website page on iCloud Drive:
http://www.apple.com/ios/ios8/icloud-drive/
I understand iCloud Drive makes easy for an individual user to save a file to the cloud and work on it from any of his or her own devices, i.e. a solo use case.
My question is: with the new iCloud Drive, can different users, with different Apple accounts (not necessarily in the same family), share and collaborate on files? E.g. Could an iOS 8 app help a bunch of users collaborate on, say, a video editing project where all the heavy raw footage video files are shared on iCloud Drive?

CloudKit is for backend app usage for developers. It has nothing to do with iCloud Drive user accounts. Time will tell how sharing works with iCloud Drive.

Answering my own question: yes, it is possible thanks to CloudKit, c.f.
https://developer.apple.com/icloud/documentation/cloudkit-storage/

Related

Can you get a song onto your iPhone thru your app?

I would like to get songs from my computer to my iPhone inside of my own app. This would be a music playing app that would have the ability to load songs into its own directory from some private source like a laptop or cloud storage.
Example: If I have 100 songs on a Google Drive and I write an iOS app that loads those files from the Google Drive into the apps directory.
iOS, iPhone, Swift.
Yes you can download files into your app's Documents directory, which will be private to your app.
Here's a SO question on downloading a file in Swift/iOS that shows some concrete code examples: How to download file in swift?
You can also find many tutorials online on saving files and making HTTP requests in Swift.
You'll need to determine specifically how to make requests to your file provider e.g. Google Drive. This might involve not only the URL itself but also authentication, SSL validation etc. which are deeper topics in themselves but fully supported in Swift/iOS.
Yes, you can definitely download songs to your phone from your computer. You just have to make a directory area in your app and have the song be fetched into that directory.

How iOS prevent app from stealing files saved in google drive?

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

iCloud Drive vs. iCloud Documents

I am a bit confused. I am using iCloud Drive to store backups from my internal data each time the user clicks 'backup'. This doesn't work as I would like to, because sometimes it just doesn't sync between the devices and users that click restore get's their old backup.
Now I've read about iCloud Documents and that you could trigger a sync manually from there. What's the difference between iCloud Drive and iCloud Documents for me as a developer? I just don't get it..
I am not sure whether it would be better to store backups with iCloud Documents...?
I think iCloud Drive provides the service that user can edit document through specified interface.
In contrast, iCloud Documents Storage provides a kind of service that stores some confidential or unchangeable data for application.
iCloud Drive - Apple's Cloud-Based Service for consumers. Typical known for their ability to sync between different devices through storage in the Cloud.
iCloud Document - A single file of UIDocument type.
iCloud document storage - Service that provides developer access to iCloud for their files which are usually UIDocument type or file packages which are of NSFileWrapper.
iCloud - Cumulative set of Apple's cloud services consisting of iCloud document storage, Key-value storage, CloudKit, Core Data.
So above question is not relevant as they are not comparable technology.

iCloud Integration for uploading and downloading files

I want to design an app which stores documents on iCloud. But there are some question which has answer before doing actual implementation.
The question are as follows,
What is maximum file size to upload on iCloud?
Can I programmatically calculate/know the available space on user's
iCloud account?
How can I get the event for uploading and Downloading files from
iCloud?
Can anyone please help me here ? I read the apple documentation but not understood all the things completely.
Thanks In Advance.
Although you mentioned you've read the apple icloud documentation, the designing for icloud documentation page from Apple is still a good starting point for this question.
File Size Limits
The documentation doesn't specify a Document file size limit, nor a Core Data storage limit, other than a user account icloud storage allowance. There is a limit for Key Value storage which is 1Mb for a value (in a value-key pair), which could be an issue for you, but otherwise it seems you can store large files as long as the user has enough space available.
Given the 5gb default amount and accounting for the default user storage needs (photos, contacts, calendars and the like), you may encounter limits for Document and Core Data storage, like any other app. The file management for icloud page mentions good app behaviour:
Apps that take advantage of iCloud storage features should act
responsibly when storing data in there. The space available in each
user’s account is limited and is shared by all apps. In addition,
users can see how much space is consumed by a given app and choose to
delete documents and data associated with your app. For these reasons,
it is in your app’s interest to be responsible about what files you
store.
Check Available Space Programmatically
No
Upload/Download Events
The file uploading and downloading is handled by the OS. All files are stored locally, it's from this local store that you request/modify/save documents. From the icloud fundamentals page:
When you adopt iCloud, the operating system initiates and manages
uploading and downloading of data for the devices attached to an
iCloud account. Your app does not directly communicate with iCloud
servers and, in most cases, does not invoke upload or download of
data.
See this app coda tutorial for an example of key-value store integration, this Tim Roadley tutorial for Core Data store integration or this Ray Wenderlich tutorial for Document store integration.
Edit: The Document-Based App Programming Guide for iOS provides code snippets for moving files to/from iCloud, uploading and downloading as well as monitoring file changes. See "Downloading Document Files from iCloud" and "Moving a Document to iCloud Storage".

when implementing Dropbox API on iOS app

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.

Resources