Latest 1.0.1.0
Homepage https://github.com/azizuysal/AUCoreDataKit
License MIT
Platforms ios 12.0, requires ARC
Authors

Language
CocoaPods compatible
Carthage compatible

DataKit

An easy to use CoreData wrapper in Swift.

Requirements

DataKit requires Swift 4.1 and Xcode 9.4.

Installation

CocoaPods

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

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.

Manually

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

Usage

Configure DataKit to use the CoreData model you created in Xcode:

DataKit.configure({
    var config = DataKit.Configuration()
    config.dbModel = NSManagedObjectModel(contentsOf: Bundle.main.url(forResource: "DataModel", withExtension: "momd")!)!
      return config
    })

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

var story = Story.new()
story.title = "DataKit IS Great!"
story.save()

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

Story.execute { 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.

License

The MIT License (MIT)

Latest podspec

{
    "name": "AUCoreDataKit",
    "version": "1.0.1.0",
    "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": "https://github.com/azizuysal/AUCoreDataKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "Aziz Uysal": "[email protected]"
    },
    "social_media_url": "https://twitter.com/azizuysal",
    "source": {
        "git": "https://github.com/azizuysal/AUCoreDataKit.git",
        "tag": "1.0.1.0"
    },
    "platforms": {
        "ios": "12.0"
    },
    "requires_arc": true,
    "swift_version": "4.2",
    "source_files": "DataKit/DataKit/*.{swift}"
}

Pin It on Pinterest

Share This