To integrate ReerKit into your Xcode project using Carthage, specify it in your `Cartfile`:
github "ReerKit/ReerKit" ~> 1.3.1
You can use Swift Package Manager to install ReerKit by adding the proper description in your `Package.swift` file:
import PackageDescription
let package = Package(
name: "YOUR_PROJECT_NAME",
targets: [],
dependencies: [
.package(url: "https://github.com/reers/ReerKit.git", from: "1.3.1")
]
)
Next, add `ReerKit` to your targets dependencies as shown below:
.target(
name: "YOUR_TARGET_NAME",
dependencies: [
"ReerKit",
]
),
Then run `swift package update`.
Property macros are available through Swift Package Manager builds. The legacy Xcode project does not load the `ReerKitMacros` plugin.
@Defaults("isAppeared")
var isAppeared: Bool
@Defaults("launchCount", container: .standard)
var launchCount: Int = 0
@AssociatedValue
var isAppeared: Bool = false
Use property initializers for custom default values. When a default value is omitted, supported basic types use built-in defaults such as `false`, `0`, `""`, `Date()`, `Data()`, `URL(string: "/")!`, `UUID()`, and `Decimal(0)`.
`@Defaults` also works on type (`static`/`class`) properties.
Add the ReerKit folder to your Xcode project to use all extensions or specific extensions.