{"id":978,"url":"https://github.com/sunshinejr/SwiftyUserDefaults","last_synced_at":"2025-08-06T13:32:04.510Z","repository":{"id":26082672,"uuid":"29526608","full_name":"sunshinejr/SwiftyUserDefaults","owner":"sunshinejr","description":"Modern Swift API for NSUserDefaults","archived":false,"fork":false,"pushed_at":"2024-03-25T03:48:17.000Z","size":583,"stargazers_count":4898,"open_issues_count":56,"forks_count":366,"subscribers_count":54,"default_branch":"master","last_synced_at":"2025-08-04T23:23:42.031Z","etag":null,"topics":["ios","nsuserdefaults","swift","swifty"],"latest_commit_sha":null,"homepage":"http://radex.io/swift/nsuserdefaults/static","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/sunshinejr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["sunshinejr"]}},"created_at":"2015-01-20T11:27:58.000Z","updated_at":"2025-08-02T17:43:29.000Z","dependencies_parsed_at":"2024-04-27T20:40:21.526Z","dependency_job_id":"c2c6609a-6bfd-49e6-892f-d6e139b738f8","html_url":"https://github.com/sunshinejr/SwiftyUserDefaults","commit_stats":{"total_commits":582,"total_committers":46,"mean_commits":"12.652173913043478","dds":0.5171821305841924,"last_synced_commit":"558c015e49524ebf5031b66980a722a4c225c302"},"previous_names":["radex/swiftyuserdefaults"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/sunshinejr/SwiftyUserDefaults","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunshinejr%2FSwiftyUserDefaults","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunshinejr%2FSwiftyUserDefaults/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunshinejr%2FSwiftyUserDefaults/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunshinejr%2FSwiftyUserDefaults/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunshinejr","download_url":"https://codeload.github.com/sunshinejr/SwiftyUserDefaults/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunshinejr%2FSwiftyUserDefaults/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268807922,"owners_count":24310438,"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-04T02:00:09.867Z","response_time":79,"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":["ios","nsuserdefaults","swift","swifty"],"created_at":"2024-01-05T20:15:36.135Z","updated_at":"2025-08-06T13:32:04.231Z","avatar_url":"https://github.com/sunshinejr.png","language":"Swift","funding_links":["https://github.com/sponsors/sunshinejr"],"categories":["Database","Libs","Swift","Data Management [🔝](#readme)"],"sub_categories":["Getting Started","Data Management","Linter"],"readme":"# SwiftyUserDefaults\n\n![Platforms](https://img.shields.io/badge/platforms-ios%20%7C%20osx%20%7C%20watchos%20%7C%20tvos-lightgrey.svg)\n[![CI Status](https://api.travis-ci.org/sunshinejr/SwiftyUserDefaults.svg?branch=master)](https://travis-ci.org/sunshinejr/SwiftyUserDefaults)\n[![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-4BC51D.svg?style=flat)](#cocoapods)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](#carthage)\n[![SPM compatible](https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat)](#swift-package-manager)\n![Swift version](https://img.shields.io/badge/swift-4.1-orange.svg)\n![Swift version](https://img.shields.io/badge/swift-4.2-orange.svg)\n![Swift version](https://img.shields.io/badge/swift-5.0-orange.svg)\n![Swift version](https://img.shields.io/badge/swift-5.1-orange.svg)\n\n#### Modern Swift API for `NSUserDefaults`\n###### SwiftyUserDefaults makes user defaults enjoyable to use by combining expressive Swifty API with the benefits of static typing. Define your keys in one place, use value types easily, and get extra safety and convenient compile-time checks for free.\n\nPrevious versions' documentation: [Version 4.0.0](https://github.com/sunshinejr/SwiftyUserDefaults/blob/566ace16ee91242b61e2e9da6cdbe7dfdadd926c/README.md), [Version 3.0.1](https://github.com/sunshinejr/SwiftyUserDefaults/blob/14b629b035bf6355b46ece22c3851068a488a895/README.md)\u003cbr /\u003e\nMigration guides: [from 4.x to 5.x](MigrationGuides/migration_4_to_5.md), [from 4.0.0-alpha.1 to 4.0.0-alpha.3](MigrationGuides/migration_4_alpha_1_to_4_alpha_2.md), [from 3.x to 4.x](MigrationGuides/migration_3_to_4.md)\n\n# Version 5.0.0\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#codable\"\u003eCodable\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#nscoding\"\u003eNSCoding\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#rawrepresentable\"\u003eRawRepresentable\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#extending-existing-types\"\u003eExtending existing types\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#custom-types\"\u003eCustom types\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#property-wrappers\"\u003eProperty wrappers\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#kvo\"\u003eKVO\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#keypath-dynamicMemberLookup\"\u003edynamicMemberLookup\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#launch-arguments\"\u003eLaunch arguments\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#utils\"\u003eUtils\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\n**There's only one step to start using SwiftyUserDefaults:**\n\nDefine your keys!\n\n```swift\nextension DefaultsKeys {\n    var username: DefaultsKey\u003cString?\u003e { .init(\"username\") }\n    var launchCount: DefaultsKey\u003cInt\u003e { .init(\"launchCount\", defaultValue: 0) }\n}\n```\n\nAnd just use it ;-)\n\n```swift\n// Get and set user defaults easily\nlet username = Defaults[\\.username]\nDefaults[\\.hotkeyEnabled] = true\n\n// Modify value types in place\nDefaults[\\.launchCount] += 1\nDefaults[\\.volume] -= 0.1\nDefaults[\\.strings] += \"… can easily be extended!\"\n\n// Use and modify typed arrays\nDefaults[\\.libraries].append(\"SwiftyUserDefaults\")\nDefaults[\\.libraries][0] += \" 2.0\"\n\n// Easily work with custom serialized types\nDefaults[\\.color] = NSColor.white\nDefaults[\\.color]?.whiteComponent // =\u003e 1.0\n```\n\nIf you use Swift 5.1 - good news! You can also use keyPath `dynamicMemberLookup`:\n```swift\nDefaults.color = NSColor.white\n```\n\nSee more at the \u003ca href=\"#keypath-dynamicMemberLookup\"\u003eKeyPath dynamicMemberLookup\u003c/a\u003e section.\n\n## Usage\n\n### Define your keys\n\nTo get the most out of SwiftyUserDefaults, define your user defaults keys ahead of time:\n\n```swift\nlet colorKey = DefaultsKey\u003cString\u003e(\"color\", defaultValue: \"\")\n```\n\nJust create a `DefaultsKey` object, put the type of the value you want to store in angle brackets, the key name in parentheses, and you're good to go. If you want to have a non-optional value, just provide a `defaultValue` in the key (look at the example above).\n\nYou can now use the `Defaults` shortcut to access those values:\n\n```swift\nDefaults[key: colorKey] = \"red\"\nDefaults[key: colorKey] // =\u003e \"red\", typed as String\n```\n\nThe compiler won't let you set a wrong value type, and fetching conveniently returns `String`.\n\n### Take shortcuts\n\nFor extra convenience, define your keys by extending magic `DefaultsKeys` class and adding static properties:\n\n```swift\nextension DefaultsKeys {\n    var username: DefaultsKey\u003cString?\u003e { .init(\"username\") }\n    var launchCount: DefaultsKey\u003cInt\u003e { .init(\"launchCount\", defaultValue: 0) }\n}\n```\n\nAnd use the shortcut dot syntax:\n\n```swift\nDefaults[\\.username] = \"joe\"\nDefaults[\\.launchCount] += 1\n```\n\n### Supported types\n\nSwiftyUserDefaults supports all of the standard `NSUserDefaults` types, like strings, numbers, booleans, arrays and dictionaries.\n\nHere's a full table of built-in single value defaults:\n\n| Single value     | Array                |\n| ---------------- | -------------------- |\n| `String`         | `[String]`           |\n| `Int`            | `[Int]`              |\n| `Double`         | `[Double]`           |\n| `Bool`           | `[Bool]`             |\n| `Data`           | `[Data]`             |\n| `Date`           | `[Date]`             |\n| `URL`            | `[URL]`              |\n| `[String: Any]`  | `[[String: Any]]`    |\n\nBut that's not all!\n\n## Codable\n\nSince version 4, `SwiftyUserDefaults` support `Codable`! Just conform to `DefaultsSerializable` in your type:\n```swift\nfinal class FrogCodable: Codable, DefaultsSerializable {\n    let name: String\n }\n```\n\nNo implementation needed! By doing this you will get an option to specify an optional `DefaultsKey`:\n```swift\nlet frog = DefaultsKey\u003cFrogCodable?\u003e(\"frog\")\n```\n\nAdditionally, you've got an array support for free:\n```swift\nlet froggies = DefaultsKey\u003c[FrogCodable]?\u003e(\"froggies\")\n```\n\n## NSCoding\n\n`NSCoding` was supported before version 4, but in this version we take the support on another level. No need for custom subscripts anymore!\nSupport your custom `NSCoding` type the same way as with `Codable` support:\n```\nfinal class FrogSerializable: NSObject, NSCoding, DefaultsSerializable { ... }\n```\n\nNo implementation needed as well! By doing this you will get an option to specify an optional `DefaultsKey`:\n```swift\nlet frog = DefaultsKey\u003cFrogSerializable?\u003e(\"frog\")\n```\n\nAdditionally, you've got an array support also for free:\n```swift\nlet froggies = DefaultsKey\u003c[FrogSerializable]?\u003e(\"froggies\")\n```\n\n## RawRepresentable\n\nAnd the last but not least, `RawRepresentable` support! Again, the same situation like with `NSCoding` and `Codable`:\n```swift\nenum BestFroggiesEnum: String, DefaultsSerializable {\n    case Andy\n    case Dandy\n}\n```\n\nNo implementation needed as well! By doing this you will get an option to specify an optional `DefaultsKey`:\n```swift\nlet frog = DefaultsKey\u003cBestFroggiesEnum?\u003e(\"frog\")\n```\n\nAdditionally, you've got an array support also for free:\n```swift\nlet froggies = DefaultsKey\u003c[BestFroggiesEnum]?\u003e(\"froggies\")\n```\n\n## Extending existing types\n\nLet's say you want to extend a support `UIColor` or any other type that is `NSCoding`, `Codable` or `RawRepresentable`.\nExtending it to be `SwiftyUserDefaults`-friendly should be as easy as:\n```swift\nextension UIColor: DefaultsSerializable {}\n```\n\nIf it's not, we have two options:\u003cbr /\u003e\na) It's a custom type that we don't know how to serialize, in this case at [Custom types](#custom-types)\u003cbr /\u003e\nb) It's a bug and it should be supported, in this case please file an issue (+ you can use [custom types](#custom-types) method as a workaround in the meantime)\u003cbr /\u003e\n\n## Custom types\n\nIf you want to add your own custom type that we don't support yet, we've got you covered. We use `DefaultsBridge`s of many kinds to specify how you get/set values and arrays of values. When you look at `DefaultsSerializable` protocol, it expects two properties in each type: `_defaults` and `_defaultsArray`, where both are of type `DefaultsBridge`.\n\nFor instance, this is a bridge for single value data storing/retrieving using `NSKeyedArchiver`/`NSKeyedUnarchiver`:\n```swift\npublic struct DefaultsKeyedArchiverBridge\u003cT\u003e: DefaultsBridge {\n\n    public func get(key: String, userDefaults: UserDefaults) -\u003e T? {\n        userDefaults.data(forKey: key).flatMap(NSKeyedUnarchiver.unarchiveObject) as? T\n    }\n\n    public func save(key: String, value: T?, userDefaults: UserDefaults) {\n        userDefaults.set(NSKeyedArchiver.archivedData(withRootObject: value), forKey: key)\n    }\n\n    public func deserialize(_ object: Any) -\u003e T? {\n        guard let data = object as? Data else { return nil }\n        return NSKeyedUnarchiver.unarchiveObject(with: data) as? T\n    }    \n}\n```\n\nBridge for default storing/retrieving array values:\n```swift\npublic struct DefaultsArrayBridge\u003cT: Collection\u003e: DefaultsBridge {\n    public func save(key: String, value: T?, userDefaults: UserDefaults) {\n        userDefaults.set(value, forKey: key)\n    }\n\n    public func get(key: String, userDefaults: UserDefaults) -\u003e T? {\n        userDefaults.array(forKey: key) as? T\n    }\n\n    public func deserialize(_ object: Any) -\u003e T? {\n        nil\n    }\n}\n```\n\nNow, to use these bridges in our type we simply declare it as follows:\n```swift\nstruct FrogCustomSerializable: DefaultsSerializable {\n\n    static var _defaults: DefaultsKeyedArchiverBridge( { DefaultsKeyedArchiverBridge() }\n    static var _defaultsArray: DefaultsKeyedArchiverBridge { DefaultsKeyedArchiverBridge() }\n\n    let name: String\n}\n```\n\nUnfortunately, if you find yourself in a situation where you need a custom bridge, you'll probably need to write your own:\n```swift\nfinal class DefaultsFrogBridge: DefaultsBridge {\n    func get(key: String, userDefaults: UserDefaults) -\u003e FrogCustomSerializable? {\n        let name = userDefaults.string(forKey: key)\n        return name.map(FrogCustomSerializable.init)\n    }\n\n    func save(key: String, value: FrogCustomSerializable?, userDefaults: UserDefaults) {\n        userDefaults.set(value?.name, forKey: key)\n    }\n\n    func deserialize(_ object: Any) -\u003e FrogCustomSerializable? {\n        guard let name = object as? String else { return nil }\n\n        return FrogCustomSerializable(name: name)\n    }\n}\n\nfinal class DefaultsFrogArrayBridge: DefaultsBridge {\n    func get(key: String, userDefaults: UserDefaults) -\u003e [FrogCustomSerializable]? {\n        userDefaults.array(forKey: key)?\n            .compactMap { $0 as? String }\n            .map(FrogCustomSerializable.init)\n    }\n\n    func save(key: String, value: [FrogCustomSerializable]?, userDefaults: UserDefaults) {\n        let values = value?.map { $0.name }\n        userDefaults.set(values, forKey: key)\n    }\n\n    func deserialize(_ object: Any) -\u003e [FrogCustomSerializable]? {\n        guard let names = object as? [String] else { return nil }\n\n        return names.map(FrogCustomSerializable.init)\n    }\n}\n\nstruct FrogCustomSerializable: DefaultsSerializable, Equatable {\n\n    static var _defaults: DefaultsFrogBridge { DefaultsFrogBridge() }\n    static var _defaultsArray: DefaultsFrogArrayBridge { DefaultsFrogArrayBridge() }\n\n    let name: String\n}\n```\n\nTo support existing types with different bridges, you can extend it similarly:\n```swift\nextension Data: DefaultsSerializable {\n    public static var _defaultsArray: DefaultsArrayBridge\u003c[T]\u003e { DefaultsArrayBridge() }\n    public static var _defaults: DefaultsDataBridge { DefaultsDataBridge() }\n}\n```\n\nAlso, take a look at our source code (or tests) to see more examples of bridges. If you find yourself confused with all these bridges, please [create an issue](https://github.com/sunshinejr/SwiftyUserDefaults/issues/new) and we will figure something out.\n\n## Property wrappers\n\nSwiftyUserDefaults provides property wrappers for Swift 5.1! The property wrapper, `@SwiftyUserDefault`, provides an option to use it with key path and options: caching or observing.\n\n*Caching* means that we will store the value for you and do not hit the `UserDefaults` for value almost never, only for the first value fetch.\n\n*Observing* means we will observe, via KVO, your property so you don't have to worry if it was saved somewhere else and you use caching.\n\nNow usage! Given keys:\n```swift\nextension DefaultsKeys {\n    var userColorScheme: DefaultsKey\u003cString\u003e { .init(\"userColorScheme\", defaultValue: \"default\") }\n    var userThemeName: DefaultsKey\u003cString?\u003e { .init(\"userThemeName\") }\n    var userLastLoginDate: DefaultsKey\u003cDate?\u003e { .init(\"userLastLoginDate\") }\n}\n```\n\nYou can declare a `Settings` struct:\n```swift\nstruct Settings {\n    @SwiftyUserDefault(keyPath: \\.userColorScheme)\n    var userColorScheme: String\n\n    @SwiftyUserDefault(keyPath: \\.userThemeName, options: .cached)\n    var userThemeName: String?\n\n    @SwiftyUserDefault(keyPath: \\.userLastLoginDate, options: [.cached, .observed])\n    var userLastLoginDate: Date?\n}\n```\n\n## KVO\n\nKVO is supported for all the types that are `DefaultsSerializable`. However, if you have a custom type, it needs to have correctly defined bridges and serialization in them.\n\nTo observe a value for local DefaultsKey:\n```swift\nlet nameKey = DefaultsKey\u003cString\u003e(\"name\", defaultValue: \"\")\nDefaults.observe(key: nameKey) { update in\n\t// here you can access `oldValue`/`newValue` and few other properties\n}\n```\n\nTo observe a value for a key defined in DefaultsKeys extension:\n```swift\nDefaults.observe(\\.nameKey) { update in\n\t// here you can access `oldValue`/`newValue` and few other properties\n}\n```\n\n\nBy default we are using `[.old, .new]` options for observing, but you can provide your own:\n```swift\nDefaults.observe(key: nameKey, options: [.initial, .old, .new]) { _ in }\n```\n\n## KeyPath dynamicMemberLookup\n\nSwiftyUserDefaults makes KeyPath dynamicMemberLookup usable in Swift 5.1!\n\n```swift\nextension DefaultsKeys {\n    var username: DefaultsKey\u003cString?\u003e { .init(\"username\") }\n    var launchCount: DefaultsKey\u003cInt\u003e { .init(\"launchCount\", defaultValue: 0) }\n}\n```\n\nAnd just use it ;-)\n\n```swift\n// Get and set user defaults easily\nlet username = Defaults.username\nDefaults.hotkeyEnabled = true\n\n// Modify value types in place\nDefaults.launchCount += 1\nDefaults.volume -= 0.1\nDefaults.strings += \"… can easily be extended!\"\n\n// Use and modify typed arrays\nDefaults.libraries.append(\"SwiftyUserDefaults\")\nDefaults.libraries[0] += \" 2.0\"\n\n// Easily work with custom serialized types\nDefaults.color = NSColor.white\nDefaults.color?.whiteComponent // =\u003e 1.0\n```\n\n## Launch arguments\n\nDo you like to customize your app/script/tests by UserDefaults? Now it's fully supported on our side, statically typed of course.\n\n_Note: for now we support only `Bool`, `Double`, `Int`, `String` values, but if you have any other requests for that feature, please open an issue or PR and we can talk about implementing it in new versions._\n\n### You can pass your arguments in your schema:\n\u003cimg src=\"https://i.imgur.com/SDpOBpK.png\" alt=\"Pass launch arguments in Xcode Schema editor.\" /\u003e\n\n### Or you can use launch arguments in XCUIApplication:\n```swift\nfunc testExample() {\n    let app = XCUIApplication()\n    app.launchArguments = [\"-skipLogin\", \"true\", \"-loginTries\", \"3\", \"-lastGameTime\", \"61.3\", \"-nickname\", \"sunshinejr\"]\n    app.launch()\n}\n```\n### Or pass them as command line arguments!\n```bash\n./script -skipLogin true -loginTries 3 -lastGameTime 61.3 -nickname sunshinejr\n```\n\n## Utils\n\n### Remove all keys\n\nTo reset user defaults, use `removeAll` method.\n\n```swift\nDefaults.removeAll()\n```\n\n### Shared user defaults\n\nIf you're sharing your user defaults between different apps or an app and its extensions, you can use SwiftyUserDefaults by overriding the `Defaults` shortcut with your own. Just add in your app:\n\n```swift\nvar Defaults = DefaultsAdapter\u003cDefaultsKeys\u003e(defaults: UserDefaults(suiteName: \"com.my.app\")!, keyStore: .init())\n```\n\n### Check key\n\nIf you want to check if we've got a value for `DefaultsKey`:\n```swift\nlet hasKey = Defaults.hasKey(\\.skipLogin)\n```\n\n## Installation\n\n### Requirements\n**Swift** version **\u003e= 4.1**\u003cbr /\u003e\n**iOS** version **\u003e= 9.0**\u003cbr /\u003e\n**macOS** version **\u003e= 10.11**\u003cbr /\u003e\n**tvOS** version **\u003e= 9.0**\u003cbr /\u003e\n**watchOS** version **\u003e= 2.0**\n\n### CocoaPods\n\nIf you're using CocoaPods, just add this line to your Podfile:\n\n```ruby\npod 'SwiftyUserDefaults', '~\u003e 5.0'\n```\n\nInstall by running this command in your terminal:\n\n```sh\npod install\n```\n\nThen import the library in all files where you use it:\n\n```swift\nimport SwiftyUserDefaults\n```\n\n### Carthage\n\nJust add to your Cartfile:\n\n```ruby\ngithub \"sunshinejr/SwiftyUserDefaults\" ~\u003e 5.0\n```\n\n### Swift Package Manager\n\nJust add to your `Package.swift` under dependencies:\n```swift\nlet package = Package(\n    name: \"MyPackage\",\n    products: [...],\n    dependencies: [\n        .package(url: \"https://github.com/sunshinejr/SwiftyUserDefaults.git\", .upToNextMajor(from: \"5.0.0\"))\n    ],\n    targets: [...]\n)\n```\n\n## More like this\n\nIf you like SwiftyUserDefaults, check out [SwiftyTimer](https://github.com/radex/SwiftyTimer), which applies the same swifty approach to `NSTimer`.\n\nYou might also be interested in my blog posts which explain the design process behind those libraries:\n- [Swifty APIs: NSUserDefaults](http://radex.io/swift/nsuserdefaults/)\n- [Statically-typed NSUserDefaults](http://radex.io/swift/nsuserdefaults/static)\n- [Swifty APIs: NSTimer](http://radex.io/swift/nstimer/)\n- [Swifty methods](http://radex.io/swift/methods/)\n\n## Contributing\n\nIf you have comments, complaints or ideas for improvements, feel free to open an issue or a pull request.\n\n## Authors and license\n\n*Maintainer:* Łukasz Mróz\n* [github.com/sunshinejr](http://github.com/sunshinejr)\n* [twitter.com/thesunshinejr](http://twitter.com/thesunshinejr)\n* [sunshinejr.com](https://sunshinejr.com)\n\n*Created by:* Radek Pietruszewski\n\n* [github.com/radex](http://github.com/radex)\n* [twitter.com/radexp](http://twitter.com/radexp)\n* [radex.io](http://radex.io)\n* this.is@radex.io\n\nSwiftyUserDefaults 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%2Fsunshinejr%2FSwiftyUserDefaults","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunshinejr%2FSwiftyUserDefaults","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunshinejr%2FSwiftyUserDefaults/lists"}