Skip to content

leacode/SwiftWings

Repository files navigation

SwiftWings

Swift5.0 Version License Platform Codecov

SwiftWings is A collection of Swift extensions. It support iOS, macOS, tvOS, watchOS. You can also integrate the framework in your server-side project by using Swift Package Manager.

Requirements

  • iOS 12.0+ / macOS 10.11+
  • Swift 5.0+
  • Watch OS 2.0+
  • TV OS 9.0+
  • Linux can run Swift

If you're supporting iOS 8+ and macOS 10.xx, you can specify version of v1.5

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

SwiftWings is available through CocoaPods. To install it, simply add the following line to your Podfile:

use_frameworks!

target '<Your Target Name>' do
pod 'SwiftWings'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

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

github "leacode/SwiftWings"

Run carthage update to build the framework and drag the built SwiftWings.framework into your Xcode project.

Swift Package Manager

The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

iOS/ MacOS:

To integrate SwiftWings into your project , specify it in File > Swift Packages > Add:

https://github.com/leacode/SwiftWings

From 1.6.0 the framework support Mac os >= 11.0.

Server Side:

Add dependency in Package.swift:

dependencies: [
    .package(url: "https://github.com/leacode/SwiftWings.git", from: "1.9.1"),
]

...

.target(name: "App", dependencies: ["SwiftWings", ...]),

...

List of Extensions

Extensions

Date Utilities

The new Date+Utilities helpers provide start/end-of-component calculations, calendar-aware comparisons, range helpers, and safe date clamping that work across iOS, macOS, watchOS, tvOS, and Linux because they only rely on Foundation. Check out the detailed usage guide.

Time-Zone Helpers

Need to present or store dates for multiple regions? The Date+TimeZone extensions make it trivial to convert an event time between calendars, pull out localized components, or format a string inside a specific zone. Paired with TimeZone+Extensions you can display offsets (GMT+05:30), check whether DST is active, or surface the next transition. Read more in the Time-Zone Utilities guide.

Documentation & Wiki Mirroring

  • Browse the full catalogue of extensions in Docs/Extensions.md alongside the focused guides for Date utilities and Time-zone helpers.
  • To mirror the entire Docs/ directory into the GitHub wiki, run Scripts/mirror_docs_to_wiki.sh. The script clones/pulls SwiftWings.wiki, copies the docs, and prints the git add/commit/push commands to finish the synchronization.

Author

Chunyu Li

License

SwiftWings is available under the MIT license. See the LICENSE file for more info.

About

A collection of Swift extensions for all platforms.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages