License MIT
Platforms ios 11.0, requires ARC

CocoaPods compatible
Carthage compatible
Build Status


An easy to use CoreData wrapper in Swift.


DataKit requires Swift 5.0 and Xcode 10.2.



You can use CocoaPods to integrate DataKit with your project.

Simply add the following line to your Podfile:

pod "AUCoreDataKit"

And run pod update in your project directory.


Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate NetKit into your Xcode project using Carthage, specify it in your Cartfile:

github "azizuysal/AUCoreDataKit"

Run carthage update to build the framework and drag the built DataKit.framework into your Xcode project.


You can integrate DataKit manually into your project simply by dragging DataKit.framework onto Linked Frameworks and Libraries section in Xcode.


Optionally configure DataKit if the defaults are not suitable for your use case. DataKit automatically merges and uses CoreData models created in Xcode and uses Application name to name its database file:

    var config = DataKit.Configuration()
    config.dbUrl = FileManager.default.urls(for: .libraryDirectory, in: .userDomainMask).first!.appendingPathComponent("test.db")
    return config

You must call this method once to load data stores for CoreData. You can start using DataKit as soon as the data stores are loaded in the callback. If there was an error, the error parameter will contain the details.

DataKit.loadStores { error in
  // your code here

Afterwards, you can start using convenient methods on your model classes to interact with core data store:

var story =
story.title = "DataKit IS Great!"

Or use JsonLoadable protocol to load data from a web api:

Story.execute(in: DataKit.newPrivateContext()) { context in
    print("Saving story (id)")
    Story.insertOrUpdateOne(storyJson, in: context, idKey: "id", idColumn: "storyId", idType: Int32.self)

Refer to the example project for more usage examples.

Please email me if you’d like more examples and/or additional features.


The MIT License (MIT)

Latest podspec

    "name": "AUCoreDataKit",
    "version": "",
    "summary": "An easy to use CoreData wrapper in Swift.",
    "description": "An easy to use CoreData wrapper in Swift. Just add your CoreData model in Xcode and you're good to go!",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": ""
    "authors": {
        "Aziz Uysal": "[email protected]"
    "social_media_url": "",
    "source": {
        "git": "",
        "tag": ""
    "platforms": {
        "ios": "11.0"
    "requires_arc": true,
    "swift_version": "5.0",
    "source_files": "DataKit/DataKit/*.{swift}"

Pin It on Pinterest

Share This