Latest 4.0.1
Homepage https://github.com/SwifterSwift/SwifterSwift
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0, requires ARC
Authors

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 and watchOS.

Whats New in v4.0.1?

Requirements:

  • iOS 8.0+ / tvOS 9.0+ / watchOS 2.0+ / macOS 10.10+
  • Xcode 9.0+
  • Swift 4.0+

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 CoreGraphics extensions only:

pod 'SwifterSwift/CoreGraphics'

– Integrate CoreLocation extensions only:

pod 'SwifterSwift/CoreLocation'
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", majorVersion: 4),
    ]
)

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
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 API design guidelines of Swift.

Check Examples.md for some cool examples!

Documentation

Complete documentation for all extensions with examples is available at swifterswift.com/docs

Get involved:

Your feedback is always appreciated and welcomed.
Please refer to contributing guidelines before participating.

Slack Channel: Slack

It is always nice to talk with other people using SwifterSwift and exchange experiences, Join Channel

Thanks:

Special thanks to:

Latest podspec

{
    "name": "SwifterSwift",
    "version": "4.0.1",
    "summary": "A handy collection of more than 500 native Swift extensions to boost your productivity.",
    "description": "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 u2013over 500 in 1u2013 for iOS, macOS, tvOS and watchOS.",
    "homepage": "https://github.com/SwifterSwift/SwifterSwift",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Omar Albeik": "[email protected]"
    },
    "social_media_url": "http://twitter.com/omaralbeik",
    "screenshots": "https://raw.githubusercontent.com/SwifterSwift/SwifterSwift/master/Assets/logo.png",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/SwifterSwift/SwifterSwift.git",
        "tag": "4.0.1"
    },
    "source_files": "Sources/**/*.swift",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "4.0"
    },
    "documentation_url": "http://swifterswift.com/docs",
    "pushed_with_swift_version": "4.0",
    "subspecs": [
        {
            "name": "SwiftStdlib",
            "source_files": "Sources/Extensions/SwiftStdlib/*.swift"
        },
        {
            "name": "Foundation",
            "source_files": "Sources/Extensions/Foundation/*.swift"
        },
        {
            "name": "UIKit",
            "source_files": [
                "Sources/Extensions/UIKit/*.swift",
                "Sources/Extensions/Shared/ColorExtensions.swift"
            ]
        },
        {
            "name": "AppKit",
            "source_files": [
                "Sources/Extensions/AppKit/*.swift",
                "Sources/Extensionss/Shared/ColorExtensions.swift"
            ]
        },
        {
            "name": "CoreGraphics",
            "source_files": "Sources/Extensions/CoreGraphics/*.swift"
        },
        {
            "name": "CoreLocation",
            "source_files": "Sources/Extensions/CoreLocation/*.swift"
        }
    ]
}

Pin It on Pinterest

Share This