-
-
Save beelsebob/39c93233d059242421c258ad51eea8c9 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) { | |
if 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