Latest 0.1.2
Homepage https://github.com/kostiakoval/Seru
License MIT
Platforms ios 8.0, requires ARC
Dependencies Sweet
Authors

Seru (セル)

Build Status
[CocoaPods]()
Carthage compatible
License
Platform

Core Data in Swift.

Seru (Cell in Japanese) is a clean and beautiful Core Data stack in Swift.
Seru is design to be light and fast and to fit all type of applications.

Use example: Setup Core Data in 1 line of code Seru()
and insert object in background.

let seru = Seru()

seru.performBackgroundSave({ context in
  let person = Person(managedObjectContext: context)
  person.name = "Petter"
}

Usages

Setup CoreData

class AppDelegate: UIResponder, UIApplicationDelegate {            
  lazy var seruStack = Seru()
  ...
}

Actions

Save

var seruStack: Seru
seruStack.persist()

Perform background save.
All the changes will be saved to the context

seruStack.performBackgroundSave({ context in
  let person = Person(managedObjectContext: context)
}

Perform background work

seruStack.performInBackgroundContext { context in
  let fetch = NSFetchRequest(entityName: "Person")
  var error: NSError?
  let result = context.executeFetchRequest(fetch, error: &error)
}

Installation

CocoaPods

Seru is available through CocoaPods. To install :

  • Install latest version of cocoapods [sudo] gem install cocoapods --pre
  • Add the following line to your Podfile:
use_frameworks!
pod 'Seru'

Carthage

Installation is available using the dependency manager Carthage.

  • Install Carthage brew install carthage
  • Add the following line to your Cartfile file
github "kostiakoval/Seru"
  • Run carthage update
  • Add Seru.framework (from Carthage/build directory) to your project.

Submodules

mkdir Vendor # you can keep your submodules in their own directory
git submodule add [email protected]:kostiakoval/Seru.git Vendor/Seru
git submodule update --init --recursive

TODO

  • [ ] CoreData Stack with background saving context
  • [ ] Background data importer stack
  • [ ] Error handler with UIAlertView
  • [ ] Creating child contexts
  • [ ] Differents CoreData Stacks support

Author

Kostiantyn Koval
@KostiaKoval

License

Seru is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Seru",
    "version": "0.1.2",
    "summary": "Seru is Simple Core Data stack",
    "description": "Seru is Swift framework for working wit Core Data. It setup your core data stack and ngives you nice actions to work with it",
    "homepage": "https://github.com/kostiakoval/Seru",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kostiantyn Koval": "[email protected]"
    },
    "social_media_url": "http://twitter.com/kostiakoval",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/kostiakoval/Seru.git",
        "tag": "0.1.2"
    },
    "source_files": "Seru/Classes/**/*.{swift}",
    "requires_arc": true,
    "dependencies": {
        "Sweet": []
    }
}

Pin It on Pinterest

Share This