{"id":32320449,"url":"https://github.com/tonyli508/objectstorage","last_synced_at":"2025-10-23T11:55:31.758Z","repository":{"id":56919726,"uuid":"67347279","full_name":"tonyli508/ObjectStorage","owner":"tonyli508","description":"ObjectStorage is a framework written in Swift for CRUD your model entities, you may choose what type of storage you want e.g. Sqlite, CoreData, plist...","archived":false,"fork":false,"pushed_at":"2016-09-05T21:00:20.000Z","size":72,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-23T11:55:28.502Z","etag":null,"topics":["coredata","modeling","objectstorage"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tonyli508.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-04T13:47:11.000Z","updated_at":"2018-05-03T06:28:39.000Z","dependencies_parsed_at":"2022-08-20T21:50:15.779Z","dependency_job_id":null,"html_url":"https://github.com/tonyli508/ObjectStorage","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tonyli508/ObjectStorage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyli508%2FObjectStorage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyli508%2FObjectStorage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyli508%2FObjectStorage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyli508%2FObjectStorage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tonyli508","download_url":"https://codeload.github.com/tonyli508/ObjectStorage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyli508%2FObjectStorage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280614539,"owners_count":26360842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coredata","modeling","objectstorage"],"created_at":"2025-10-23T11:55:27.287Z","updated_at":"2025-10-23T11:55:31.753Z","avatar_url":"https://github.com/tonyli508.png","language":"Swift","readme":"# ObjectStorage\n\n[![CocoaPods](https://img.shields.io/cocoapods/v/LiObjectStorage.svg)](https://github.com/tonyli508/ObjectStorage.git)\n[![Build Status](https://travis-ci.org/tonyli508/ObjectStorage.svg?branch=master)](https://travis-ci.org/tonyli508/ObjectStorage)\n\nObjectStorage is a framework that make CRUD works on your model entities, you may choose what storage you want e.g. Sqlite, CoreData, plist...\n\n## Current Support\n- [x] CoreData\n- [ ] Sqlite\n- [ ] UserDefaults\n- [ ] Keychains \n- [ ] File\n\n## How to use \n\nBest thing to do is have a look at ObjectStorageTests.\n\n1. Make your model conform to Model protocol, I suggest you create a base class for that, take a look at MappableModel in ObjectStorageTests folder.\n```swift\nclass UserProfile: Model\n```\n\tMost import for CoreData is set up your ModelIdentifier in your model.\n```swift\npublic typealias ModelIdentifier = (modelName: String, keys: [String], values: [String?])\n```\n\tmodelName is the CoreData model name, keys and values will use for CoreData queries.\n\t\n2. Create StorageProviderService instance\n```swift\nlet storageProvider = StorageProviderService(coreDataModelFileName: \"Model\")\n```\n3. Then CRUD your model\n```swift\nlet profile = UserProfile(firstName: 'Jiantang', lastName: 'Li')\nstorageProvider.create(profile)\nstorageProvider.update(profile)\nlet read = storageProvider.read(profile)\nstorageProvider.delete(profile)\n``` \n\n## CocoaPods\n\nObjectStorage's already taken, so I use 'LiObjectStorage' instead.\n\n```ruby\npod 'LiObjectStorage', '~\u003e 0.1.1'\n```\n\n## Carthage\n\n```ruby\ngithub \"tonyli508/ObjectStorage\", \"~\u003e 0.1.1\"\n```\n\n## TODOs\n- Simplify Model Protocol.\n- More storage support.\n- Add more complex testings.\n- Carthage support.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonyli508%2Fobjectstorage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonyli508%2Fobjectstorage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonyli508%2Fobjectstorage/lists"}