How to upload file to iCloud Drive? - ios

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.

Related

How to access all the iCloud drive files (outside app container) without UIDocumentPickerViewController?

I need to make an app that fetches data from iCloud Drive (outside app container, all the user files stored in the iCloud) and shows it in UICollectionView. Is it possible without UIDocumentPickerViewController?
You can do the same using the iCloud integration. with iCloud integration you can upload and get the data from iCloud here are some reference tutorial to kickstart.
https://www.raywenderlich.com/1000-cloudkit-tutorial-getting-started
https://iosdevcenters.blogspot.com/2017/03/icloud-integration-in-swift-30.html

iCloud drive - is it possible to access user files

I configured my IOS project to work with iCloud drive. Now I'm able to store and read files from my app's ubiquitous container.
Is it however possible to access also files from root directory of iCloud?
Let's assume the user put some movie file into his iCloud Drive folder on Mac. The movie file can be now seen and downloaded using iCloud Drive application on Iphone. Can I also access this file from my application?
Or, to put it in other way, can I query for and access files uploaded by user to his iCloud root folder?
Edit:
From my investigation it looks that the only way to access these files is using UIDocumentPickerViewController. I didn't find any solution to access the files programatically so that I can filter them and display to user using custom UI.

Upload files from dropbox/box account to my server using an iphone app

I have an api to upload files to my server. I need to make iphone an app to transfer files from dropbox to my server.
My question is
Do I necessarily need to download the files from dropbox/box account to iphone and then upload to my server using my api?
Or Can I skip the part of downloading the files to the device and directly upload from a dropbox/box account to my custom server?
Or Optionally keep only few files in sync between the iphone and dropbox, and upload the local copy of file to my server?
Or is there any other way of doing it?
Thanks in advance.
If the user has authorized the Dropbox API app on the iPhone app itself, and so the Dropbox API access token resides there, one solution is to have the iPhone app make an API call to /media (in the official Dropbox iOS Core SDK this is loadStreamableURLForFile). This will return a temporary direct link to the file contents. You can then pass that link to your server and do the downloading there.

iCloud data sharing to all app users

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.

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