File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,9 @@ A storage represents your database. The first step to start using SugarRecord is
63
63
``` swift
64
64
// Initializing CoreDataDefaultStorage
65
65
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])
69
69
let defaultStorage = try ! CoreDataDefaultStorage (store : store, model : model)
70
70
return defaultStorage
71
71
}
@@ -78,10 +78,11 @@ SugarRecord supports the integration of CoreData with iCloud. It's very easy to
78
78
``` swift
79
79
// Initializes the CoreDataiCloudStorage
80
80
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])
83
83
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
85
86
}
86
87
```
87
88
You can’t perform that action at this time.
0 commit comments