A handy collection of more than 500 native Swift extensions to boost your productivity.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github v4.3 (#435) Apr 8, 2018
Assets Updated README (#215) Jul 25, 2017
Examples/Examples.playground Add examples playground (#596) Nov 17, 2018
Sources Fixed: Minor typo in UIWindowsExtensions.swift (#623) Jan 11, 2019
SwifterSwift.xcodeproj added UIActivityExtensions (#580) Nov 17, 2018
SwifterSwift.xcworkspace Update for Swift 4.2 and Xcode 10 support (#562) Sep 20, 2018
Tests Fixing #616 bug on NSAttributedStringExtensions. (#617) Dec 11, 2018
.codecov.yml Add new extensions (#238) Sep 6, 2017
.editorconfig Create .editorconfig (#357) Jan 4, 2018
.gitignore v4.3 (#435) Apr 8, 2018
.swift-version Update for Swift 4.2 and Xcode 10 support (#562) Sep 20, 2018
.swiftlint.yml Optional extensions (#442) Apr 13, 2018
.travis.yml Only triggering push builds for master. (#618) Dec 11, 2018
CHANGELOG.md Fixing #616 bug on NSAttributedStringExtensions. (#617) Dec 11, 2018
CHANGELOG_GUIDELINES.md v4.1.1 (#356) Jan 6, 2018
CONTRIBUTING.md Update CONTRIBUTING.md to mention adding a subspec for new modules (#595 Nov 3, 2018
Dangerfile Label the xcode summary with the platform. (#519) Jul 19, 2018
Gemfile Adding Danger xcode-sumary (#498) Jun 8, 2018
LICENSE Update copyright date to 2018 (#351) Jan 2, 2018
Package.swift Update for Swift 4.2 and Xcode 10 support (#562) Sep 20, 2018
README.md Add examples playground (#596) Nov 17, 2018
SwifterSwift.podspec Update `podspec` to make the group paths of SwifterSwift correct in P… Oct 26, 2018

README.md

Build Status Platforms Cocoapods Carthage compatible codecov docs CocoaPods CocoaPods Swift Xcode MIT Slack Channel

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.

Whats New in v4.6.0?

Requirements:

  • iOS 8.0+ / tvOS 9.0+ / watchOS 2.0+ / macOS 10.10+ / Ubuntu 14.04+
  • Swift 4.2+

Looking for Swift 3

  • To use with Swift 3 / Xcode 8.x please ensure you are using v3.1.1.
  • To use with Swift 3.2 / Xcode 9.x please ensure you are using v3.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 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 SpriteKit extensions only:

pod 'SwifterSwift/SpriteKit'
Carthage

To integrate SwifterSwift into your Xcode project using Carthage, specify it in your Cartfile:

github "SwifterSwift/SwifterSwift" ~> 4.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: "4.0.0")
    ]
)

Note that the Swift Package Manager is still in early design and development, for more information checkout its GitHub Page

Manually

Add the extensions folder to your Xcode project to use all extensions, or a specific extension.

List of All Extensions

SwiftStdlib Extensions
Foundation Extensions
UIKit Extensions
AppKit Extensions
CoreGraphics Extensions
CoreLocation Extensions
MapKit Extensions
SpriteKit Extensions
Misc. 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

Get involved:

We want your feedback. Please refer to contributing guidelines before participating.

Slack Channel: Slack

It is always nice to talk with other people using SwifterSwift and exchange experiences, so come join our Slack channel.

Thanks:

Special thanks to:

License

SwifterSwift is released under the MIT license. See LICENSE for more information.