Categories
Featured iPhone Development Resources iOS Development Libraries Open Source iOS Libraries And Tools Swift

Extensive Open Source Swift Based Core Data Wrapper With A MagicalRecord And Linq Inspired Syntax

Last month I mentioned an interesting faster than SQLite database with code based queries and support for Swift language features called Realm.

Here’s a library submitted by Vanderlei Martinelli called AlecrimCoreData that provides a Swift based wrapper for Core Data inspired by MagicalRecord and Linq.

AlecrimCoreData provides extensive features for fetching, creating, updating and saving entities and allows you to easily fetch and save entities in a background thread if desired.

Here’s an example from the readme showing how to do some basic core data fetching:

for person in db.people {
    println(person.firstName)
}

And a fetching example skipping and taking some results:

let people = db.people.skip(3).take(7)

You can find AlecrimCoreData on Github here.

A nice library for working with Swift in Core Data.