Swiftpack.co -  wookiee/Convenience as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
A small pile of Swift extensions and conveniences I tend to add to personal projects.
.package(url: "https://github.com/wookiee/Convenience.git", from: "0.2.3")

Unlicense Swift 5.4


This is a little holding place for common tools and conveniences that I like to use in my personal projects.

If anyone ever finds and uses this, I'd love to hear any feedback.


  • Extensions:
    • OSLog.Logger:
      • init(_:), which uses the process name and bundle name for the logger's subsystem, and the provided string for the category.
    • Int:
      • of<Value>(_ value: @autoclosure () throws -> Value) rethrows -> [Value]): fills an array with self values by executing the provided closure self times.
      • times(_ execute: @autoclosure () throws -> Void) rethrows: executes the provided closure self times.
    • String:
      • randomTitle(wordCount:): generates a randomized Title Case string a specified number of words long.
    • Result: *static func success(): a wrapper for the uglier .success(())
  • Tools:
    • Keychain: A simplistic wrapper for storing single String values into the user's keychain. Uses the kSecClassGenericPassword item class.
  • Property wrappers:
    • KeychainStorage: A property wrapper that uses the Keychain convenience to wrap properties that use the user's keychain for their storage.
    • ReadersWriterLocked: A property wrapper for making values thread-safe for access using a queue-based readers-writer lock.
    • UserDefault: A property wrapper that uses UserDefaults for storage. Requires that the property type is Codable.


Stars: 0
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics