Join Todd Perkins for an in-depth discussion in this video Save to iCloud Drive, part of iOS App Development: Apple iCloud API with iOS (2016).
- So let's say you don't just want to save a document.…You want to actually save it into iCloud Drive.…Now, if we were to run the app in the simulator right now…and then open up iCloud Drive in the simulator,…we wouldn't see it there.…And remember, the simulator isn't the only place…where you can see data from iCloud Drive.…If I go to my home screen I can open up iCloud Drive…and I don't see any folders that look like…they belong with our app,…so it looks like that's not happening just yet.…The simulator or device isn't the…only place you can check iCloud Drive.…
You can actually check it through Finder,…If I tab over to Finder and I look in iCloud Drive,…if you don't see it you can always go to Go,…iCloud Drive in Finder and you can navigate there,…and we should see a folder for our application…so we don't see that.…It's not there yet.…All we have to do is go to our code…and make sure that when we're adding that…path component in the file URL…that we just add on the Documents directory.…That is literally all you need to do.…
- Working with iCloud key-value pairs
- Building an example app that accesses iCloud documents
- Saving and loading iCloud documents
- Fetching records with CloudKit