UserDefaults for iOS, macOS and tvOS.
Usage >> instructions <<
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. You can install it with the following command:
$ gem install cocoapodsTo give DefaultsKit a try with an example project, run the following command:
$ pod try DefaultsKitTo integrate DefaultsKit into your Xcode project, specify it in your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'DefaultsKit'
endThen, run the following command:
$ pod installCarthage is a dependency manager that builds your dependencies and provides you with binary frameworks.
To install Carthage with Homebrew use the following command:
$ brew update
$ brew install carthageTo integrate DefaultsKit into your Xcode project using Carthage, specify it in your Cartfile:
github "nmdias/DefaultsKit"
Build the framework:
$ carthage updateThen, drag the built DefaultsKit.framework into your Xcode project.
"The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies."
To integrate DefaultsKit into your project, specify it in your Package.swift file:
let package = Package(
name: "MyApp",
dependencies: [
.Package(url: "https://github.com/nmdias/DefaultsKit.git")
]
)Then run:
$ swift buildOr, alternatively:
$ swift package generate-xcodeprojDrag DefaultsKit.xcodeproj into your Xcode project.
It should appear nested underneath your application's blue project icon.
Click on the + button under the "Embedded Binaries" section of your app's target and select the DefaultsKit.framework that matches the desired platform.
Similarities to Alamofire's impecable setup instructions are not a coincidence :)
DefaultsKit is released under the MIT license. See LICENSE for details.