Last active
May 13, 2016 05:50
-
-
Save jhoughjr/27ba04f758f7eecbc4ec4b2f6627f32a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func migrate(noteManager:NoteManager) { | |
let coreDataNotes = GNNote.MR_findAll() ?? [] | |
for case let note as GNNote in coreDataNotes { | |
if let bundleID = note.appBundleID, docPath = note.documentPath, content = note.content where !content.string.isEmpty { | |
noteManager.createNote(bundleID, docID: docPath, content: content) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment