{"id":16948646,"url":"https://github.com/timoliver/toappsettings","last_synced_at":"2025-08-14T04:23:56.759Z","repository":{"id":55533205,"uuid":"132392591","full_name":"TimOliver/TOAppSettings","owner":"TimOliver","description":"An object wrapper for storing properties in NSUserDefaults.","archived":false,"fork":false,"pushed_at":"2021-05-19T15:31:37.000Z","size":184,"stargazers_count":24,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-19T02:33:06.060Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/TimOliver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"timoliver","custom":"https://tim.dev/paypal"}},"created_at":"2018-05-07T01:47:09.000Z","updated_at":"2023-12-01T04:28:10.000Z","dependencies_parsed_at":"2022-08-15T02:40:44.645Z","dependency_job_id":null,"html_url":"https://github.com/TimOliver/TOAppSettings","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/TimOliver/TOAppSettings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOAppSettings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOAppSettings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOAppSettings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOAppSettings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimOliver","download_url":"https://codeload.github.com/TimOliver/TOAppSettings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOAppSettings/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270360655,"owners_count":24570756,"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-08-14T02:00:10.309Z","response_time":75,"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":[],"created_at":"2024-10-13T21:51:47.574Z","updated_at":"2025-08-14T04:23:56.690Z","avatar_url":"https://github.com/TimOliver.png","language":"Objective-C","funding_links":["https://github.com/sponsors/timoliver","https://tim.dev/paypal"],"categories":[],"sub_categories":[],"readme":"# TOAppSettings\n\n[![CI](https://github.com/TimOliver/TOAppSettings/workflows/CI/badge.svg)](https://github.com/TimOliver/TOAppSettings/actions?query=workflow%3ACI)\n[![Version](https://img.shields.io/cocoapods/v/TOAppSettings.svg?style=flat)](http://cocoadocs.org/docsets/TOAppSettings)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/TimOliver/TOAppSettings/master/LICENSE)\n[![Platform](https://img.shields.io/cocoapods/p/TOAppSettings.svg?style=flat)](http://cocoadocs.org/docsets/TOAppSettings)\n\nA Realm-like object wrapper class for `NSUserDefaults`.\n\n```swift\n\n// Define a subclass with a list of properties\nclass MyAppSettings: AppSettings {\n    @objc dynamic var greeting = \"\"\n}\n\n// Automatically save to `NSUserDefaults`!\nlet settings = MyAppSettings.default()\nsettings.greeting = \"Hello World!\"\n\n```\n\n![TOAppSettings](Screenshot.jpg)\n\n`NSUserDefaults` has been a staple component of iOS development ever since iPhoneOS 2.0. As convenient as the API is for persisting data, it's a rather finicky API to work with. Aside from the methods for reading and writing data being overly verbose, keeping track of the key names can also be tricky.\n\n`TOAppSettings` is a wrapper class designed to make working with `NSUserDefaults` significantly easier. It uses similar mechanisms to the [Realm](http://realm.io) iOS database in that it uses the Objective-C runtime to dynamically map its properties directly to the equivalent `NSUserDefaults` methods.\n\n## Features\n* Automatically maps object properties to `NSUSerDefaults`.\n* Supports all of the data types originally supported by `NSUserDefaults`.\n* Automatically generates unique key names, so there is no risk of collisions with other persisted data.\n* An identifier string can be used to save multiple, different copies of the same object.\n* Provides support for sharing preferences between apps in the same developer container.\n* Additionally, supports all objects that conform to `NSCoding` and automatically handles serialising them to and from disk.\n* Instances of `TOAppSettings` are internally cached, so there is little overhead making subsequent instantiation calls.\n* Thread-safe, just like `NSUserDefaults` itself is.\n* Written in Objective-C, but has a very Swifty interface too.\n* Unit-tested (With more on the way!)\n\n## Installation\n\n### Manual Installation\nDrag `TOAppSettings.h` and `TOAppSettings.m` into your Xcode project.\n\n### CocoaPods\n```\npod 'TOAppSettings'\n```\n\n### Carthage\nPlease file a PR. :)\n\n## Credits\n`TOAppSettings` was originally created by [Tim Oliver](http://twitter.com/TimOliverAU) as a component for [iComics](http://icomics.co), a comic reader app for iOS.\n\n\n## License\n`TOAppSettings` is licensed under the MIT License, please see the [LICENSE](LICENSE) file. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoliver%2Ftoappsettings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimoliver%2Ftoappsettings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoliver%2Ftoappsettings/lists"}