Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

SwifterSwift/SwifterSwift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Build StatusPlatformsCocoapodsCarthage compatibleSPM compatibleAccio supportedcodecovdocsSwiftXcodeMITSlack Channel

SwifterSwift is a collection ofover 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.

简体中文

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 withSwift 3 / Xcode 8.x please ensure you are usingv3.1.1.
  • To use withSwift 3.2 / Xcode 9.x please ensure you are usingv3.2.0.

Installation

CocoaPods

To integrate SwifterSwift into your Xcode project usingCocoaPods, specify it in yourPodfile:

- 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 usingCarthage, specify it in yourCartfile:

github "SwifterSwift/SwifterSwift" ~> 6.0
Swift Package Manager

You can useThe Swift Package Manager to installSwifterSwift by adding the proper description to yourPackage.swift file:

import PackageDescriptionlet package = Package(    name: "YOUR_PROJECT_NAME",    targets: [],    dependencies: [        .package(url: "https://github.com/SwifterSwift/SwifterSwift.git", from: "6.0.0")    ])

Next, addSwifterSwift to your targets dependencies like so:

.target(    name: "YOUR_TARGET_NAME",    dependencies: [        "SwifterSwift",    ]),

Then runswift package update.

Note that theSwift 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 yourPackage.swift file is configured, you need to runaccio update instead ofswift package update though.

Manually

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

For your test targets you can also add theXCTest 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 ofover 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 atswifterswift.com/docs

Get involved

We want your feedback.Please refer tocontributing guidelines before participating.

Slack Channel:Slack

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

Thanks

Special thanks to:

License

SwifterSwift is released under the MIT license. SeeLICENSE for more information.

Packages

No packages published

Contributors157

Languages


[8]ページ先頭

©2009-2025 Movatter.jp