documentation updates

This commit is contained in:
John Rommel Estropia
2016-07-11 02:04:18 +09:00
parent 4f46cbded9
commit 921b85d91b
9 changed files with 66 additions and 50 deletions

View File

@@ -288,16 +288,18 @@ public final class DataStack {
/**
Adds a `CloudStorage` to the stack and blocks until completion.
```
try dataStack.addStorageAndWait(
ICloudStore(
ubiquitousContentName: "MyAppCloudData",
ubiquitousContentTransactionLogsSubdirectory: "logs/config1",
ubiquitousContainerID: "iCloud.com.mycompany.myapp.containername",
ubiquitousPeerToken: "9614d658014f4151a95d8048fb717cf0",
configuration: "Config1",
cloudStorageOptions: .AllowSynchronousLightweightMigration
)
)
guard let storage = ICloudStore(
ubiquitousContentName: "MyAppCloudData",
ubiquitousContentTransactionLogsSubdirectory: "logs/config1",
ubiquitousContainerID: "iCloud.com.mycompany.myapp.containername",
ubiquitousPeerToken: "9614d658014f4151a95d8048fb717cf0",
configuration: "Config1",
cloudStorageOptions: .RecreateLocalStoreOnModelMismatch
) else {
// iCloud is not available on the device
return
}
try dataStack.addStorageAndWait(storage)
```
- parameter storage: the local storage