Latest 0.1.1
License MIT
Platforms watchos 2.0, ios 8.0, osx 10.9, requires ARC


Build Status

ObjectStorage is a framework that make CRUD works on your model entities, you may choose what storage you want e.g. Sqlite, CoreData, plist…

Current Support

  • [x] CoreData
  • [ ] Sqlite
  • [ ] UserDefaults
  • [ ] Keychains
  • [ ] File

How to use

Best thing to do is have a look at ObjectStorageTests.

  • Make your model conform to Model protocol, I suggest you create a base class for that, take a look at MappableModel in ObjectStorageTests folder.
    class UserProfile: Model

    Most import for CoreData is set up your ModelIdentifier in your model.

    public typealias ModelIdentifier = (modelName: String, keys: [String], values: [String?])

    modelName is the CoreData model name, keys and values will use for CoreData queries.

  • Create StorageProviderService instance
    let storageProvider = StorageProviderService(coreDataModelFileName: "Model")
  • Then CRUD your model
    storageProvider.create(UserProfile(firstName: 'Jiantang', lastName: 'Li'))


ObjectStorage’s already taken, so I use ‘LiObjectStorage’ instead.

pod 'LiObjectStorage', '~> 0.1.1'


github "tonyli508/ObjectStorage", "~> 0.1.1"


  • Simplify Model Protocol.
  • More storage support.
  • Add more complex testings.
  • Carthage support.

Latest podspec

    "name": "LiObjectStorage",
    "version": "0.1.1",
    "license": "MIT",
    "summary": "ObjectStorage is a framework that make CURD works on your model entities",
    "homepage": "",
    "authors": {
        "Li Jiantang": "[email protected]"
    "social_media_url": "",
    "source": {
        "git": "",
        "tag": "0.1.1"
    "platforms": {
        "watchos": "2.0",
        "ios": "8.0",
        "osx": "10.9"
    "requires_arc": "true",
    "source_files": [

Pin It on Pinterest

Share This