Skip to content

Commit 7ce9913

Browse files
omerfarukyilmazPedro Piñera Buendía
authored and
Pedro Piñera Buendía
committedAug 7, 2017
Fix README.md "How to use" examples (#340)
1 parent 9bb457b commit 7ce9913

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
 

‎README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ A storage represents your database. The first step to start using SugarRecord is
6363
```swift
6464
// Initializing CoreDataDefaultStorage
6565
func coreDataStorage() -> CoreDataDefaultStorage {
66-
let store = CoreData.Store.Named("db")
67-
let bundle = Bundle(forClass: self.classForCoder())
68-
let model = CoreData.ObjectModel.merged([bundle])
66+
let store = CoreDataStore.named("db")
67+
let bundle = Bundle(for: self.classForCoder)
68+
let model = CoreDataObjectModel.merged([bundle])
6969
let defaultStorage = try! CoreDataDefaultStorage(store: store, model: model)
7070
return defaultStorage
7171
}
@@ -78,10 +78,11 @@ SugarRecord supports the integration of CoreData with iCloud. It's very easy to
7878
```swift
7979
// Initializes the CoreDataiCloudStorage
8080
func icloudStorage() -> CoreDataiCloudStorage {
81-
let bundle = Bundle(forClass: self.classForCoder())
82-
let model = CoreData.ObjectModel.merged([bundle])
81+
let bundle = Bundle(for: self.classForCoder)
82+
let model = CoreDataObjectModel.merged([bundle])
8383
let icloudConfig = CoreDataiCloudConfig(ubiquitousContentName: "MyDb", ubiquitousContentURL: "Path/", ubiquitousContainerIdentifier: "com.company.MyApp.anothercontainer")
84-
return CoreDataiCloudStorage(model: model, iCloud: icloudConfig)
84+
let icloudStorage = try! CoreDataiCloudStorage(model: model, iCloud: icloudConfig)
85+
return icloudStorage
8586
}
8687
```
8788

0 commit comments

Comments
 (0)
Please sign in to comment.