ExtensionKit
Helpful extensions for iOS app development 🚀 (by gtokman)
userdefault
⚙️ A tiny property wrapper for UserDefaults. Only 60 lines of code. (by mezhevikin)
ExtensionKit | userdefault | |
---|---|---|
2 | 1 | |
123 | 0 | |
- | - | |
3.8 | 10.0 | |
over 2 years ago | over 1 year ago | |
Swift | Swift | |
- | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ExtensionKit
Posts with mentions or reviews of ExtensionKit.
We have used some of these posts to build our list of alternatives
and similar projects.
-
I added publishers to CLLocationManger!
Here's the code if you want to try it out.
-
What is your most used or favorite View extension?
I added a few to a new library I made today, it's called ExtensionKit
userdefault
Posts with mentions or reviews of userdefault.
We have used some of these posts to build our list of alternatives
and similar projects.
-
A tiny property wrapper for UserDefaults with improved performance
// Mezhevikin Alexey: https://github.com/mezhevikin/userdefault import Foundation import Combine @propertyWrapper public struct UserDefault { private let key: String private var value: Value private let defaultValue: Value private var container: UserDefaults = .standard private let publisher = PassthroughSubject() public init( _ key: String, _ defaultValue: Value, _ container: UserDefaults = .standard ) { self.key = key self.value = container.object(forKey: key) as? Value ?? defaultValue self.defaultValue = defaultValue self.container = container } public var wrappedValue: Value { get { value } set { value = newValue if let optional = value as? AnyOptional, optional.isNil { container.removeObject(forKey: key) } else { container.set(value, forKey: key) } publisher.send(value) } } public var projectedValue: AnyPublisher { publisher.eraseToAnyPublisher() } } public protocol AnyOptional { var isNil: Bool { get } } extension Optional: AnyOptional { public var isNil: Bool { self == nil } } extension UserDefault where Value: ExpressibleByNilLiteral { public init(_ key: String, _ container: UserDefaults = .standard) { self.init(key, nil, container) } }
What are some alternatives?
When comparing ExtensionKit and userdefault you can also consider the following projects:
ScreenshotPreventing-iOS - Prevent screenshot or screenrecording on iOS devices
SunKit - SunKit is a Swift library which uses math and trigonometry to compute several information about the Sun.
BottomSheet - A sliding Sheet from the bottom of the Screen with 3 States build with SwiftUI.
WidgetExamples - A demo project showing different types of Widgets created with SwiftUI and WidgetKit.