Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 days ago
JSON representation

A handy collection of more than 500 native Swift extensions to boost your productivity.

Awesome Lists containing this project

README

        



[![Build Status](https://github.com/SwifterSwift/SwifterSwift/workflows/SwifterSwift/badge.svg?branch=master)](https://github.com/SwifterSwift/SwifterSwift/actions)
[![Platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20tvOS%20%7C%20macOS%20%7C%20watchOS%20%7C%20Linux-lightgrey.svg)](https://github.com/SwifterSwift/swifterSwift)
[![Cocoapods](https://img.shields.io/cocoapods/v/SwifterSwift.svg)](https://cocoapods.org/pods/SwifterSwift)
[![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)
[![SPM compatible](https://img.shields.io/badge/SPM-Compatible-brightgreen.svg?style=flat)](https://swift.org/package-manager/)
[![Accio supported](https://img.shields.io/badge/Accio-supported-0A7CF5.svg?style=flat)](https://github.com/JamitLabs/Accio)
[![codecov](https://codecov.io/gh/SwifterSwift/SwifterSwift/branch/master/graph/badge.svg)](https://codecov.io/gh/SwifterSwift/SwifterSwift)
[![docs](http://swifterswift.com/docs/badge.svg)](http://swifterswift.com/docs)
[![Swift](https://img.shields.io/badge/Swift-5.6-orange.svg)](https://swift.org)
[![Xcode](https://img.shields.io/badge/Xcode-12.4-blue.svg)](https://developer.apple.com/xcode)
[![MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT)
[![Slack Channel](https://img.shields.io/badge/Slack-SwifterSwift-green.svg)](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 and Linux.

[็ฎ€ไฝ“ไธญๆ–‡](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

Foundation Extensions

UIKit Extensions

AppKit Extensions

CoreGraphics Extensions

CoreLocation Extensions

CoreAnimation Extensions

CryptoKit Extensions

MapKit Extensions

SpriteKit Extensions

SceneKit 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: [![Slack](https://img.shields.io/badge/Slack-SwifterSwift-green.svg)](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.