https://github.com/SwifterSwift/SwifterSwift
A handy collection of more than 500 native Swift extensions to boost your productivity.
https://github.com/SwifterSwift/SwifterSwift
List: SwifterSwift
awesome carthage cocoapods extensions foundation ios macos mit open-source productivity-booster swift swift-extensions swift-library swift-package-manager swifterswift tvos uikit unit-testing watchos xcode
Last synced: 3 months ago
JSON representation
A handy collection of more than 500 native Swift extensions to boost your productivity.
- Host: GitHub
- URL: https://github.com/SwifterSwift/SwifterSwift
- Owner: SwifterSwift
- License: mit
- Created: 2016-08-01T22:25:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-11-20T18:37:16.000Z (12 months ago)
- Last Synced: 2024-11-30T16:40:05.686Z (11 months ago)
- Topics: awesome, carthage, cocoapods, extensions, foundation, ios, macos, mit, open-source, productivity-booster, swift, swift-extensions, swift-library, swift-package-manager, swifterswift, tvos, uikit, unit-testing, watchos, xcode
- Language: Swift
- Homepage: https://swifterswift.com
- Size: 15.7 MB
- Stars: 14,123
- Watchers: 285
- Forks: 1,631
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-ios - SwifterSwift - A handy collection of more than 400 native Swift 4 extensions to boost your productivity. (Utility / Web View)
- awesome-swift - SwifterSwift - A handy collection of more than 500 native extensions to boost your productivity. (Libs / Utility)
- awesome-swift - SwifterSwift - A handy collection of more than 500 native extensions to boost your productivity. (Libs / Utility)
- awesome-macos-libraries - SwifterSwift - A handy collection of more than 500 native Swift extensions to boost your productivity. Language: Swift. (Extensions)
- awesome-ios - SwifterSwift
- awesome-ios-star - SwifterSwift - A handy collection of more than 400 native Swift 4 extensions to boost your productivity. (Utility / Web View)
- awesome-starts - SwifterSwift/SwifterSwift - A handy collection of more than 500 native Swift extensions to boost your productivity. (Swift)
- fucking-awesome-swift - SwifterSwift - A handy collection of more than 500 native extensions to boost your productivity. (Libs / Utility)
- StarryDivineSky - SwifterSwift/SwifterSwift
- awesome-swift - SwifterSwift - A handy collection of more than 500 native Swift extensions to boost your productivity. ` 📝 19 days ago ` (Utility [🔝](#readme))
- stars - SwifterSwift
- stars - SwifterSwift
- awesome - SwifterSwift - A handy collection of more than 500 native Swift extensions to boost your productivity. (iOS / SwiftKit)
- awesome - SwifterSwift - A handy collection of more than 500 native Swift extensions to boost your productivity. (iOS / SwiftKit)
README
[](https://github.com/SwifterSwift/SwifterSwift/actions)
[](https://github.com/SwifterSwift/swifterSwift)
[](https://cocoapods.org/pods/SwifterSwift)
[](https://github.com/Carthage/Carthage)
[](https://swift.org/package-manager/)
[](https://github.com/JamitLabs/Accio)
[](https://codecov.io/gh/SwifterSwift/SwifterSwift)
[](http://swifterswift.com/docs)
[](https://swift.org)
[](https://developer.apple.com/xcode)
[](https://opensource.org/licenses/MIT)
[](https://join.slack.com/t/swifterswift/shared_invite/zt-s6dl4g2e-R5V5baIawGpdUz2heShjiQ)
SwifterSwift is a collection of **over 500 native Swift extensions**, with handy methods, syntactic sugar, and performance improvements for wide range of primitive data types, UIKit and Cocoa classes –over 500 in 1– for iOS, macOS, tvOS, watchOS, Linux, and Android.
[简体中文](README_CN.md)
### [Whats New in v6.0?](https://github.com/SwifterSwift/SwifterSwift/blob/master/CHANGELOG.md#v600)
## Requirements
- **iOS** 12.0+ / **tvOS** 12.0+ / **watchOS** 4.0+ / **macOS** 10.13+ / **Ubuntu** 14.04+
- Swift 5.6+
## Looking to use SwifterSwift for older versions of Swift
SwifterSwift is Swift v5.0+ compatible starting from v5
- To use with **Swift 3 / Xcode 8.x** please ensure you are using [**`v3.1.1`**](https://github.com/SwifterSwift/SwifterSwift/releases/tag/3.1.1).
- To use with **Swift 3.2 / Xcode 9.x** please ensure you are using [**`v3.2.0`**](https://github.com/SwifterSwift/SwifterSwift/releases/tag/3.2.0).
## Installation
CocoaPods
To integrate SwifterSwift into your Xcode project using CocoaPods, specify it in your Podfile:
- Integrate All extensions (recommended):
pod 'SwifterSwift'
- Integrate SwiftStdlib extensions only:
pod 'SwifterSwift/SwiftStdlib'
- Integrate Foundation extensions only:
pod 'SwifterSwift/Foundation'
- Integrate UIKit extensions only:
pod 'SwifterSwift/UIKit'
- Integrate AppKit extensions only:
pod 'SwifterSwift/AppKit'
- Integrate MapKit extensions only:
pod 'SwifterSwift/MapKit'
- Integrate CoreGraphics extensions only:
pod 'SwifterSwift/CoreGraphics'
- Integrate CoreLocation extensions only:
pod 'SwifterSwift/CoreLocation'
- Integrate CryptoKit extensions only:
pod 'SwifterSwift/CryptoKit'
- Integrate SpriteKit extensions only:
pod 'SwifterSwift/SpriteKit'
- Integrate SceneKit extensions only:
pod 'SwifterSwift/SceneKit'
- Integrate StoreKit extensions only:
pod 'SwifterSwift/StoreKit'
- Integrate Dispatch extensions only:
pod 'SwifterSwift/Dispatch'
- Integrate WebKit extensions only:
pod 'SwifterSwift/WebKit'
- Integrate HealthKit extensions only:
pod 'SwifterSwift/HealthKit'
Carthage
To integrate SwifterSwift into your Xcode project using Carthage, specify it in your Cartfile:
github "SwifterSwift/SwifterSwift" ~> 6.0
Swift Package Manager
You can use The Swift Package Manager to install SwifterSwift by adding the proper description to your Package.swift file:
import PackageDescription
let package = Package(
name: "YOUR_PROJECT_NAME",
targets: [],
dependencies: [
.package(url: "https://github.com/SwifterSwift/SwifterSwift.git", from: "6.0.0")
]
)
Next, add SwifterSwift to your targets dependencies like so:
.target(
name: "YOUR_TARGET_NAME",
dependencies: [
"SwifterSwift",
]
),
Then run swift package update.
Note that the Swift Package Manager doesn't support building for iOS/tvOS/macOS/watchOS apps – see Accio in the next section for that.
Accio
Accio is a dependency manager based on SwiftPM which can build frameworks for iOS/macOS/tvOS/watchOS. Therefore the integration steps are exactly the same as described above. Once your Package.swift file is configured, you need to run accio update instead of swift package update though.
Manually
Add the SwifterSwift folder to your Xcode project to use all extensions, or a specific extension.
For your test targets you can also add the XCTest folder.
## List of All Extensions
SwiftStdlib Extensions
Array extensionsBidirectionalCollection extensionsBinaryFloatingPoint extensionsBool extensionsCharacter extensionsCollection extensionsComparable extensionsDecodableExtensions extensionsDefaultStringInterpolationExtensions extensionsDictionary extensionsDouble extensionsFloat extensionsFloatingPoint extensionsInt extensionsOptional extensionsRangeReplaceableCollection extensionsSequence extensionsSignedInteger extensionsSignedNumeric extensionsString extensionsStringProtocol extensions
Foundation Extensions
Calendar extensionsData extensionsDate extensionsFileManager extensionsLocale extensionsMeasurement extensionsNSAttributedString extensionsNSPredicate extensionsURL extensionsURLRequest extensionsUserDefaults extensions
UIKit Extensions
UIActivity extensionsUIAlertController extensionsUIApplication extensionsUIBarButtonItem extensionsUIButton extensionsUICollectionView extensionsUIColor extensionsUIDatePicker extensionsUIEdgeInsets extensionsUIFont extensionsUIGestureRecognizer extensionsUIImage extensionsUIImageView extensionsUILabel extensionsUILayoutPriority extensionsUINavigationBar extensionsUINavigationController extensionsUINavigationItem extensionsUIRefreshControl extensionsUIScrollView extensionsUISearchBar extensionsUISegmentedControl extensionsUISlider extensionsUIStackView extensionsUIStoryboard extensionsUISwitch extensionsUITabBar extensionsUITableView extensionsUITextField extensionsUITextView extensionsUIViewController extensionsUIView extensionsUIWindow extensions
AppKit Extensions
CoreGraphics Extensions
CGColor extensionsCGFloat extensionsCGPoint extensionsCGSize extensionsCGRect extensionsCGVector extensions
CoreLocation Extensions
CoreAnimation Extensions
CryptoKit Extensions
MapKit Extensions
SpriteKit Extensions
SceneKit Extensions
SCNBox extensionsSCNCone extensionsSCNCapsule extensionsSCNCylinder extensionsSCNGeometry extensionsSCNMaterial extensionsSCNPlane extensionsSCNShape extensionsSCNSphere extensionsSCNVector3 extensions
StoreKit Extensions
Dispatch Extensions
WebKit Extensions
HealthKit Extensions
XCTest Extensions
## How cool is this?
SwifterSwift is a library of **over 500 properties and methods**, designed to extend Swift's functionality and productivity, staying faithful to the original Swift API design guidelines.
Check Examples.playground from the project for some cool examples!
## Documentation
Documentation for all extensions, with examples, is available at [swifterswift.com/docs](http://swifterswift.com/docs)
## Get involved
We want your feedback.
Please refer to [contributing guidelines](https://github.com/SwifterSwift/SwifterSwift/tree/master/CONTRIBUTING.md) before participating.
## Slack Channel: [](https://swifterswift.slack.com)
It is always nice to talk with other people using SwifterSwift and exchange experiences, so come [join our Slack channel](https://swifterswift.slack.com).
## Thanks
Special thanks to:
- [Steven Deutsch](https://github.com/SD10), [Luciano Almeida](https://github.com/LucianoPAlmeida) and [Guy Kogus](https://github.com/guykogus) for their latest contributions to extensions, docs and tests.
- [Paweł Urbanek](https://github.com/pawurb) for adding tvOS, watchOS, and macOS initial support and helping with extensions.
- [Mert Akengin](https://github.com/pvtmert) and [Bashar Ghadanfar](https://www.behance.net/lionbytes) for designing [project website](http://swifterswift.com) and logo.
- [Abdul Rahman Dabbour](https://github.com/ardabbour) for helping document the project.
- Many thanks to all other [contributors](https://github.com/SwifterSwift/SwifterSwift/graphs/contributors) of this project.
## License
SwifterSwift is released under the MIT license. See [LICENSE](https://github.com/SwifterSwift/SwifterSwift/blob/master/LICENSE) for more information.