{"id":15038617,"url":"https://github.com/iamrsalman/storagemanager","last_synced_at":"2025-04-09T23:41:04.583Z","repository":{"id":62456088,"uuid":"104599736","full_name":"iAmrSalman/StorageManager","owner":"iAmrSalman","description":"Safe and easy way to use FileManager as Database","archived":false,"fork":false,"pushed_at":"2019-08-26T08:24:15.000Z","size":68,"stargazers_count":50,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T02:46:10.674Z","etag":null,"topics":["carthage","cocoapods","filemanager","iamrsalman","ios","macos","swift","tvos","watchos","xcode"],"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/iAmrSalman.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":"2017-09-23T21:18:42.000Z","updated_at":"2024-09-30T20:12:16.000Z","dependencies_parsed_at":"2022-11-02T00:00:40.211Z","dependency_job_id":null,"html_url":"https://github.com/iAmrSalman/StorageManager","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iAmrSalman%2FStorageManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iAmrSalman%2FStorageManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iAmrSalman%2FStorageManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iAmrSalman%2FStorageManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iAmrSalman","download_url":"https://codeload.github.com/iAmrSalman/StorageManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131468,"owners_count":21052819,"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","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":["carthage","cocoapods","filemanager","iamrsalman","ios","macos","swift","tvos","watchos","xcode"],"created_at":"2024-09-24T20:39:16.015Z","updated_at":"2025-04-09T23:41:04.564Z","avatar_url":"https://github.com/iAmrSalman.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StorageManager\n\n[![CI Status](http://img.shields.io/travis/iAmrSalman/StorageManager.svg?style=flat)](https://travis-ci.org/iAmrSalman/StorageManager)\n[![Version](https://img.shields.io/cocoapods/v/StorageManager.svg?style=flat)](http://cocoapods.org/pods/StorageManager)\n[![License](https://img.shields.io/cocoapods/l/StorageManager.svg?style=flat)](http://cocoapods.org/pods/StorageManager)\n[![Platform](https://img.shields.io/cocoapods/p/StorageManager.svg?style=flat)](http://cocoapods.org/pods/StorageManager)\n\n![banner](https://user-images.githubusercontent.com/10261166/35454139-80ddfb16-02d5-11e8-90f6-3ca183590728.png)\n\nFileManager framework that handels Store, fetch, delete and update files in local storage.\n\n## Requirements\n\n- iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+\n- Xcode 10.2+\n- Swift 5.0+\n\n## Installation\n\n### CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\n\u003e CocoaPods 1.1+ is required to build StorageManager.\n\nTo integrate StorageManager into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '9.0'\nuse_frameworks!\n\ntarget '\u003cYour Target Name\u003e' do\n    pod 'StorageManager'\nend\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate StorageManager into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"iAmrSalman/StorageManager\" ~\u003e 0.1.2\n```\n\nRun `carthage update` to build the framework and drag the built `StorageManager.framework` into your Xcode project.\n\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but StorageManager does support its use on supported platforms. \n\nOnce you have your Swift package set up, adding StorageManager as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/iAmrSalman/StorageManager.git\", from: \"0.1.2\")\n]\n```\n\n## Usage\n\n### Store\n\n##### *Dictionary*: \n\n```swift\nlet exampleDictionary = [\"foo\": \"bar\", \"x\": 3, \"pi\": 3.1415, \"names\": [\"Amr\", \"Salman\"]]\n\ntry! StorageManager.default.store(dictionary: exampleDictionary, in: \"exampleDictionary\")\n```\n\n##### *Array*:\n\n```swift\nlet exampleArray = [\"foo\", \"bar\", \"x\", \"y\"]\n\ntry! StorageManager.default.store(dictionary: exampleArray, in: \"exampleArray\")\n```\n\n##### *Data*:\n\n```swift\nlet exampleData = Data()\n\ntry! StorageManager.default.store(data: exampleData, jsonType: .array, in: \"exampleData\")\n```\n\n### Update\n\n```swift\nlet newX = 5\n\ntry! StorageManager.default.update(vlaue: newX, forKey: \"x\", in: \"exampleDictionary\")\n```\n\n### Delete\n\n```swift\ntry! StorageManager.default.clear(\"exampleData\")\n```\n\n### Fetch\n\n##### *Single value*\n\n```swift\nlet x: Int = try! StorageManager.default.singleValue(forKey: \"x\", in: \"exampleDictionary\")\n```\n\n##### *Array*\n\n```swift\nlet exampleArray: [String] = try! StorageManager.default.arrayValue(\"exampleArray\")\n```\n\n##### *Array as value for key*\n\n```swift\nlet names: [String] = try! StorageManager.default.arrayValue(forKey: \"names\", in: \"exampleDictionary\")\n```\n\n##### *Dictionary*\n\n```swift\nlet exampleDictionary: [String: Any] = try! StorageManager.default.dictionaryValue(\"exampleDictionary\")\n```\n\n\n## Author\n\nAmr Salman, iamrsalman@gmail.com\n\n## License\n\nStorageManager is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamrsalman%2Fstoragemanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamrsalman%2Fstoragemanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamrsalman%2Fstoragemanager/lists"}