Alex Smolov
Alex Smolov

Reputation: 1861

Sync all Documents directory into iCloud

Is there a way to make my Documents directory synchronized with iCloud?

I have setup all permissions and entitlements, but have no idea what to do next.

Could you please provide a swift code snippet or point into a direction I should look to?

Upvotes: 11

Views: 6332

Answers (4)

Istvan
Istvan

Reputation: 1249

The following 3 steps should get you going:

Step 1: Preparing the app to use iCloud Storage

Step 2: Learing to manage your files using the UIDocument Class

Step 3: Using iCloud Storage in your app

Cheers, Istvan

Upvotes: 2

Vidhyanand
Vidhyanand

Reputation: 5369

You can use iCloudDrive of iOS 8 to store documents in iCloud Drive..

Refer below links for iCloud set up for your app.

https://unionassets.com/iosnative/icloud-setup-25

http://www.raywenderlich.com/83116/beginning-cloudkit-tutorial

Refer below for saving document to iCloudDrive.

Save iOS 8 Documents to iCloud Drive

Refer below to view the documents which you have saved in iCloudDrive

https://github.com/iRareMedia/iCloudDocumentSync

Hope all the above links are useful to get the task done..!

Upvotes: 2

cdf1982
cdf1982

Reputation: 813

When I needed to keep NSUserDefaults in sync via iCloud in simple apps, I used: MKiCloudSync by Mugunth Kumar. While still Objective-C, it's pretty straightforward to use.

If you need iCloud Documents sync, you might check out iRareMedia/iCloudDocumentSync. Of course, this is a bit more work, but still easier than implementing all the methods by yourself.

Have a nice day,

@cdf1982

Upvotes: 2

Razvan
Razvan

Reputation: 4122

You can use iCloud's CloudKit services for this.

Have a look at the Quick Start Guide for iCloud's Cloudkit here.

Upvotes: 2

Related Questions