Join Todd Perkins for an in-depth discussion in this video Working with cloud document URLs, part of iOS App Development: Apple iCloud API (2013).
Before we can instantiate our Cloud document, we're going to need to grab a URL…for the appropriate file.…Let's scroll down, and we're going to create a method in the data class at the…bottom that is again going to be a static method and it will return an NSURL, and…we'll call it notesURL.…The reason why we're creating a method for this is because we're going to be…using this repeatedly throughout our code.…So create an NSURL inside the method called URL.…And then we're going to set it equal to NSFileManager defaultManager…URLForUbiquityContainerIdentifier.…
Now the string here that you would pass in is your ID that you put inside of…your project when you connected it to iCloud.…This would enable you to have multiple apps that can communicate with each other…through iCloud data.…So you could have shared documents for different apps.…Since we're not doing that here I'm going to type nil.…On the next line we're going to return url URLByAppendingPathComponent.…
The path component that you append is going to be the name of the file or folder…
- Understanding the class structure of an app
- Building the data model and constants
- Making your app compatible with the Apple Developer portal
- Connecting to iCloud
- Understanding the UIDocument class
- Handling document metadata class
- Opening, closing, saving, and deleting documents from iCloud
Skill Level Intermediate
iOS 6 App Development New Featureswith Simon Allardice2h 29m Intermediate
1. Building the Note-Taking App
2. Preparing the App to Use iCloud
3. Working with iCloud Key-Value Pairs
4. Working with iCloud Documents
Next steps2m 41s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.