WIP: documentation

This commit is contained in:
John Rommel Estropia
2017-05-10 02:00:47 +09:00
parent 19abedfa9f
commit 8ff163af30
10 changed files with 230 additions and 112 deletions

View File

@@ -29,8 +29,21 @@ import Foundation
// MARK: - LegacyXcodeDataModelSchema
/**
The `LegacyXcodeDataModelSchema` describes models loaded directly from an existing `NSManagedObjectModel`. It is not advisable to continue using this model as its metadata are not available to CoreStore.
*/
public final class LegacyXcodeDataModelSchema: DynamicSchema {
/**
Initializes a `LegacyXcodeDataModelSchema` from an `NSManagedObjectModel`.
```
CoreStore.defaultStack = DataStack(
LegacyXcodeDataModelSchema(modelName: "MyAppV1", model: model)
)
```
- parameter modelName: the model version, typically the file name of an *.xcdatamodeld file (without the file extension)
- parameter model: the `NSManagedObjectModel`
*/
public required init(modelName: ModelVersion, model: NSManagedObjectModel) {
self.modelVersion = modelName