SwiftFoundation alternatives and similar libraries
Based on the "Utility" category.
Alternatively, view SwiftFoundation alternatives based on common mentions on social networks and blogs.
-
swift-algorithm-club
Algorithms and data structures in Swift, with explanations! -
SwifterSwift
A handy collection of more than 500 native Swift extensions to boost your productivity. -
BlocksKit
The Objective-C block utilities you always wish you had. -
libextobjc
A Cocoa library to extend the Objective-C programming language. -
InAppSettingsKit
This iOS framework allows settings to be in-app in addition to or instead of being in the Settings app. -
DifferenceKit
💻 A fast and flexible O(n) difference algorithm framework for Swift collection. -
EKAlgorithms
EKAlgorithms contains some well known CS algorithms & data structures. -
EZSwiftExtensions
:smirk: How Swift standard types and classes were supposed to work. -
Reusable
A Swift mixin for reusing views easily and in a type-safe way (UITableViewCells, UICollectionViewCells, custom UIViews, ViewControllers, Storyboards…) -
ObjectiveSugar
ObjectiveC additions for humans. Ruby style. -
SwiftLinkPreview
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images. -
WhatsNew
Showcase new features after an app update similar to Pages, Numbers and Keynote. -
BFKit-Swift
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster. -
BFKit
BFKit is a collection of useful classes and categories to develop Apps faster. -
RateLimit
Simple utility for only executing code every so often. -
VTAcknowledgementsViewController
Acknowledgements screen displaying a list of licenses, for example from CocoaPods dependencies. -
ReadabilityKit
Preview extractor for news, articles and full-texts in Swift -
ObjectiveKit
Swift-friendly API for a set of powerful Objective C runtime functions. -
AssistantKit
Easy way to detect iOS device properties, OS versions and work with screen sizes. Powered by Swift. -
DeviceGuru
DeviceGuru is a simple lib (Swift) to know the exact type of the device, e.g. iPhone 6 or iPhone 6s. Please ⭐️ this repo on the top right corner to make this repo popular. -
SwiftyUtils
All the reusable code that we need in each project -
Eject
An eject button for Interface Builder to generate swift code -
Retry
Haven't you wished for `try` to sometimes try a little harder? Meet `retry` -
YAML.framework
Proper YAML support for Objective-C. Based on recommended libyaml. -
Standard Template Protocols
Protocols for your every day iOS needs -
SBConstants
Generate a constants file by grabbing identifiers from storyboards in a project. -
ReflectableEnum
Reflection for enumerations in Objective-C. -
ZamzamKit
A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks. -
Datez
📆 Breeze through Date, DateComponents, and TimeInterval with Swift! -
XestiMonitors
An extensible monitoring framework written in Swift
InfluxDB - Power Real-Time Data Analytics at Scale
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of SwiftFoundation or a related project?
README
SwiftFoundation
Cross-Platform, Protocol-Oriented Programming base library to complement the Swift Standard Library.
Goals
- Provide a cross-platform interface that mimics Apple's Foundation framework.
- Provide a POSIX-based implementation for maximum portability.
- Rewrite Foundation with Protocol-Oriented Programming principals.
- Long-term Pure Swift replacement for the Cocoa frameworks.
Problems with Apple's Foundation
- Objective-C - Apple's Foundation is an old API designed for Objective-C. While it works great (on Apple's platforms) and has a nice API for Objective-C programming, when imported into Swift, you can see the shortcomings of its 20+ year old API.
- Unimplemented - The open source version of Apple's Foundation is severly lacking implementation. Most methods are marked with
NSUnimplemented()
. Only a small subset of Foundation based on CoreFoundation is implemented (e.g.NSArray
,NSString
,NSDictionary
). Basic Functionality like JSON, Base64, and even HTTP requests are not implemented. - Portability - Since Apple's Foundation is backed by CoreFoundation, the only supported platforms are currently Linux, Darwin, and (potentially) Windows. Supporting other platforms (e.g. ARM Linux, BSD, SunOS) would require changes to the CoreFoundation codebase, written in C, which is not good for a long term Swift base library. We want all of our code to be understood by any Swift programmer.
- Protocol Oriented Programming - Perhaps the biggest reason to use this library, is to break free from the old Object-Oriented Programming paradigms. Swift structures and protocols free you from pointers and memory management, along with bugs related to multithreaded environments. Creating structs for basic types like
Date
andUUID
allows you to uselet
andvar
correctly. Structs also bring huge performance improvements since the compiler can perform more optimizations and doesn't have to create all the metadata needed for the Swift class runtime.
Targeted Platforms
- Darwin (macOS, iOS, watchOS, tvOS)
- Linux (Ubuntu x86_64, Debian Armv7)
- WebAssembly (wasm32)
Implemented
To see what parts of Foundation are implemented, just look at the unit tests. Completed functionality will be fully unit tested. Note that there is some functionality that is written as a protocol only, that will not be included on this list.
- [x] Base64
- [x] Data
- [x] Date
- [ ] FileManager
- [ ] JSON
- [ ] RegularExpression (POSIX, not ICU)
- [x] Thread
- [x] URL
- [x] UUID
License
This program is free software; you can redistribute it and/or modify it under the terms of the MIT License.
*Note that all licence references and agreements mentioned in the SwiftFoundation README section above
are relevant to that project's source code only.