Database Reference
In-Depth Information
URL Publishing
iCloud also lets you request a public URL of your document. By using this URL you can allow others
to view the file by sending the URL through other mediums such as e-mail and iMessage. It is
important to note that the URL takes the user to a snapshot of the file at that moment in time. If the
document is changed it will not be reflected by that previously generated URL. A new URL would
need to be created to show that change. The URLs generated by the iCloud API are also only valid
for a specific state and they are not permanent. The URL expires naturally over time.
Ubiquity Identity Token
The Ubiquity Identity Token is a token that is provided to you by the iCloud Storage API. The token
references a particular user on a device within your app. This means that if you are signed into two
different devices, the Ubiquity Token is different. Also, a token for a user in your app is not the same
as the token of the same user in another app. You can use the Ubiquity Identity token to first confirm
that the user has iCloud set up for their account. It can also be used to determine if a different user
is now using your app on the same device.
Types of Documents
There are three types of documents supported with iCloud Document Storage. They are files,
packages, and Core Data.
Files can be any of the UNIX file types, as well as symlinks and directories.
Packages on the other hand are multiple files in a single directory. A package
consists of smaller individual files. Because of this granularity within the
package, iCloud ends up sending fewer updates to the file as a whole.
The third type is Core Data. Your Core Data store remains local, but your change
logs are what is sent to iCloud.
Modifying Our Current Project for UIDocument Support
Now that I have explained what document storage is, we need to get our test application modified so
that we can start adding the use of UIDocument inside it. We will be adding a UITabBarController as the
root view of our app to divide our sections. Then we will add a UICollectionView to hold our documents.
Modifying the Storyboard
Let's get started.
Select the Main.storyboard to open the storyboard editor.
1.
Select the MainViewController so that it is highlighted.
2.
3.
In the Xcode menu select Editor ➤ Embed In ➤ Tab Bar Controller. A new
Tab Bar Controller is added to the storyboard that already has the first tab set
as Main View Controller.
 
Search WWH ::




Custom Search