UIDocument is a robust way to model user-generated content in your app. See how to easily integrate your app’s documents with iCloud, file extensions, and document browsers. Learn how to build a document-based app from the ground up.
ShapeEdit: Building a Simple iCloud Document App
WWDC 2015 > App Frameworks > Building Document Based Apps