Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesquires committed Apr 4, 2016
1 parent d7d97a0 commit 46c1274
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,17 @@ do {
}
````

#### Checking migrations
#### Performing migrations

````swift
let bundle = NSBundle(identifier: "com.MyApp.MyModelFramework")!
let model = CoreDataModel(name: "MyModel", bundle: bundle)
if model.needsMigration {
// do migration
do {
try migrate(model)
} catch {
print("Failed to migrate model: \(error)")
}
}
````

Expand Down

0 comments on commit 46c1274

Please sign in to comment.