iCloud data sharing to all app users - ios

I wanted to know if icloud could be used as a file sharing database for your application amongst all app users or not. If for example in my app you can save a file on icloud, can anyone who uses my app download it or only the person who has uploaded it??

Using iCloud there are no sharing options - only the user who uploaded data can access it.

Related

How to upload file to iCloud Drive?

In My app I want to upload PDF files to iCloud drive which use can access from URL https://www.icloud.com/#iclouddrive .
I have try mane code like
https://github.com/iRareMedia/iCloudDocumentSync
http://www.raywenderlich.com/6015/beginning-icloud-in-ios-5-tutorial-part-1
http://www.raywenderlich.com/12779/icloud-and-uidocument-beyond-the-basics-part-1
but non of the above help me to upload file to iCloud Drive. Above all example is used to sync files between two device through the app. But I want to upload to Drive so the user can access them with out the app also. I want to implement this form App.

Can we import any file to our application from icloud?

I know users can upload documents to icloud from their applications. I want to access these documents from my application. Is it possible to access any documents in icloud from our application?
According to the official doc: "To locate documents in iCloud storage, your app must search using an NSMetadataQuery object". But I suspect you can't simply access the documents of other apps freely.

Export & Import Documents using iCloud in IOS

I am developing an app that makes user to export core data records into an document using iCloud Drive/iCloud Documents/iCloud Kit and he can able to import and access those document at another device.
I mean Export/Import of documents within devices that are using same application. Documents can be identified by unique document name for importing..
Please Give any suggestions for above task. Which one is more useful..or suggest any other useful links for above task.
1) iCloud Documents. (Documents Storage)
2) iCloud Kit.(Huge/complex amount of data)
3) Key-Value Storage.(Small amount of data)
I have successfully implemented export/import using iCloud Documents. But I am able to access the documents which are exported in same device only. As it stores with local storage..
I used iCloudSync for retrieving the documents.
https://github.com/iRareMedia/iCloudDocumentSync
Now, I am referring iCloud Kit for accessing within same app & multiple devices..
Thanks..!
I have successfully accessed the iCloud Files with same iCloud Account within multiple devices using below code
NSArray *tempArray=[[iCloud sharedCloud] listCloudFiles];
Source: https://github.com/iRareMedia/iCloudDocumentSync
It will retrieve all the iCloud files of same logged in iCloud Account that are exported from various devices..

Can my app let users save some files to iCloud and rest on device

In Apple's Document Based App Development Guide, it emphasizes that our app should let users choose either to save all their files to iCloud or save all on local device. Is there reason for this? Can we actually allow users to pick some files to be saved on iCloud and some to be saved locally, like the TextEdit app on mac OS X? Will App Store disapprove iOS apps configured in this way if it is programmatically possible?
Thanks!
Here is a link
https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/DocumentBasedAppPGiOS/ManageDocumentLifeCycle/ManageDocumentLifeCycle.html#//apple_ref/doc/uid/TP40011149-CH4-SW1
Setting the Preferred Storage Location for Document Files
All documents of an application are stored either in the local sandbox or in an iCloud container directory. A user should not be able to select individual documents for storage in iCloud.
When an application launches for the first time on a device, it should do the following:
If iCloud is not configured, ask users if they want to configure it (and, preferably, transfer them to Launch Settings if they want to configure iCloud).
If iCloud is configured but not enabled for the application, ask users if they want to enable iCloud—in other words, ask if they want all of their documents saved to iCloud. Store the response as a user preference.
Based on this preference, an application writes document files either to the local application sandbox or the iCloud container directory. (For details, see “Moving Documents to and from iCloud Storage.”) An application should expose a switch in the Settings application that enables users to move documents between local storage and iCloud storage.
If it makes sense for your app, there is no reason Apple would care if you save some files locally and some in iCloud. It's not a hard fast rule to be all one way or the other.

how to make my application work with user iCloud to sync his files

here is my requirement:
I have a application running on iOS 5 and I hope my application is able to get access to user iCloud to sync some files and then open it.
for example, user's iCloud has a PDF file, now my application can open PDF file, how to make my application to get access to user's iCloud and sync the PDF file to local device and then open it.
I read some guides, looks like I need to enable iCloud on the provision file with my app Id, but every use has different iCloud app id, should I make a UI to let user input its iCloud user name and pwd ?
could you please show me some steps to get it done ?
now I even can't upload a PDF into my iCloud .
any answer is welcome, thanks in advance.
Yes, you'll need to let the user log into iCloud.

Resources