Skip to content

pawankmrai/swift-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swift-utils

A growing collection of reusable Swift utilities for iOS development. A new utility is added daily, targeting iOS 15+ / Swift 5.9+.

Installation

Add the package via Swift Package Manager:

https://github.com/pawankmrai/swift-utils.git

In your Package.swift:

dependencies: [
    .package(url: "https://github.com/pawankmrai/swift-utils.git", branch: "main")
]

.target(
    name: "MyApp",
    dependencies: [
        .product(name: "SwiftUtilsNetworking", package: "swift-utils"),
        .product(name: "SwiftUtilsHelpers", package: "swift-utils"),
    ]
)

Import only what you need: SwiftUtilsExtensions, SwiftUtilsNetworking, SwiftUtilsStorage, SwiftUtilsConcurrency, SwiftUtilsHelpers, SwiftUtilsUIUtilities, or SwiftUtils for everything.

Utilities

Utility Category Description Docs
String+Extensions Extensions Email validation, trimming, truncation, slugify, snake_case Examples & API
Array+Extensions Extensions Safe subscript, chunking, dedup, grouping, frequencies, key-path sort Examples & API
Date+Extensions Extensions Relative formatting, components, arithmetic, ISO 8601, day comparisons Examples & API
APIClient Networking Async/await HTTP client with auto JSON coding Examples & API
UserDefaultsWrapper Storage @propertyWrapper for type-safe UserDefaults Examples & API
KeychainWrapper Storage Type-safe Keychain for strings, Data, and Codable Examples & API
DebounceThrottle Concurrency Thread-safe debouncer and throttler Examples & API
SwiftLogger Helpers Leveled logger with categories and pluggable destinations Examples & API
Validator Helpers Composable input validation with chainable rules Examples & API
DeepLinkHandler Helpers Declarative URL routing with path params and wildcards Examples & API
FeatureFlagManager Helpers Type-safe feature flags with overrides and observation Examples & API
GradientBuilder UI Utilities Chainable gradient builder with presets and UIImage rendering Examples & API
Optional+Extensions Extensions Unwrapping, chaining, filtering, zipping, and typed defaults for optionals Examples & API
NotificationScheduler Helpers Fluent local notification scheduling with time, calendar, and recurring triggers Examples & API
HapticFeedbackManager Helpers Thread-safe haptic feedback with patterns, presets, and custom intensity Examples & API
DisplayFormatter Helpers Number, currency, percentage, file size, duration, ordinal, and compact formatting Examples & API

License

This project is licensed under the MIT License — see the LICENSE file for details.

About

A modular collection of production-ready Swift utilities for iOS. Pick only what you need: extensions, networking, storage, concurrency, and more.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages